-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glibc: can't cross compile #14664
Comments
I have some working hacks in https://github.com/dezgeg/nixpkgs/tree/pr-aarch64 (for #13042). I will integrate them soon(TM), although I know they are already out of date and the recently merged closure-size branch breaks cross compilation in yet another ways... |
Sorry, armv5tel is flat out broken for another reason. use -A armv6l to reproduce instead. I'll try using your branches as a basis, I guess, but why are there no smoke tests for crossDrvs? I find super-basic mistakes like nativeBuildInputs not properly being separated from buildInputs all the time. I plan to fix up some of these cross targets myself, with the end-goal being root FS generation for embedded systems. I'm not even close. |
There is http://hydra.nixos.org/jobset/nixpkgs/cross-trunk but I don't think anyone has looked there in years. I did build all the ARM tarballs (including armv5tel) quite recently, probably there are some useful commits left there as well: |
Wow, aggravating. Is there a reason why cross builds are neglected like this? It seems to me that the extra effort for keeping everything cross-buildable should be almost negligible--pretty much just maintaining (native/)buildInputs. Should I bother trying to submit fixes to get that jobset a healthier shade of green? I think I'll just use those tarballs and build natively, for now. |
As usual, it's just noone really working on them around nixos.org AFAIK. I'll be shortly proposing/pushing some changes around linux->mingw cross-building, but I suppose that's rather different from what you're interested in... |
Where can I get the .sql or whatever to import this cross-trunk jobset into my own Hydra server? |
Things have further deteriorated on nixpkgs master:
Something to do with the change to the import line, probably for the closure-size patches. I'm at a real loss here. I'd like to improve this build script, but I'm blocked. |
Seems like it's just a bad merge resolution from the latest commit that touched the file:
|
I don't know anything about actually configuring Hydra but the Configuration tab tells it's |
The jobset config is just a few fields, so it's quick enough to "copy by hand". I don't know about any other way. |
On linux we should have |
When I remove the libiconv input in gettext and fix the bad stripping in glibc's builder.sh, I get:
Why's the build expecting -static and -debug suffixed output paths? is this closure-size related? |
We've changed the way we build glibc by default, and things just aren't that simple to work in every platform/config. The "static" output is due to |
Okay, thanks everyone for the hints; I will try to use them to progress on my own. |
The fastest work around this problem should be to just |
Incidentally, is is possible to complete building a derivation that's failed, but preserved with |
On normal compilation that feature works well. For now it should be easiest for you to e.g. remove that When a build fails, typically there's little sense in "forcing it to succeed", so I don't think there's any command for that. |
Here, the builder tries to use a single libc derivation for both /lib and /include. By default, this is set to the "dev" output, but there is no single output that provides both. Is the best way to address this to add and pass in I also don't understand where/why 64876a1#diff-036410e9211b4336186fc613f7200b12L6870 ( appending .out to glibcCross value in all-packages.nix ). What is the proper way to address this? |
Even after all those fixes, when building gcc--stage-final, I get:
This error comes after the ultimate link step that is huge (31k chars), |
I've finally gotten working cross builds on the master branch. The weirdest bit was that something was breaking libc_nonshared.a and libpthread_nonshared.a in the glibc.crossDrv install or fixup phase, rewriting the object headers of a single object file in each, resulting in "incompatible object type" errors later down the line when trying to link against the glibc.crossDrv. I'm still not sure what exact line was doing this. Right now I've just got a hack in place to copy over these libs again in postFixup. Once I figure out what exactly is the problem, I'll submit a PR to get at least armv5/7 cross building working again. Mingw32/64 still have issues rooted in the closure-size changes. Specifically, the machine type given by |
Looks like it was just the native |
Pull request #15867 solves all the issues I was having. |
to reproduce:
nix-build pkgs/stdenv/linux/make-bootstrap-tools-cross.nix -A armv6l (edit: not armv5tel)
glibc fails because of the improper stripping done by pkgs/development/libraries/glibc/builder.sh at the end of postInstall(). This worked a while ago. Looks like it broke around 2016.02.28 maybe? There's another problem after the stripping one as well. If I get past it I'll maybe submit a PR, but I'm a bit afraid of breaking something crucial, what with this being glibc after all.
Incidentally, glibc's build files are pretty convoluted. I think the single most important library in nix/nixos should be a little better maintained, personally. By that I mean more comments, better organization of .nix and .sh, tests that catch these regressions, etc.
The text was updated successfully, but these errors were encountered: