Open kolloch opened 9 months ago
@Ericson2314 I think that you wrote the original tests and know waaaay more about cross-building than I do :) If you could help, it would be appreciated.
@flokli / @amjoseph-nixpkgs I'd really appreciate help here -- pinged you since you seem to know and care about cross-compiling.
nix build -L \
--option log-lines 100 --show-trace --out-link ./target/nix-result \
-f ./tests.nix empty_cross.forceSkipped
Check out what the heck is going wrong with https://github.com/nix-community/crate2nix/tree/master/sample_projects/empty_cross.
Thank you!!
I'm sorry, I only carried @amjoseph-nixpkgs ' patches to here, and am not too familiar with the cross architecture.
CC @alyssais I'll take a look at this, but I might need your help :)
I'm sorry, I only carried @amjoseph-nixpkgs ' patches
lolwut? not my commit:
$ git show --format=full 95e3997dc9b806090e5f8c7adff80acfee14714a | egrep 'Author|Commit'
Author: Florian Klink <flokli@flokli.de>
Commit: Florian Klink <flokli@flokli.de>
The test does some special setup steps in its default.nix
Yeah the monkeying around that it is doing with stdenv internals is totally crazy. IMHO it "worked by accident" before. You should drop that test or split it into a sequence of tests that each do one small thing -- it's trying to do too many things at once, so when it fails eval like this it really doesn't tell us anything except "something is bad".
If you replace -none-elf
with -linux-gnu
in the test the problem goes away. This issue affects only the -none-elf
targets, which are weird ones to begin with. Could you please update the title of this issue to reflect that? This is a "kernel-less target" problem, not a general cross problem.
I'm sorry, I only carried @amjoseph-nixpkgs ' patches
lolwut? not my commit:
$ git show --format=full 95e3997dc9b806090e5f8c7adff80acfee14714a | egrep 'Author|Commit' Author: Florian Klink <flokli@flokli.de> Commit: Florian Klink <flokli@flokli.de>
Yes, you're not the author of the commits in crate2nix, but they originate from your CLs in depot, as you commented in https://github.com/nix-community/crate2nix/pull/309#issuecomment-1790296452.
I only meant to say I was doing that upstreaming and don't feel qualified enough with the nixpkgs cross architecture to help out with the specific issue discussed here (#319). Thanks for picking it up!
Hmm, I though I made the freestanding cross test :)
See https://github.com/nix-community/crate2nix/pull/318.
Reproduction Steps
nix develop
(ornix-shell
or direnv)niv update nixpkgs
Build/run integration tests:
Before Update
Everything builds without errors.
After Update
error message
Analysis
The test does some special setup steps in its default.nix including an override for
buildRustCrate
vscode.dev:If you check for differences between the working and non-working commit with
git diff 0cbe9f69c234a7700596e943bfae7ef27a31b735 bd645e8668ec6612439a9ee7e71f7eac4099d4f6 -- pkgs/build-support/rust/
, you get:and more. So the rust parameter is not used anymore and instead
stdenv
is expected for therustcTargetSpec
. If we simply remove it from the code indefault.nix
, we get a weird error:Conclusion
cannot coerce null to a string
error is not very helpful and I'd appreciate help from someone knowing cross compilation.