Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"ar: command not found" in cross-compiling glibc-2.26-75-armv6l-unknown-linux-gnueabihf-armv6l-unknown-linux-gnueabihf #33023
When cross-building anything (e.g. GNU Hello) it stops with the message
Steps to reproduce
Checkout nixpkgs master (or any version since 8e557ed) and add this file to the top-level nixpkgs directory
I've done a bit of poking around and in all honesty I'm not sure if the problem is with the packaging or the upstream (or me, even).
but something in the glibc Makefile maze overrides it
I suspect (though am not 100%, it was quite late at night) that glibc may have been using the build
My understanding of the Nix cross-compilation environment is frankly a bit weak and I might of course just be Doing It All Wrong - any advice to that effect would also be gratefully received.
Thanks. I rebased/cherry-picked my actual tree (mips32 embedded stuff) onto said branch and it's working much better - and has allowed me to significantly clean up the derivation for the kernel. I look forward to seeing your branch land.
FWIW my work is at obsidiansystems/nixpkgs@02726a2...telent:nixwrt-cross-elegant if you're interested, and contains a few trivial-with-hindsight cross-compilation fixes you might want to look at -
I guess the question is, would you like these as a PR against master, or to cherry-pick them into your branch (perhaps makes it easier for you to avoid conflicts), or should I hold them until after your merge? Let me know.
Next step is working out why my libc has gcc and linux headers as runtime dependency, but that's a separate issue.
Oh sorry I should have also pointed out #30882 which contains all the per-package fixes. (The first PR's misc changes are mainly to keep the native builds from regressin.)
The plan is to land the first PR more or less as is to get the foundation on place, and then land the per-package fixes much more rapidly.