Build failure for sel4 on raspberry pi 5
Hi everyone, I am getting a link failure during the build of sel4test-tests: /usr/bin/ld: apps/sel4test-driver/musllibc/build-temp/stage/lib/libc.a(__stdio_exit.o): copy relocation against non-copyable protected symbol `__stdin_used' collect2: error: ld returned 1 exit status Searching t'interwebs seems to imply this is a gnarly problem caused by the nuances of various build tools - but one that should not apply to Arm. You can summarise everything I did before the build like this: sudo apt install ninja-build libxml2-utils repo pip3 install pyyaml typing hardware pyfdt jinja2 jsonschema six future ply python3-protobuf grpcio-tools cd && mkdir xxx && cd xxx Then to follow your build repo init -u https://github.com/seL4/sel4test-manifest.git repo sync mkdir build && cd build ../init-build.sh -DPLATFORM=bcm2711 ninja And yes I know it is not supported and the BCM2711 is for the Pi 4. I am evaluating ;) Any help greatly appreciated. Thanks, Smiley
"l4" == l4
writes:
l4> Hi everyone, I am getting a link failure during the build of l4> sel4test-tests: /usr/bin/ld: l4> apps/sel4test-driver/musllibc/build-temp/stage/lib/libc.a(__stdio_exit.o): l4> copy relocation against non-copyable protected symbol l4> `__stdin_used' collect2: error: ld returned 1 exit status This is an incompatibility between musllibc and recent binutils/gcc. The true fix is to upgrade to a more recent musllibc. https://github.com/seL4/musllibc/issues/19 tracks work on this, Just applying this commit: https://git.musl-libc.org/cgit/musl/commit/?id=d8f2efa708a027132d443f45a8c98... will get you further. -- Dr Peter Chubb https://trustworthy.systems/ Trustworthy Systems Group CSE, UNSW Core hours: Mon 8am-3pm; Wed: 8am-5pm; Fri 8am-12pm.
"Peter" == Peter Chubb via Devel
writes:
"l4" == l4
writes: l4> Hi everyone, I am getting a link failure during the build of l4> sel4test-tests: /usr/bin/ld: l4> apps/sel4test-driver/musllibc/build-temp/stage/lib/libc.a(__stdio_exit.o): l4> copy relocation against non-copyable protected symbol l4> `__stdin_used' collect2: error: ld returned 1 exit status
Peter> This is an incompatibility between musllibc and recent Peter> binutils/gcc. The true fix is to upgrade to a more recent Peter> musllibc. https://github.com/seL4/musllibc/issues/19 tracks Peter> work on this, Peter> Just applying this commit: Peter> https://git.musl-libc.org/cgit/musl/commit/?id=d8f2efa708a027132d443f45a8c98... Peter> will get you further. (you will also need the definition of 'hidden' from https://git.musl-libc.org/cgit/musl/commit/src/include/features.h?id=13d1afa... ) -- Dr Peter Chubb https://trustworthy.systems/ Trustworthy Systems Group CSE, UNSW Core hours: Mon 8am-3pm; Wed: 8am-5pm; Fri 8am-12pm.
Thanks for the suggestion but it didn't seem to make any difference. I saw on their git repo that master had the changes in the patch you linked to, so I built it myself locally. However I still get the same error in the same place. This is what I did cd xxx git clone https://git.musl-libc.org/git/musl cd musl ./configure make sudo make install Then reran the build ninja clean ninja Or have I got this wrong and the patch needs to be reversed because it came from a branch somewhere? Will keep digging. Thanks, Smiley
Ran into the same problem. I applied the patches Peter mentioned and a couple of other things, which allowed me to build. You can view the diff here: https://github.com/alwin-joshy/musllibc/tree/aos_workaround Alwin
participants (3)
-
l4@photiczone.com
-
Peter Chubb
-
z5257602@unsw.edu.au