Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] enabling libc.a generation
@ 2012-05-01  6:24 Eial Czerwacki
  2012-05-01  8:28 ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Eial Czerwacki @ 2012-05-01  6:24 UTC (permalink / raw)
  To: buildroot

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] enabling libc.a generation
  2012-05-01  6:24 [Buildroot] enabling libc.a generation Eial Czerwacki
@ 2012-05-01  8:28 ` Arnout Vandecappelle
  2012-05-01  8:45   ` Eial Czerwacki
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-05-01  8:28 UTC (permalink / raw)
  To: buildroot

On 05/01/12 08:24, Eial Czerwacki wrote:
> 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
-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] enabling libc.a generation
  2012-05-01  8:28 ` Arnout Vandecappelle
@ 2012-05-01  8:45   ` Eial Czerwacki
  2012-05-04 19:55     ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Eial Czerwacki @ 2012-05-01  8:45 UTC (permalink / raw)
  To: buildroot

On 05/01/2012 11:28 AM, Arnout Vandecappelle wrote:

> On 05/01/12 08:24, Eial Czerwacki wrote:
>> 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


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] enabling libc.a generation
  2012-05-01  8:45   ` Eial Czerwacki
@ 2012-05-04 19:55     ` Arnout Vandecappelle
  0 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-05-04 19:55 UTC (permalink / raw)
  To: buildroot

On 05/01/12 10:45, Eial Czerwacki wrote:
> 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

-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-04 19:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-01  6:24 [Buildroot] enabling libc.a generation Eial Czerwacki
2012-05-01  8:28 ` Arnout Vandecappelle
2012-05-01  8:45   ` Eial Czerwacki
2012-05-04 19:55     ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox