Conversation
4220db4 to
9b97dc6
Compare
|
@edolstra are you able to take a look or recommend a reviewer? |
This fixes: src/libmain/shared.cc:173: undefined reference to `sodium_init' on cygwin.
|
I marked this as stale due to inactivity. → More info |
|
It would be very good to see this revived! The Nix team is more active now and so we can ensure it won't get neglected. What is the state of Cygwin/Msys2 cross in Nixpkgs? That one issue would be merging things we cannot CI. But it shouldn't be too hard to fix that. |
|
This is a better place for what I posted on #8901: I've never had much trouble building nix on cygwin. What I did have a lot of trouble with is fibers/coroutines, which are used by nix via boost. They are sort of fundamentally broken in cygwin, which causes nix to crash (e.g. on network operations). I actually proposed a patch to cygwin which allows them to work, but it hasn't been merged: Last time I did any work on this, it was mostly on the nixpkgs side. The idea was to be able to cross compile a patched cygwin1.dll, and use that to bootstrap, and build up from there. Unfortunately I haven't had time to work on it for a while. I gave up on bootstrapping using unmodified cygwin. If anyone's interested in seeing where I was going: It's is a mess of WIP commits, but this will show you the changes from the base: There are some other things in there that I think are important for cygwin, such as stateless rebasing of dlls, and using native symlinks for dlls. I'd love to get back to this at some point, but performance on cygwin (forking especially) is so bad that it makes it extremely time consuming to build a stdenv. |
|
OK Awesome! Yes let's take it to the Nixpkgs, and start merging PRs there for your stuff, and then come back to this. :) |
|
https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin/ I'm a bit more familiar with MSYS2 than Cygwin; since they are only slightly different I wonder how hard it would be to support both. |
|
It sounds like they would have a lot in common, and could probably both use the same method of handling dll dependencies, etc. I have a feeling cygwin is probably better supported as a build target upstream in many packages, but I could be wrong. I was at least able to build all of the gcc stdenv and nix on cygwin (with some hacks and patches). |
|
@corngood @Ericson2314 FYI a improvement to win-dll-links was merged NixOS/nixpkgs#252459, also see the linked PR |
|
This can be closed now, right? :) |
|
Yeah, I'll close this. I may have more changes when I get to cygwin-hosted builds, but that'll be using nixpkgs instead of cygwin packages. |
I'm just working on building nix on cygwin. In addition to these changes, I needed to build libeditline locally.
Boost coroutines are also currently broken on cygwin, so I've been using the changes described here:
https://cygwin.com/pipermail/cygwin-developers/2020-September/011970.html
to work around the problem.