waf: fix cross-compilation#252874
waf: fix cross-compilation#252874Artturin merged 6 commits intoNixOS:stagingfrom atorres1985-contrib:waf-cross
Conversation
|
Investigating #249251 (comment) |
|
This fixes evaluating |
|
I am a bit afraid that Python3 should be propagated inside |
|
The root cause of this issue is that Here is a diff of the waf hook derivations with this PR applied. Diffdiff --git a/good.txt b/broken.txt
index 44168667146f..33f1385f33c9 100644
--- a/good.txt
+++ b/broken.txt
@@ -1,5 +1,5 @@
{
- "/nix/store/86byz9qa5an1cy774aqbikn8cd7w4vq2-waf-setup-hook.drv": {
+ "/nix/store/d3l1w04pdk7jmy8f7bcfcrbvzlsqciv9-waf-setup-hook.drv": {
"args": [
"-e",
"/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh"
@@ -10,9 +10,9 @@
"buildCommand": "mkdir -p $out/nix-support\ncp /nix/store/7hqndxkvykifrd4dbqvsi79xmxrpyxh0-setup-hook.sh $out/nix-support/setup-hook\nrecordPropagatedDependencies\nsubstituteAll /nix/store/7hqndxkvykifrd4dbqvsi79xmxrpyxh0-setup-hook.sh $out/nix-support/setup-hook\n",
"buildInputs": "",
"builder": "/nix/store/m36d29gn5gm9bk0g7fcln1v8171hvn95-bash-5.2-p15/bin/bash",
- "cmakeFlags": "",
- "configureFlags": "",
- "crossFlags": "--cross-compile \"--cross-execute=/nix/store/lxrcjkl3angz4bm7ys1f2cywqlgj9ayk-qemu-8.0.4/bin/qemu-arm\"",
+ "cmakeFlags": "-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=armv7l -DCMAKE_HOST_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_PROCESSOR=x86_64",
+ "configureFlags": "--build=x86_64-unknown-linux-gnu --host=armv7l-unknown-linux-gnueabihf",
+ "crossFlags": "",
"depsBuildBuild": "",
"depsBuildBuildPropagated": "",
"depsBuildTarget": "",
@@ -26,42 +26,40 @@
"enableParallelBuilding": "1",
"enableParallelChecking": "1",
"enableParallelInstalling": "1",
- "mesonFlags": "",
+ "mesonFlags": "--cross-file=/nix/store/liv5rkz44z1cy77w4a92fg2ibnf852ng-cross-file.conf",
"name": "waf-setup-hook",
"nativeBuildInputs": "",
- "out": "/nix/store/zsfa3fvqinzllv8c1jiyjfjrlabdpzgi-waf-setup-hook",
+ "out": "/nix/store/ra8x0v1s6197y2k03wwggh11hmjhnzd4-waf-setup-hook",
"outputs": "out",
"passAsFile": "buildCommand",
"patches": "",
"propagatedBuildInputs": "",
"propagatedNativeBuildInputs": "",
- "stdenv": "/nix/store/x6rqmyq0ni35krzp3fs44k36dfin1zhn-stdenv-linux",
+ "stdenv": "/nix/store/ckraqx6fiwami5cg96gn5j266rdzqr7q-stdenv-linux",
"strictDeps": "1",
"system": "x86_64-linux",
- "waf": "/nix/store/syn1dhm73zd4d0jng4krqc17akwsmvb6-waf-2.0.26"
+ "waf": "/nix/store/h5bv4b0a65byh2lfinwndmg0jxc4013k-waf-armv7l-unknown-linux-gnueabihf-2.0.26"
},
"inputDrvs": {
"/nix/store/0sawbbskl41aq4ii9kl5w77r4m92das8-bash-5.2-p15.drv": [
"out"
],
- "/nix/store/1qxgnnxb8ggpgq84jhmgl8351a8v0h03-qemu-8.0.4.drv": [
+ "/nix/store/j0392zmavpa52y6yr32v6wi1v6n7grbc-waf-armv7l-unknown-linux-gnueabihf-2.0.26.drv": [
"out"
],
- "/nix/store/76krn5snp1b82i3d95sz11fpnqlkwrl3-waf-2.0.26.drv": [
- "out"
- ],
- "/nix/store/ks92ys95hq4c5aq5rqncl4qn9nak7haf-stdenv-linux.drv": [
+ "/nix/store/kpmcs593zvgcdsblr6fb1v27nhijnpzp-stdenv-linux.drv": [
"out"
]
},
"inputSrcs": [
"/nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh",
- "/nix/store/7hqndxkvykifrd4dbqvsi79xmxrpyxh0-setup-hook.sh"
+ "/nix/store/7hqndxkvykifrd4dbqvsi79xmxrpyxh0-setup-hook.sh",
+ "/nix/store/liv5rkz44z1cy77w4a92fg2ibnf852ng-cross-file.conf"
],
"name": "waf-setup-hook",
"outputs": {
"out": {
- "path": "/nix/store/zsfa3fvqinzllv8c1jiyjfjrlabdpzgi-waf-setup-hook"
+ "path": "/nix/store/ra8x0v1s6197y2k03wwggh11hmjhnzd4-waf-setup-hook"
}
},
"system": "x86_64-linux"You could work around these issues by adjusting the platform comparison and using more |
|
@lopsided98 can you test it now? |
|
@ofborg build pkgsCross.armv7l-hf-multiplatform.libjack2 |
|
Timeout failure :( |
|
@ofborg build pkgsCross.armv7l-hf-multiplatform.libjack2 |
|
Yay, it worked! |
|
@ofborg build pkgsCross.aarch64-multiplatform.tests.cc-wrapper
|
|
Ofborg shows that it fails, but I tested and rebased to staging locally and it worked. |
|
Actually, I'm trying this locally but still seeing infinite recursion issues. nix build .#pkgsCross.aarch64-multiplatform.ffmpeg -L |
|
likely caused by 5b0ed68 |
This reverts commit 9f52275. Caused breakage on staging-next (2023-09-07) due to the following error: ``` waf: error: no such option: --sbindir ``` Reverted on staging after the cut, refer to NixOS#252874
...into staging-next This is a topologically earlier remerge of PR #252874
|
https://nixpk.gs/pr-tracker.html?pr=252874 Shows that this still isn't in |
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)