Dakota Crouchelli <[email protected]> writes: > Good day,
Hi! > The command errors out with what looks to be something related to > cross-compilation, so I suspect I may formatting the command wrong: > objcopy: Unable to recognise the format of the input file > `/tmp/guix-build-glibc-2.39.drv-0/build/libc_pic.os' I think cross-compilation in guix for glibc > 2.35 is broken. I can reproduce this error by doing: > ./pre-inst-env guix build --target=aarch64-linux-gnu [email protected] Note that [email protected] still builds without failing as you can verify yourself by running: > ./pre-inst-env guix build --target=aarch64-linux-gnu [email protected] --check [...] > /gnu/store/am4b42qlpfj5f33c1w1jacb8pxyz45p7-glibc-2.35-debug > /gnu/store/iq9ddvkxgpd109vxiy7xyz44zj7kmhzz-glibc-2.35 > /gnu/store/hjl3wkc21d86waqx2p308msfskkrs6ci-glibc-2.35-static If i have to guess, the error occures because the host machine native version of objcopy is run instead of the target version (as you can see by the missing aarch64-linux-gnu- prefix for the objcopy call) > objcopy @/tmp/guix-build-glibc-2.39.drv-0/build/libc_pic.opts > /tmp/guix-build-glibc-2.39.drv-0/build/libc_pic.os > /tmp/guix-build-glibc-2.39.drv-0/build/libc_pic.os.clean Looking at the package definition of version 2.35 of glibc (the working version) at gnu/packages/base.scm:1265 two patches are applied which, at least according to their names, seem relevant but are missing for version > 2.35: > "glibc-cross-objdump.patch" > "glibc-cross-objcopy.patch" ;must come 2nd I would assume, if you port these patches to version 2.39 the build will be successfull. I tried to simply apply these patches on version 2.39 but they result in conflicts. Unfortunatly i am too much of a autotools noob to fix these conflicts or even understand what is done in these patches at all. As a work around, you can try to compile with qemu instead of cross-compiling: > ./pre-inst-env guix build --system=aarch64-linux glibc However, this will be very slow. Maybe open an issue on codeberg, so that someone with more experience can look into it? -- Best regards Christoph Buck <[email protected]> GnuPG key: https://web.icepic.de/public_key.txt FingerPrint: B43F 4D2B 2017 E715 36C0 03C6 B8BB BCDE CD00 3305
