enabling libc.a generation
Hello All,
I have a little issue, while trying to compile a small file within a buildroot generated env, I get this:/usr/lib/gcc/i686-unknown-linux-uclibc/4.2.4/../../../../i686-unknown-linux-uclibc/bin/ld:
cannot find -lc
collect2: ld returned 1 exit status
asking google suggest I'm missing libc.a, where I can enable it?
Thanks.
Quoted 5 lines · Eial Czerwacki
I have a little issue, while trying to compile a small file within a buildroot generated env, I get this:
/usr/lib/gcc/i686-unknown-linux-uclibc/4.2.4/../../../../i686-unknown-linux-uclibc/bin/ld:
cannot find -lc
collect2: ld returned 1 exit status
It would help if you at least specified the command you used to start
the link. You can also add the -v option to gcc to see the exact parameters of the call to ld, including the search path.
libc.a and libc.so should be present in output/staging/usr/lib. But I
see you're calling a gcc in /usr... Is this a compiler running on the target? In that case, you should have libc.so and libc.a in /usr/lib.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Quoted 12 lines · Arnout Vandecappelle
Quoted 6 lines · Eial Czerwacki
I have a little issue, while trying to compile a small file within a buildroot generated env, I get this:
/usr/lib/gcc/i686-unknown-linux-uclibc/4.2.4/../../../../i686-unknown-linux-uclibc/bin/ld:cannot find -lc
collect2: ld returned 1 exit statusIt would help if you at least specified the command you used to start
the link. You can also add the -v option to gcc to see the exact parameters of the call to ld, including the search path.
Quoted 6 lines
libc.a and libc.so should be present in output/staging/usr/lib. But I
see you're calling a gcc in /usr... Is this a compiler running on the target? In that case, you should have libc.so and libc.a in/usr/lib.Regards,
Arnout
Hello Arnout,
I have chroot which was created using buildroot, I'm chrooting into it an run a simple compilation, e.g sh-4.1# gcc test.c -o test
here is the output gcc -v:
Using built-in specs.
Target: i686-unknown-linux-uclibc
Configured with:/home/envdev/buildroot/output/toolchain/gcc-4.2.4/configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-unknown-linux-uclibc --target=i686-unknown-linux-uclibc --enable-languages=c --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --enable-target-optspace --disable-libgomp --with-gnu-ld --disable-libssp --disable-multilib --enable-tls --enable-shared --disable-nls --enable-threads --with-arch=i686 --with-tune=i686 --disable-largefile
Thread model: posix
gcc version 4.2.4
as for libc.so, here is the relevant output:
sh-4.1# find . -name "libc*"./lib/libcrypt.so.0./lib/libc.so.0./lib/libcrypt-0.9.32.so./usr/include/bits/libc-lock.h./usr/lib/libcurses.a
sh-4.1# ls -l ./lib/libc.so.0
lrwxrwxrwx 1 root root 19 Apr 30 23:57 ./lib/libc.so.0
-> libuClibc-0.9.32.so
Eial.
Quoted 7 lines · Eial Czerwacki
as for libc.so, here is the relevant output:
sh-4.1# find . -name "libc*"./lib/libcrypt.so.0./lib/libc.so.0./lib/libcrypt-0.9.32.so./usr/include/bits/libc-lock.h./usr/lib/libcurses.a
Right, so no libc.so or libc.a...
These files are copied into or removed from the target fs depending on
the status of the BR2_HAVE_DEVFILES option. This option must be enabled, otherwise it is impossible to select the BR2_PACKAGE_GCC_TARGET option.
However, the copying of libc.so and libc.a happens at the time the
cross-toolchain is built. If you enable BR2_HAVE_DEVFILES afterwards, it will have no effect. Perhaps you didn't do a clean build after reconfiguring buildroot?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F