Hi Mathieu, Sorry for not replying earlier…
Mathieu Othacehe <m.othac...@gmail.com> skribis: > I'm digging up the --target option topic for guix system. I'd like to be > able at first to produce a cross-compiled disk-image as discussed here: > > https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00242.html > > Besides packages for whom cross-compilation is broken, I'm hitting a > problem that seems to be described here: > > https://lists.gnu.org/archive/html/bug-guix/2017-08/msg00140.html > > when running: > > guix system disk-image --target=arm-linux-gnueabihf config.scm --no-grafts > > Something forces the cross-compilation of make-boot0 which isn't > cross-compilable, even with grafting disabled (log attached). > > Any idea on how to investigate this? [...] > build of /gnu/store/nc2qbmv0c0mj7nflhpwjsvn3pqm4byab-make-boot0-4.2.1.drv > failed > View build log at > '/var/log/guix/drvs/nc/2qbmv0c0mj7nflhpwjsvn3pqm4byab-make-boot0-4.2.1.drv.bz2'. > cannot build derivation > `/gnu/store/27x086jl1pa585gjmbdrcki7szd5qc5s-bzip2-1.0.6.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/qdcqcc1701j8jk6w80gafpp1mscpkiji-coreutils-8.30.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/791bb2j5yr74ad2h4f020lmnv8l9s0b2-diffutils-3.6.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/knwahdlrmhnig8s77gfmfcqj7zwxap6v-findutils-4.6.0.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/dgc8pkrnsf35zr9bj7j8vwfwvs7jd2xq-gawk-4.2.1.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/q3yaljifyj5bcl4bbs78h7kj1fw7mv47-glibc-2.28.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/8jm8bah8cqwpbmcb7g2x9h1whbfk6j0w-grep-3.1.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/whsrmay3ddj2nifxvj8l7f2jqlil4vvy-gzip-1.9.drv': 1 dependencies > couldn't be built > building /gnu/store/b0j18x8b8jgyq5s581s2qv6bsdb804k4-modprobe.drv... > cannot build derivation > `/gnu/store/fh8xjdi7h8baqwhkhapldhfv62bbmda6-patch-2.7.6.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/bb1l5zb19nva2kvxxwy2z6zs5z9zvmr4-sed-4.5.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/qks66p38kj8vm99nr7qgpf26p57kbsb0-tar-1.30.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/9kp8pl1whm0f6wi7mfmkrmkhrbi4k7il-xz-5.2.4.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/mq8jaavjxmqfayfdwhvr4mxycw52wl6y-ca-certificate-bundle.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/bray04ln6qvpw7dd40li84i9k0v7mynx-fonts-dir.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/s167zzl6h92k72xb2f06jg4ai20mcfqp-info-dir.drv': 1 dependencies > couldn't be built > cannot build derivation > `/gnu/store/3fkw085xjia3p3gznk0hnw3rwn59992h-manual-database.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/vg73b8j47zgf71fg6547wa5hhz31v1l2-shepherd-nscd.scm.drv': 1 > dependencies couldn't be built > cannot build derivation > `/gnu/store/pbbd2zbixzla23fijbznnaz09wfx047j-profile.drv': 1 dependencies > couldn't be built > note: keeping build directory `/tmp/guix-build-modprobe.drv-6' > cannot build derivation > `/gnu/store/nr5qprp6n0gggw2ym7cgn9pzwhjry9s1-shepherd.conf.drv': 1 > dependencies couldn't be built > building > /gnu/store/gnmiac4byjlr875lqy28fvndvkdfrpva-module-import-compiled.drv... > cannot build derivation > `/gnu/store/qbwkrj7v4dgwzfh9cjizv9zgcmkpswnx-system.drv': 1 dependencies > couldn't be built > note: keeping build directory `/tmp/guix-build-module-import-compiled.drv-6' > cannot build derivation > `/gnu/store/l45gylnvs8cv2nd35i86z6nqg598x4kf-disk-image.drv': 1 dependencies > couldn't be built > guix system: error: build of > `/gnu/store/l45gylnvs8cv2nd35i86z6nqg598x4kf-disk-image.drv' failed Could you do it with --max-jobs=1 so we get a clearer view of the chain of derivations that’s failing? To test system cross-compilation, I suggest starting from a trimmed list for the ‘packages’ list, smaller than ‘%base-packages’. I’m guessing that all the packages added there with ‘canonical-package’ are the cause of the problem (‘make-boot0’ being cross-compiled.) You can reproduce this problem like this: guix build -e '(@@ (gnu packages commencement) coreutils-final)' \ --target=arm-linux-gnueabihf --no-grafts (‘coreutils-final’ is the same as (canonical-package coreutils).) So if you remove these, that should work. HTH! Ludo’.