No need to compile windows binaries anymore! - Page 1
Forum section: electronics / general

author: Karel
author_rank: Super Contributor
timestamp: September 11, 2022, 06:51:26 am
content: Ok, you'll need w11, but still, at least for me, it will save time and effort.No need anymore to program cross-platform and to maintain different build chains.I hope w11 quickly replaces w10.Run Linux GUI apps on the Windows Subsystem for Linux:https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

author: krokodyl1220
author_rank: Contributor
timestamp: September 11, 2022, 08:18:23 am
content: Is it time to echo the EEE mantra?Seriously though, this is good news for those that are stuck on the corporate jobs and can't use Linux.

author: langwadt
author_rank: Super Contributor
timestamp: September 11, 2022, 10:13:21 am
content: you have been able to do it for quite some time one win10, just not as integrated so you needed to install an xserver, I've used x410

author: rsjsouza
author_rank: Super Contributor
timestamp: September 11, 2022, 10:52:44 am
content: TBH, nothing that a Virtual Machine hasn't solved in more than a decade, which I tend to prefer so I can keep various development environments contained with their tool versions and such - I have to keep support for 10+ year old toolchains and SDKs.And Windows 10 had some level of integration that worked moderately well.I personally am not looking forward for Windows 11. It will be another hodgepodge of M$ bullet dodging.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 11, 2022, 06:23:17 pm
content: Uh yeah?Except that if you actually target Windows, users will want native binaries. Usually. Except maybe for very niche products for which they probably won't care.Oh and binary-compatibility for Linux binaries across different Linux distros can already be a headache, so not talking about WSL... if you think that'll be as painless as that.

author: bd139
author_rank: Super Contributor
timestamp: September 11, 2022, 07:07:18 pm
content: WSL is an ass ache generally. It's not a persistent environment so things like cron and services don't make sense. This is a show stopper for me when it comes to doing things. What you expect is not always what turns up when you're using it and as always with Microsoft it can take some time to work around it (try getting WSL VMs to talk over a VPN if you have a corp network and DeviceGuard enabled etc).I use a Mac for everything now but when I was forced to use a corp windows machine, it did not have WSL on it at all. The dev environment was remote in AWS. Now I'm on macOS it's the same environment in AWS.

author: NoMoreMagicSmoke
author_rank: Regular Contributor
timestamp: September 11, 2022, 09:08:53 pm
content: Quote from: rsjsouza on September 11, 2022, 10:52:44 amIn all fairness, WLS isn't much different than a tightly integrated virtual machine.

author: bd139
author_rank: Super Contributor
timestamp: September 12, 2022, 06:01:05 am
content: Quote from: NoMoreMagicSmoke on September 11, 2022, 09:08:53 pmIt’s worse than a VM. Lots of really bad trade offs were made.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: September 12, 2022, 06:49:10 am
content: Quote from: bd139 on September 12, 2022, 06:01:05 amI haven't used it and wont, only watched it develop from the sidelines. It's apparent that much of the implementation has been sabotaged on purpose. I seriously wonder what user it is targeting.

author: langwadt
author_rank: Super Contributor
timestamp: September 12, 2022, 06:54:25 am
content: Quote from: bd139 on September 12, 2022, 06:01:05 amlike what?

author: bd139
author_rank: Super Contributor
timestamp: September 12, 2022, 07:45:11 am
content: For clarity:1. The VM is not persistent. When idle it is suspended. That makes running persistent processes and services difficult. Even fg/bg shell process control is problematic.2. There is no init / systemd / DBus as such.3. The network routing on HyperV is a horrible shit crock which means there are numerous problems in certain configurations with accessing stuff over VPNs and with typical corporate DNS configurations (have to futz with resolv.conf and chattr). This gets even worse if you have to suffer docker desktop on the same machine.4. The filesystem driver isn't that great which means copying in and out of the VM by the system mount is not always good.5. Have seen some issues with time skew as well which is a pain when you are writing deadline critical systems (I am).6. As the file access model is not logically consistent between POSIX and NT, you get problems with Windows Defender and Crowdstrike interfering with the host system mount resulting in file corruption.7. Try getting support for anything running in WSL. Answer is always "try it outside WSL and without a Microsoft kernel and come back later".The above is a complete show stopper for me. I keep the systems entirely isolated.Worth pointing out my experience is on a very large development team running that stack, not just one solo user. We had 300 people running it.

author: Karel
author_rank: Super Contributor
timestamp: September 12, 2022, 08:00:02 am
content: My use case has less requirements, so it could possibly work fine, haven't tried it yet though.I developed a viewer for a certain file format that visualizes the content. So, apart from file access there are no special requirements.All development and testing is done exclusively on Linux and I detest windows so the less time I have to use a vm (for compiling windows binaries) the better.I guess that in my case, using WSL2 is less cumbersome than installing Linux in a vm.

author: rsjsouza
author_rank: Super Contributor
timestamp: September 12, 2022, 09:32:44 am
content: Quote from: SiliconWizard on September 11, 2022, 06:23:17 pmWell, I don't build Windows binaries as much as I do Linux, so my use case is not 100% on point with yours.Despite I don't have as many troubles as BD139, I do prefer to keep my systems isolated. The sold panacea that WSL is "Linux on Windows" also suffers from the binary compatibility problems across distros you mentioned, so I prefer to have a collection of permanent running VMs with distros I need to support with automated jobs that perform builds automagically and can pull sources from a remote source controlled server.All in all, isolated VMs work much better for me.

author: Marco
author_rank: Super Contributor
timestamp: September 12, 2022, 09:44:27 am
content: Quote from: bd139 on September 12, 2022, 06:01:05 amWSL2 runs in a VM, a homegrown distro with its own init/etc which runs other castrated distros on top but still.

author: Karel
author_rank: Super Contributor
timestamp: September 12, 2022, 10:00:34 am
content: Quote from: SiliconWizard on September 11, 2022, 06:23:17 pmIn my case I'm lucky I guess because I don't target windows users but windows users are targeting my Linux application.Quote from: SiliconWizard on September 11, 2022, 06:23:17 pmI guess I'm lucky again here because I never experienced problems using the well known and most used distro's.For example, have a look at Eagle V7 and Telegram. They run practically on every distro as long as the cpu architecture is correct.Simply put, link static.

author: Karel
author_rank: Super Contributor
timestamp: September 26, 2022, 10:13:57 am
content: A match made in heaven: systemd comes to Windows Subsystem for Linuxhttps://www.theregister.com/2022/09/24/systemd_windows_linux_microsoft/

author: Marco
author_rank: Super Contributor
timestamp: September 26, 2022, 01:03:04 pm
content: It increases cross distribution compatibility, SystemD is a core system library at this point even though it really shouldn't be.

author: dferyance
author_rank: Regular Contributor
timestamp: September 26, 2022, 02:52:02 pm
content: Quote from: SiliconWizard on September 11, 2022, 06:23:17 pmYeah I've worked on a few cross-platform GUI applications and targeting Linux was always much harder than targeting Windows. Distros expect everything is distributed in the package manager. There are also all sorts of dependencies where they may or may not be present, the distro might be using some other alternative, or just version compatibility problems. My understanding is Linux has gotten easier with snap and flatpak (I haven't developed for either) but targeting Windows is still much easier. While Linux is good regarding kernel / user-mode compatibility, lots of the other libraries and systems commonly used with Linux aren't great at backwards compatibility. These problems aren't a big deal in a server environment where you have a pre-determined Linux distro or are using Docker to bundle all dependencies, but for independently installed application, they are a major issue.Still that is good news. I use WSL and had to install a separate X11 server.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 27, 2022, 12:24:31 am
content: Software distribution is still a weak point for Linux from a commercial POV. (Now if you prefer distributing software as source code, that's a different story. But it doesn't really work in "commercial" environments.)That's one of the main reasons Linux hasn't been successful on the desktop IMO, and Linus himself said that too. Far above desktop environments - which admittedly are still not that great on Linux, but these days they aren't worse than Windows. Windows 11 pretty much looks like a themed Gnome.

author: james_s
author_rank: Super Contributor
timestamp: September 27, 2022, 03:02:09 am
content: Software distribution is a pain, I think largely due to the fact that are there so many different distros, a doubled edged sword. Snap is unfortunately absolute garbage, the first thing I do with any distro that has Snap is rip all that junk out.

author: 50ShadesOfDirt
author_rank: Regular Contributor
timestamp: September 27, 2022, 06:32:32 pm
content: I think MS is trying to capture a piece of the linux world and user base ... maybe it will work to lock in a small subset of very casual linux users?I found the integration of WSL to be similar to IE and EDGE ... buried too deeply into the OS, caused trouble at times, can't easily rip it out, etc. I'm not going to trade VMware workstation for WSL(hyper-v). But, maybe this trade fits others, or it will get better in v3.x or later of WSL. It isn't a replacement for me ...If windows is host OS, I just run linux in vm's, and everything works as expected, including inter-vm connectivity and beyond. If linux is host OS, I just run windows in vm's, and everything works as expected.Before vm's, I had fun with various native X11 apps on windows ... I got the mouse-tracking eye app on my Windows desktop, the clock, etc. But even that had effort to install or maintain. VM's and the OS inside them just works ...Give me an extra monitor or three, and I'd have a hard time knowing what host OS is really running on any given monitor ...

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 27, 2022, 07:31:28 pm
content: Of course MS is trying to capture everything it can. It already captured desktop computing for the most part. But struggled to capture much of anything else. Except more recently "cloud" services.They invested a lot in mobile stuff, and failed.They are investing a lot in Linux stuff, and they will fail.But they have just so much cash that they can keep trying almost forever.

author: Ampera
author_rank: Super Contributor
timestamp: November 01, 2022, 11:21:09 pm
content: I can concur with WSLg being kinda poop. The only windows machine I own is my Surface Pro 8 (which is due for a good linuxing as soon as I have the time), which runs Windows 11.Out of curiosity, I grabbed a copy of Debian and got some of my favorite Linux-only utilities running, to find out they completely butchered things like HiDPI, and just window management in general. A lot of software doesn't maximize properly, or has graphical glitches, or just straight up crashes where it wouldn't on a real machine. Maybe some of the utilities I'm using are oddball stuff, but either way it's certainly not any big whoop. Also the hardware acceleration is about as suck as one would expect, and as far as I can tell runs using some form of Hyper-V GL passthrough (since real paragpu is cool kids only on nvidia/amd).Windows has been dead for me for a good few years, and going back to it, it feels like an alien world.