L4Re: cannot find -lgcc_s
Hello, I've been trying to update my code to work with the latest L4Re sources, along with some older L4Re code that still resides in Subversion, but I seem to be encountering this error: mipsel-linux-gnu-ld: cannot find -lgcc_s: No such file or directory From what I can see, l4-bender is run to generate the appropriate invocation, but despite being supplied with numerous definitions... LD_PRELOAD=libgendep.so LD_LIBRARY_PATH=/home/paulb/Software/L4Re/LX20/l4/mybuild/tool/gendep/64::/home/paulb/Software/L4Re/LX20/l4/mybuild/tool/gendep GENDEP_TARGET=libsystypes.so GENDEP_BINARY=mipsel-linux-gnu-ld /home/paulb/Software/L4Re/LX20/l4/tool/bin/l4-bender --trace-exec --variant std -t ld -Dl4obj=/home/paulb/Software/L4Re/LX20/l4/mybuild -Dl4dir=/home/paulb/Software/L4Re/LX20/l4 -Dgcclibdir="/usr/lib/gcc-cross/mipsel-linux-gnu/12/ /usr/lib/gcc-cross/mipsel-linux-gnu/12/../../../../mipsel-linux-gnu/lib/mipsel-linux-gnu/12/ /usr/lib/gcc-cross/mipsel-linux-gnu/12/../../../../mipsel-linux-gnu/lib/mipsel-linux-gnu/ /usr/lib/gcc-cross/mipsel-linux-gnu/12/../../../../mipsel-linux-gnu/lib/../lib/ /lib/mipsel-linux-gnu/12/ /lib/mipsel-linux-gnu/ /lib/../lib/ /usr/lib/mipsel-linux-gnu/12/ /usr/lib/mipsel-linux-gnu/ /usr/lib/../lib/ /usr/lib/gcc-cross/mipsel-linux-gnu/12/../../../../mipsel-linux-gnu/lib/ /lib/ /usr/lib/" -Dl4system=mips_32r5 -Dl4api=l4f -Dlinker="mipsel-linux-gnu-ld -m elf32ltsmip --oformat elf32-tradlittlemips" --spec=/home/paulb/Software/L4Re/LX20/l4/mk/bid-bender.spec -- -MD -MF ./.libsystypes.so.pcs.d -o libsystypes.so -shared -PCcompiler-rt \ -EL -z noexecstack --hash-style=both -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/l4f -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/std base.s.o thread.s.o \ (The trailing backslash merely continues the command onto a blank line.) ...the command that is run doesn't find libgcc_s.so (and family): mipsel-linux-gnu-ld -m elf32ltsmip --oformat elf32-tradlittlemips -o libsystypes.so -nostdlib --eh-frame-hdr -shared -z noexecstack --hash-style=both -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/l4f -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain -L/home/paulb/Software/L4Re/LX20/l4/mybuild/lib/std -dT /home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain/main_rel.ld /home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain/crti.s.o /home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain/crtbeginS.o base.s.o thread.s.o -lgcc_s -lgcc -lgcc /home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain/crtendS.o /home/paulb/Software/L4Re/LX20/l4/mybuild/lib/mips_32r5/std/plain/crtn.s.o -EL And so it produces the error noted above. Some of the paths in gcclibdir are non-existent, but there are others that yield the appropriate libraries. It isn't unusual to have to modify something when catching up with the current sources: usually, packages are reorganised, certain details are changed, and so on. But has something changed in the way packages are meant to be described that might cause this? Paul
On 2026-11-02 11:12, Paul Boddie wrote:
I've been trying to update my code to work with the latest L4Re sources, along with some older L4Re code that still resides in Subversion, but I seem to be encountering this error:
mipsel-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
Just following up on this, if I explicitly build libgcc_s... make O=mybuild V=1 S=pkg/l4re-core/libgcc_s ...and then build the specific package that is failing, then it does get built. So, I am suspecting that the "requires" specification in my Control file is not causing the build order to be properly established. As a low-level library, it only depends on the following packages: l4re_c l4sys Is this no longer sufficient? Another thing, since I'm here: is it possible to make the build exit in a clean way and indicate the packages that caused errors, as opposed to having to peruse hundreds or even thousands of lines of output? This has constantly been a problem when developing for L4Re. Thanks for any help that might be offered, Paul
Hi Paul, On 2026-11-02 19:06, Paul Boddie wrote:
On 2026-11-02 11:12, Paul Boddie wrote:
I've been trying to update my code to work with the latest L4Re sources, along with some older L4Re code that still resides in Subversion, but I seem to be encountering this error:
mipsel-linux-gnu-ld: cannot find -lgcc_s: No such file or directory
Just following up on this, if I explicitly build libgcc_s...
make O=mybuild V=1 S=pkg/l4re-core/libgcc_s
...and then build the specific package that is failing, then it does get built. So, I am suspecting that the "requires" specification in my Control file is not causing the build order to be properly established. As a low-level library, it only depends on the following packages:
l4re_c l4sys
Is this no longer sufficient?
Interesting, that should still be enough. Just to be sure, you did a `make oldconfig` after the update in the root directory and did either a global make or did build the failing package with dependency resolution (so `make pkg/path/to/package` instead of `make S=pkg/path/to/pkg`)? Usually things like libgcc come in through the compiler-rt .pc file (see pc directory in the build dir) and depend on your config (i.e. if you use the toolchain libgcc or the ones from l4re-core). The compiler-rt should be pulled in by other packages, usually there is no need to directly depend on it. If oldconfig / dedicated make did not help, can your show me what the output value of the `CONFIG_COMPILER_RT_*` options are (see .config in the build dir). And check the dependency file in the build tree (.Package.deps). compiler-rt-shared should pull libgcc_s in, and your program that fails to link, likely links in shared mode (program with MODE=shared, or shared lib).
Another thing, since I'm here: is it possible to make the build exit in a clean way and indicate the packages that caused errors, as opposed to having to peruse hundreds or even thousands of lines of output? This has constantly been a problem when developing for L4Re.
Yes, I had some thoughts on that in the past. It is not straight forward, because the builds happen in parallel and there are multiple possible entry points to such parallel builds, but I might revisit that in the future. This would be helpful (and maybe even having a per pkg build log available for the failed packages). But I cannot make any promises on a timeline :)
Thanks for any help that might be offered,
I hope the ideas above already help. Please let me know more details if it doesn't. Best, - Marcus
Paul _______________________________________________ l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
participants (2)
-
Marcus Hähnel -
Paul Boddie