lp_solve: fix cross-compilation#419322
Conversation
9e83db9 to
bf7ea31
Compare
|
Btw, I have some concerns about having to launch an emulator during build time. Is it a good approach in general? And would Also, is it okay to declare and export env variables like I did? How idiomatic is it? I've seen |
$ nix eval --impure --expr 'with import <nixpkgs> {}; stdenv.hostPlatform.emulator buildPackages'
"/nix/store/wjq0dhc78n818mmcl7lg7da64ds3iai3-exec/bin/exec"when the buildPlatform can natively execute the hostPlatform then the "emulator" just
for this specific case, you can use |
bf7ea31 to
df9c2d9
Compare
|
Btw, turn out that Nix automatically sets env variables for all binutils binaries, so there is no need to manually set them.
Good to know, thanks!
Nice, I like that more than |
df9c2d9 to
c598b21
Compare
uninsane
left a comment
There was a problem hiding this comment.
nice
the emulator stuff is pretty specific to us, but upstream would probably be interested in taking the CC, AR and RANLIB changes if you get an extra moment to submit those. looks like development has migrated to Github (CC @sergei-mironov if you want to check the validity of that post & update our sources for lp_solve if it's accurate).
In that case do you want me to rewrite that patch so that it defaults back to c="${CC:-cc}" |
Fixed failing cross-compilation. Closes #419102.
Tested with:
x86_64-linux>x86_64-linuxx86_64-linux>aarch64-unknown-linux-gnuI also tried
armv7l-unknown-linux-gnueabiandriscv64-linux, but there was no gcc and it tried buildingarmv7l-unknown-linux-gnueabi-nolibc-gcc-14.3.0which I assume is a lost cause (I don't have 8 hours to build gcc 💀).Is there any way I can check what architectures/channels have a precompiled gcc toolchain?
The only failing package is shogun-6.1.4, but it has nothing to do with my change — #419311.
Besides that I think everything else was rebuilding successfully. Unfortunately my laptop ran out of all 32 GB of memory while trying to build libreoffice, so I could not complete the whole process, lol.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.