Live data from Hacker News

Loss32: Let's Build a Win32/Linux

loss32.org

291–300 of 493 posts

Re: Loss32: Let's Build a Win32/Linux

#291
post #179
post #167

Earlier quoted context omitted.

The problem is not the APIs, it's symbol versions. You will routinely get loader errors when running software compiled against a newer glibc than what a system provides, even if the caller does not use any "new" APIs. glibc-based toolchains are ultimately missing a GLIBC_MIN_DEPLOYMENT_TARGET definition that gets passed to the linker so it knows which minimum version of glibc your software supports, similar to how Ap…

In principle you can patch your binary to accept the old local version, though I don't remember ever getting it to work right. Anyway here it is for the brave or foolhardy, here's the gist: patchelf --set-interpreter /lib/ld-linux-x86-64.so.2 "$APP" patchelf --set-rpath /lib "$APP"

Yes you can do this, thanks for mentioning I was interested and checked how you would go about it.

1. Delete the shared symbol versioning as per https://stackoverflow.com/a/73388939 (patchelf --clear-symbol-version exp mybinary)

2. Replace libc.so with a fake library that has the right version symbol with a version script e.g. version.map GLIBC_2.29 { global: *; };

With an empty fake_libc.c `gcc -shared -fPIC -Wl,--version-script=version.map,-soname,libc.so.6 -o libc.so.6 fake_libc.c`

3. Hope that you can still point the symbols back to the real libc (either by writing a giant pile of dlsym C code, or some other way, I'm unclear on this part)

Ideally glibc would stop checking the version if it's not actually marked as needed by any symbol, not sure why it doesn't (technically it's the same thing normally, so performance?).

Re: Loss32: Let's Build a Win32/Linux

#292

Earlier quoted context omitted.

Agreed but there have been some real strides in innovation recently in linux, definitely worth checking out :) Regarding successful, well they already are, ZorinOS is an OS which looks like windows 7 or has some similarities to it and its sort of recommended to beginners but usually linux mate is the most recommended distro > No, making Linux run reliably on random laptops is already a monumental challenge. Not sure…

I am a huge fan and user of Linux. The problem is slapping Linux on some random bit of Windows kit and expecting it to work as though it had shipped with Linux, with support to back it. The more recent, the worse it will be. If you want to run Linux, buy Linux computers that ship with Linux and have a support number you can call. Just like you'd not expect to be able to slap OSX on some random Dell and have it work.

Sir, I am just saying that we can have linux (which works on almost all devices) and then we can have wine which I think is just a software layer so it should work on most hardware considering what it does is Wine translates Windows API calls into POSIX calls on-the-fly, these Posix calls would still be handled by the linux kernel and its support for its drivers.

This is how loss32 works and I am just saying that sir, instead of merely using the win95 design that loss32 uses, perhaps we can modernize the style a little towards something like windows 7 as a good balance?

Sir of course, if you are worried about the software emulation aspect of things, you are worried about loss32 itself and not my idea of "hey lets reskin it to look like win7", We can have a discussion itself on loss32 if you want and weigh in some pros and cons and it certainly isn't something that I will use as a main driver but I think as linux is certainly built on ideas of freedoms, having loss32 isn't really that bad. Its an experiment of sorts even right now and people will test it out because they are curious and we will hear about responses of people who try it out and what they think.

I love Linux just as much as you do but I would admit I never really gotten into windows ecosystem that much so I went to learning Linux really good and took it as a challenge to conquer (mission accomplished)

Many people might not go with that mindset and may come with the mindset that Microsoft is treating them really badly and moral dilemmas as well and so having something which can cater to them isn't bad.

I also want to say that something like this might be good because yes, people say for others to just linux mint but I never really found it good option, not for the gen-z. I think Zorin can be an answer or perhaps AnduinOS but we definitely need more young people in linux and I will tell you as young guy what's happening

People want to get the freedom but they aren't able to articulate it. They are worried about AI but they just can't do anything about it and to be honest they are right, how much can I or you do anything about ram crisis. Maybe there is something that we can do but we just don't know (like did you know that there is a way to convert laptop ram to desktop ram with its gatchas?)

They simply don't know about the open source side of things since they just weren't exposed to it. To us, it may be the core feature but to them its a word written between other words of features that they want to use.

So like I don't really know but pardon me, I don't understand your side of the discussion and I am trying to find a common point.

Do you find an issue within the loss32 architecture itself? Or with the idea of a re-skin towards win7.

I presume its the loss32 architecture but I don't know what to tell you except that it uses wine and wine just works, so much so that the original title of this i think might've been/was about how win32 was the most stable ABI even for linux and that's only possible due to wine.

Not sure what you meant by support there sir, perhaps you are red hat user for a company license or similar and of course this isn't targeted for that sector but for niche users at homes who just want to try out what's "linux" perhaps :) I find the idea of loss32 very interesting as I had thought of designing something similar so I am glad that it exists and I would probably look at it from afar.

I'd love a discussion about it because I think we are saying the same point from different angles and perhaps I can do a better rephrasing but what i mean is completely open source and all linux-y but just have windows applications run easily and have win7 like UI (really similar) and that's it. Everything's linux and these wine programs just convert them to posix syscalls but perhaps I am missing your point of concern and we can talk about it since clearly nothing's better than talking about linux (oh the joy) to another linux user! I think I may be misinterpreting somethings if so pardon me but I am unable to understand how hardware might take a role in wine/what I said and I would be interested if you can tell me more about it perhaps and (have a nice day sir, I got enough quota for the day or the year of talking about linux haha!)?

Re: Loss32: Let's Build a Win32/Linux

#293
post #79

Earlier quoted context omitted.

To quote a friend; "Glibc is a waste of a perfectly good stable kernel ABI"

Ask your friend if he would CC0 the quote or similar (not sure if its possible but like) I can imagine this being a quote on t-shirts xD Honestly I might buy a T-shirt with such a quote. I think glibc is such a pain that it is the reason why we have so vastly different package management and I feel like non glibc things really would simplify the package management approach to linux which although feels solved, there…

Non-glibc distros (musl, uclibc...) with package managers have been a thing for ages already.

Re: Loss32: Let's Build a Win32/Linux

#294

Earlier quoted context omitted.

This is really cool. Looks like it has a way for me to use my own dynamic linker and glibc version *. At some point I've got to try this. I think it would be nice to have some tools to turn an existing programs into a zapps (there many such tools for making AppImages today). * https://github.com/warptools/ldshim

> At some point I've got to try this. I think it would be nice to have some tools to turn an existing programs into a zapps (there many such tools for making AppImages today). Looks like you met the right guy because I have built this tool :) Allow me to show my project, Appseed ( https://nanotimestamps.org/appseed ): It's a simple fish script which I had (prototyped with Claude) some 8-10 months ago I guess to solve…

Can you build GUI programs with this? I'm thinking anything that would depend on GPU drivers. Anything built with SDL, OpenGL, Vulkan, whatever.

Re: Loss32: Let's Build a Win32/Linux

#295

Earlier quoted context omitted.

I can only speak for Flatpak, but I found its packaging workflow and restricted runtime terrible to work with. Lots of undocumented/hard to find behaviour and very painful to integrate with existing package managers (e.g. vcpkg).

Yeah, flatpak has some good ideas, and they're even mostly well executed, but once you start trying to build your own flatpaks or look under the hood there's a lot of "magic". (Examples: Where do runtimes come from? I couldn't find any docs other than a note that says to not worry about it because you should never ever try to make your own, and I couldn't even figure out the git repos that appear to create the offici…

Not sure what you're talking about, Flatpak runtimes are easy to find and contribute to: https://docs.flatpak.org/en/latest/available-runtimes.html

I wasn't directly involved, but the company I worked for has created its own set of runtimes too and I haven't heard any excessive complaints on internal chats, so I don't think it's as arcane as you make it sound either.

Re: Loss32: Let's Build a Win32/Linux

#296

Earlier quoted context omitted.

> Hundreds of other widely-used open source libraries don't. Correct me if I'm wrong but I don't think versioned symbols are a thing on Windows (i.e. they are non-portable). This is not a problem for glibc but it is very much a problem for a lot of open source libraries (which instead tend to just provide a stable C ABI if they care).

> versioned symbols are a thing on Windows There’re quite a few mechanics they use for that. The oldest one, call a special API function on startup like InitCommonControlsEx, and another API functions will DLL resolve differently or behave differently. A similar tactic, require an SDK defined magic number as a parameter to some initialization functions, different magic numbers switching symbols from the same library;…

> There’re quite a few mechanics they use for that. The oldest one, call a special API function on startup [...]

Isn't the oldest one... to have the API/ABI version in the name of your DLL? Unlike on Linux which by default uses a flat namespace, on the Windows land imports are nearly always identified by a pair of the DLL name and the symbol name (or ordinal). You can even have multiple C runtimes (MSVCR71.DLL, MSVCR80.DLL, etc) linked together but working independently in the same executable.

Re: Loss32: Let's Build a Win32/Linux

#297

Earlier quoted context omitted.

I am a huge fan and user of Linux. The problem is slapping Linux on some random bit of Windows kit and expecting it to work as though it had shipped with Linux, with support to back it. The more recent, the worse it will be. If you want to run Linux, buy Linux computers that ship with Linux and have a support number you can call. Just like you'd not expect to be able to slap OSX on some random Dell and have it work.

Sir, I am just saying that we can have linux (which works on almost all devices) and then we can have wine which I think is just a software layer so it should work on most hardware considering what it does is Wine translates Windows API calls into POSIX calls on-the-fly, these Posix calls would still be handled by the linux kernel and its support for its drivers. This is how loss32 works and I am just saying that sir…

It's cool. If we ever meet in person, I'll buy you a beer and we can discuss Linux. :)

Re: Loss32: Let's Build a Win32/Linux

#298
post #55

Earlier quoted context omitted.

There really isn't that much GNU on a modern Linux system, proportionately.

Exactly, Gnome/Linux or KDE/Linux would make a lot more sense.

Both are being baked

https://distrowatch.com/table.php?distribution=gnomeos

https://distrowatch.com/table.php?distribution=kdelinux

The question is if either will catch any interest and if so, what will happen to regular distributions.

Re: Loss32: Let's Build a Win32/Linux

#299
post #228

Earlier quoted context omitted.

Your tone makes it sound like this is a bad thing. But from a user’s perspective, I do want a distro to package as much software as possible. And it has nothing to do with user freedom. It’s all about being entitled as a user to have the world’s software conveniently packaged.

What if you want to use a newer or older version of just one package without having to update or downgrade the entire goddamn universe? What if you need to use proprietary software? I've had so much trouble with package managers that I'm not even sure they are a good idea to begin with.

I know you are trying to make a point about complexity, but that is literally what NixOS allows for.
Post reply on HN