Error linking binutils statically (was: svn commit: trunk/uClibc)

Jan-Benedict Glaw jbglaw at lug-owl.de
Sun Dec 11 18:09:15 UTC 2005


On Sun, 2005-12-11 14:21:41 +0000, Mike Frysinger <vapier at gentoo.org> wrote:
> On Sun, Dec 11, 2005 at 12:01:12PM +0100, Jan-Benedict Glaw wrote:
> > $ CC=vax-linux-uclibc-gcc LDFLAGS=-static CFLAGS=-static ../configure 
> >   --host=vax-linux-uclibc --build=i686-pc-linux-gnu
> >   --target=vax-linux-uclibc --prefix=/usr
> 
> why are you overloading CC ?  the configure scripts should handle that
> part for you

You're right. I've removed that part from my build script.

> also, does --enable-static --disable-shared work instead of setting
> CFLAGS/LDFLAGS ?

Nope. Same error as previously noted.

> > vax-linux-uclibc-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -o size size.o bucomm.o version.o filemode.o  ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
> > bucomm.o: In function `make_tempname':bucomm.c:(.text+0xae2): warning: 
> > /home/jbglaw/vax-linux/scm/build-20051210-224523-vax-linux-uclibc/install/usr/lib/gcc/vax-linux-uclibc/4.2.0/../../../../vax-linux-uclibc/lib/libc.a(strncmp.o): In function `strncmp':strncmp.c:(.text+0x0): multiple definition of `strncmp'
> > ../libiberty/libiberty.a(strncmp.o):strncmp.c:(.text+0x0): first defined here
> > /home/jbglaw/vax-linux/scm/build-20051210-224523-vax-linux-uclibc/install/usr/lib/gcc/vax-linux-uclibc/4.2.0/../../../../vax-linux-uclibc/bin/ld: Warning: size of symbol `strncmp' changed from 82 in ../libiberty/libiberty.a(strncmp.o) to 176 in /home/jbglaw/vax-linux/scm/build-20051210-224523-vax-linux-uclibc/install/usr/lib/gcc/vax-linux-uclibc/4.2.0/../../../../vax-linux-uclibc/lib/libc.a(strncmp.o)
> > collect2: ld returned 1 exit status
> 
> strncmp shouldnt have been built into libiberty afaik ...

This is a fragment of libiberty's configure:
---------------------------------------------------------
echo "$as_me:$LINENO: checking for working strncmp" >&5
echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
if test "${ac_cv_func_strncmp_works+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_strncmp_works=no
else
  cat >conftest.$ac_ext <<_ACEOF
:
:
:
---------------------------------------------------------

So in the case of cross-compilation, strncmp() is always build...

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20051211/b3070865/attachment-0002.pgp 


More information about the uClibc mailing list