-
-
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
The NixOS SD image cannot be cross-compiled #106759
Comments
For Mesa, you will need something to do something like de3f4fe |
See mesonbuild/meson#7453 for the lack of upstream functionality which is why we keep on hitting this issue with packages using Meson. |
We do have a job for mesa: https://hydra.nixos.org/job/nixpkgs/cross-trunk/rpi.mesa.x86_64-linux |
^ Mesa fix and spidermonkey bug report Spidermonkey isn't too critical since that's only needed for the manual and should hopefully not stay a dependency for too long. |
^ New spidermonkey bug report. Turns out polkit (and therefore also udisks) depends on in, so we can't skip it either. However, with:
and merging open fixes locally, I was at least able to build an sdcard image! |
Also worth noting, although it doesn't prevent cross-compilation: b3640e0 results in a separate libbfd, and therefore llvm, being built when target = aarch32, despite both of those tools being target-agnostic. |
@Gaelan we can make that patch unconditional on staging, I suppose. |
At least the aarch64 sd image did build in #108173. |
$ nix-build channel:nixos-unstable -A pkgsCross.armv7l-hf-multiplatform.nix
these 2 derivations will be built:
/nix/store/9a2fjmigyqab2qfzi2m84dixi0inpfbn-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf.drv
/nix/store/1ssspmj2bvf6l7kavpcihlimd47wyx97-nix-2.3.10-armv7l-unknown-linux-gnueabihf.drv
building '/nix/store/9a2fjmigyqab2qfzi2m84dixi0inpfbn-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf.drv'...
unpacking sources
unpacking source archive /nix/store/pwgmmhrfzq8ymbyck3jbd7jpqkk9j6xp-source
source root is source
patching sources
applying patch /nix/store/frvfi397b88f6c91p371z5r2940x005p-cmake-dirs.patch
patching file cmake/AWSSDKConfig.cmake
Hunk #1 succeeded at 86 (offset -11 lines).
patching file cmake/utilities.cmake
Hunk #1 succeeded at 39 (offset -4 lines).
Hunk #2 succeeded at 54 (offset -4 lines).
patching file toolchains/pkg-config.pc.in
applying patch /nix/store/yf9794whcciambbhx6vms7vhyj4mpsga-aws-sdk-cpp-TransferManager-ContentEncoding.patch
patching file aws-cpp-sdk-transfer/include/aws/transfer/TransferHandle.h
patching file aws-cpp-sdk-transfer/include/aws/transfer/TransferManager.h
patching file aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp
updateAutotoolsGnuConfigScriptsPhase
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DBUILD_TESTING=OFF -D
CMAKE_INSTALL_LOCALEDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-
cpp-1.8.113-armv7l-unknown-linux-gnueabihf/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/nlgw
7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/share/doc/aws-cpp-sdk-all -DCMAKE_INSTALL_INFODIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-li
nux-gnueabihf/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/knf9jzldjcly49jck
8y8pic54sygn13n-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf-dev/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/knf9jzldjcly49jck8y8pic54sygn13n-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf-dev/includ
e -DCMAKE_INSTALL_SBINDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.11
3-armv7l-unknown-linux-gnueabihf/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYS
ROOT= -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/abj35mb9qx0494jbik029r9h1ck7siqr-armv7l-unknown-linux-gnueabihf-binutils-2.34/bin/armv7l-unknown-linux-gnueabihf-strip
-DCMAKE_RANLIB=/nix/store/abj35mb9qx0494jbik029r9h1ck7siqr-armv7l-unknown-linux-gnueabihf-binutils-2.34/bin/armv7l-unknown-linux-gnueabihf-ranlib -DCMAKE_AR=/nix/store/abj35mb9qx0494jbik029r9h1ck7siqr-armv7l-unk
nown-linux-gnueabihf-binutils-2.34/bin/armv7l-unknown-linux-gnueabihf-ar -DCMAKE_C_COMPILER=armv7l-unknown-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=armv7l-unknown-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/nix/
store/nlgw7vh3nrzcjcswfzkb5lrbpckmddw1-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf -DBUILD_DEPS=OFF -DCMAKE_SKIP_BUILD_RPATH=OFF -DCUSTOM_MEMORY_MANAGEMENT=0 -DENABLE_TESTING=OFF -DCURL_HAS_H2=0 -DBUILD_O
NLY=s3;transfer -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=armv7l -DCMAKE_HOST_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_PROCESSOR=x86_64
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- TARGET_ARCH not specified; inferring host OS to be platform compilation target
-- Building AWS libraries as shared objects
-- Generating linux build config
-- Building project version: 1.8.113
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/8md3fz3fsa7i4n32v34wiwxpr8nkx3cv-armv7l-unknown-linux-gnueabihf-stage-final-gcc-debug-wrapper-10.2.0/bin/armv7l-unknown-linux-gnueabihf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /nix/store/j5j26f5vb79f1k1dm2yyf33z0pmfmsm3-zlib-1.2.11-armv7l-unknown-linux-gnueabihf/lib/libz.so (found version "1.2.11")
-- Zlib library: /nix/store/j5j26f5vb79f1k1dm2yyf33z0pmfmsm3-zlib-1.2.11-armv7l-unknown-linux-gnueabihf/lib/libz.so
-- Encryption: Openssl
-- Found OpenSSL: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so (found version "1.1.1i")
-- Openssl include directory: /nix/store/2k6z1k39pfz6yggcnl0xamxnj96qi3m6-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf-dev/include
-- Openssl library: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libssl.so;/nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnuea
bihf/lib/libcrypto.so
-- Http client: Curl
-- Found CURL: /nix/store/379nw3zfwah0jcmzih1d9z8wyqis7z9f-curl-7.74.0-armv7l-unknown-linux-gnueabihf/lib/libcurl.so (found version "7.74.0")
-- Curl include directory: /nix/store/5498i8ywdkk7phy804lx8q7dxdcp6b6i-curl-7.74.0-armv7l-unknown-linux-gnueabihf-dev/include
-- Curl library: /nix/store/379nw3zfwah0jcmzih1d9z8wyqis7z9f-curl-7.74.0-armv7l-unknown-linux-gnueabihf/lib/libcurl.so
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC
-- Performing Test HAVE_ATOMICS_WITHOUT_LIBATOMIC - Success
-- Considering s3
-- Considering transfer
-- Looking for pathconf
-- Looking for pathconf - found
-- Looking for umask
-- Looking for umask - found
-- The C compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/8md3fz3fsa7i4n32v34wiwxpr8nkx3cv-armv7l-unknown-linux-gnueabihf-stage-final-gcc-debug-wrapper-10.2.0/bin/armv7l-unknown-linux-gnueabihf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Updating version info to 1.8.113
-- Custom memory management disabled
-- Performing Test CURL_HAS_TLS_PROXY
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
CURL_HAS_TLS_PROXY_EXITCODE (advanced)
CURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT (advanced)
For details see /build/source/build/TryRunResults.cmake
-- Performing Test CURL_HAS_TLS_PROXY - Failed
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found LibCrypto: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Include Dir: /nix/store/2k6z1k39pfz6yggcnl0xamxnj96qi3m6-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf-dev/include
-- LibCrypto Shared Lib: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Static Lib: LibCrypto_STATIC_LIBRARY-NOTFOUND
-- LibCrypto Include Dir: /nix/store/2k6z1k39pfz6yggcnl0xamxnj96qi3m6-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf-dev/include
-- LibCrypto Shared Lib: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Static Lib: LibCrypto_STATIC_LIBRARY-NOTFOUND
-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
See also "/build/source/build/CMakeFiles/CMakeError.log".
error: --- Error --- nix-daemon
builder for '/nix/store/9a2fjmigyqab2qfzi2m84dixi0inpfbn-aws-sdk-cpp-1.8.113-armv7l-unknown-linux-gnueabihf.drv' failed with exit code 1; last 10 log lines:
-- Found LibCrypto: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Include Dir: /nix/store/2k6z1k39pfz6yggcnl0xamxnj96qi3m6-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf-dev/include
-- LibCrypto Shared Lib: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Static Lib: LibCrypto_STATIC_LIBRARY-NOTFOUND
-- LibCrypto Include Dir: /nix/store/2k6z1k39pfz6yggcnl0xamxnj96qi3m6-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf-dev/include
-- LibCrypto Shared Lib: /nix/store/xfhz0rvqfyja4pxnlv29c649cdyx4vdq-openssl-1.1.1i-armv7l-unknown-linux-gnueabihf/lib/libcrypto.so
-- LibCrypto Static Lib: LibCrypto_STATIC_LIBRARY-NOTFOUND
-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
See also "/build/source/build/CMakeFiles/CMakeError.log".
error: --- Error --- nix-build
1 dependencies of derivation '/nix/store/1ssspmj2bvf6l7kavpcihlimd47wyx97-nix-2.3.10-armv7l-unknown-linux-gnueabihf.drv' failed to build |
This is a recent regression.
This seems to have been caused by some of these aws changes not have been verified to work in cross, introduced in #107623. |
Cross-compiling $ nix-build channel:nixos-unstable -A pkgsCross.armv7l-hf-multiplatform.glibc
these 6 derivations will be built:
/nix/store/3j5j5snlqidzvp8xd51g28rdna4ff5kp-glibc-2.32-25-armv7l-unknown-linux-gnueabihf.drv
/nix/store/c1k68cb9jppl6sivc5disj3cq7g9jj8i-armv7l-unknown-linux-gnueabihf-binutils-wrapper-2.35.1.drv
/nix/store/dbiidvkq2drm91i7sgrg540snl1igih6-armv7l-unknown-linux-gnueabihf-stage-final-gcc-debug-10.2.0.drv
/nix/store/vpfl7h9bif24l81iksmzn4n6rcn63jg6-armv7l-unknown-linux-gnueabihf-stage-final-gcc-debug-wrapper-10.2.0.drv
/nix/store/4jrv5a948p39q5n7jc1vaq1wy4n8v1m4-stdenv-linux.drv
/nix/store/as1n8v21m351rlrpqf169grxr5aa4gsa-glibc-2.32-25-armv7l-unknown-linux-gnueabihf.drv
building '/nix/store/3j5j5snlqidzvp8xd51g28rdna4ff5kp-glibc-2.32-25-armv7l-unknown-linux-gnueabihf.drv'...
unpacking sources
unpacking source archive /nix/store/yl0acs9vzng0cd4qfdcgb3zpwjm034nw-glibc-2.32.tar.xz
source root is glibc-2.32
setting SOURCE_DATE_EPOCH to timestamp 1596593820 of file glibc-2.32/wctype/wctype_l.c
patching sources
applying patch /nix/store/43dy13j5z8s53xxyrl763wc14cq98ank-2.32-25.patch.gz
.........
a - elf/dl-profstub.os
a - elf/dl-libc.os
a - elf/dl-sym.os
a - elf/dl-error.os
a - elf/libc_early_init.os
a - elf/aeabi_unwind_cpp_pr1.os
a - elf/find_exidx.os
armv7l-unknown-linux-gnueabihf-gcc dl-lookup.c -c -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -Wstrict-prototypes -Wold-style-definition -fmath-errno -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0 -fexceptions -fasynchronous-unwind-tables -ftls-model=initial-exec -I../include -I/build/build/elf -I/build/build -I../sysdeps/unix/sysv/linux/arm/le -I../sysdeps/unix/sysv/linux/arm -I../sysdeps/arm/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm/le/armv7/multiarch -I../sysdeps/arm/armv7/multiarch -I../sysdeps/arm/le/armv7 -I../sysdeps/arm/armv7 -I../sysdeps/arm/armv6t2 -I../sysdeps/arm/armv6 -I../sysdeps/arm/le -I../sysdeps/arm/include -I../sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /nix/store/8cxq0frw1lwkfv1whzg87xz22yw7mgpk-armv7l-unknown-linux-gnueabihf-stage-static-gcc-debug-10.2.0/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/include -isystem /nix/store/8cxq0frw1lwkfv1whzg87xz22yw7mgpk-armv7l-unknown-linux-gnueabihf-stage-static-gcc-debug-10.2.0/lib/gcc/armv7l-unknown-linux-gnueabihf/10.2.0/include-fixed -isystem /nix/store/3wdvnp51dv9v6r56zadj150x5vbw8i7r-linux-headers-5.10.4/include -D_LIBC_REENTRANT -include /build/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /build/build/elf/dl-lookup.o -MD -MP -MF /build/build/elf/dl-lookup.o.dt -MT /build/build/elf/dl-lookup.o
armv7l-unknown-linux-gnueabihf-gcc -nostdlib -nostartfiles -r -o /build/build/libc_pic.os \
-Wl,-d -Wl,--whole-archive /build/build/libc_pic.a -o /build/build/libc_pic.os
armv7l-unknown-linux-gnueabihf-gcc -nostdlib -nostartfiles -r -o /build/build/elf/librtld.map.o -Wl,--defsym=calloc=0 -Wl,--defsym=free=0 -Wl,--defsym=malloc=0 -Wl,--defsym=realloc=0 -Wl,--defsym=__stack_chk_fail=0 -Wl,--defsym=__stack_chk_fail_local=0 \
'-Wl,-(' /build/build/elf/dl-allobjs.os /build/build/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/build/build/elf/librtld.mapT
/nix/store/ix71adklpdq04c8hkjks4xyiamx6la9h-armv7l-unknown-linux-gnueabihf-binutils-2.35.1/bin/armv7l-unknown-linux-gnueabihf-ld: /build/build/libc_pic.a: error adding symbols: archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:525: /build/build/elf/librtld.map] Error 1
make[2]: Leaving directory '/build/glibc-2.32/elf'
make[1]: *** [Makefile:470: elf/subdir_lib] Error 2
make[1]: Leaving directory '/build/glibc-2.32'
make: *** [Makefile:9: all] Error 2
error: --- Error --- nix-daemon
builder for '/nix/store/3j5j5snlqidzvp8xd51g28rdna4ff5kp-glibc-2.32-25-armv7l-unknown-linux-gnueabihf.drv' failed with exit code 2; last 10 log lines:
-Wl,-d -Wl,--whole-archive /build/build/libc_pic.a -o /build/build/libc_pic.os
armv7l-unknown-linux-gnueabihf-gcc -nostdlib -nostartfiles -r -o /build/build/elf/librtld.map.o -Wl,--defsym=calloc=0 -Wl,--defsym=free=0 -Wl,--defsym=malloc=0 -Wl,--defsym=realloc=0 -Wl,--defsym=__stack_chk_fail=0 -Wl,--defsym=__stack_chk_fail_local=0 \
'-Wl,-(' /build/build/elf/dl-allobjs.os /build/build/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/build/build/elf/librtld.mapT
/nix/store/ix71adklpdq04c8hkjks4xyiamx6la9h-armv7l-unknown-linux-gnueabihf-binutils-2.35.1/bin/armv7l-unknown-linux-gnueabihf-ld: /build/build/libc_pic.a: error adding symbols: archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:525: /build/build/elf/librtld.map] Error 1
make[2]: Leaving directory '/build/glibc-2.32/elf'
make[1]: *** [Makefile:470: elf/subdir_lib] Error 2
make[1]: Leaving directory '/build/glibc-2.32'
make: *** [Makefile:9: all] Error 2
error: --- Error ---------------------------------------------------- nix-build
1 dependencies of derivation '/nix/store/as1n8v21m351rlrpqf169grxr5aa4gsa-glibc-2.32-25-armv7l-unknown-linux-gnueabihf.drv' failed to build I think it was broken at least starting from this evaluation: https://hydra.nixos.org/eval/1643415 |
I wouldn't test building
|
What do you mean? When i cross-compiling SD image on $ nix-build channel:nixos-unstable -A pkgsCross.armv7l-hf-multiplatform.glibc
this path will be fetched (5.66 MiB download, 26.17 MiB unpacked):
/nix/store/74axx8fiqavhlpvhvna0akmdwx89jf5f-glibc-2.32-25-armv7l-unknown-linux-gnueabihf
copying path '/nix/store/74axx8fiqavhlpvhvna0akmdwx89jf5f-glibc-2.32-25-armv7l-unknown-linux-gnueabihf' from 'https://cache.nixos.org'...
/nix/store/74axx8fiqavhlpvhvna0akmdwx89jf5f-glibc-2.32-25-armv7l-unknown-linux-gnueabihf |
With reverted 9a4e098 it builds on EDIT: after proper testing I have found that reverting 9a4e098 does not actually fix anything. EDIT2: Looks like 306aefd is the real culprit. |
Does it build on staging (glibc 2.32-35)? |
@TredwellGit I was able to build
|
|
It doesn't, but with |
The static gcc regression ssems to have been sorted out, now it's #112173, which already should be fixed on staging-next. |
Just dropping in to confirm @misuzu's results.
`git bisect log`
|
Talloc now also cross-builds, as mentioned in the issue. |
ZFS is now broken. This builds now though: { lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform-installer.nix>
];
boot.kernelPackages = lib.mkForce pkgs.linuxPackages;
# Everything but ZFS
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" "vfat" ];
nixpkgs = {
crossSystem = lib.systems.examples.armv7l-hf-multiplatform;
localSystem = { system = "x86_64-linux"; };
};
} |
Question: How do you build this? I tried Edit: my configuration.nix:
Something is probably wrong there, since the configuration.nix atemu posted works fine. The error I get with /run/current-system/sw/bin/nixos-rebuild: line 175: /tmp/nixos-rebuild.zSouvL/nix/bin/nix-build: cannot execute binary file: Exec format error |
The second command should work. Try with |
|
On latest master (52c1e64), I don't see issues with
Built with: |
this builds {
description = "cross-compile the sd-image-aarch64 on x86_64-linux to aarch64-multiplatform";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: {
nixosConfigurations.cross-vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, lib, modulesPath, ... }: {
nixpkgs = {
crossSystem = lib.systems.examples.aarch64-multiplatform;
};
imports = [ (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") ];
users.mutableUsers = false;
users.users.root = {
password = "root";
};
users.users.user = {
password = "user";
isNormalUser = true;
extraGroups = [ "wheel" ];
};
system.stateVersion = "22.05";
})
];
};
packages.x86_64-linux.default = self.nixosConfigurations.cross-vm.config.system.build.sdImage;
};
} |
NixOS/nixpkgs#106759 (comment) input 'nixpkgs': 'github:NixOS/nixpkgs/0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb' (2022-07-02)
Describe the bug
A clear and concise description of what the bug is.
Neither unstable, nor 20.09 can be cross compiled to armv7. I haven't tested aarch64 recently but, a few weeks back, it was just as broken.
Packages that don't cross compile anymore:
gobject-introspection (possibly fixed by WIP: gobject-introspection: Support cross #88222)(still broken but has been removed from the closure)Additional context
Add any other context about the problem here.
Simplest configuration.nix you should be able to build:
(Could this become a hydra job?)
Notify maintainers
@Ericson2314 @matthewbauer
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: