uclibc

Gregory Fleischer (Lists) gfleischer.lists at gmail.com
Wed Jan 16 21:09:43 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 16, 2008, at 9:05 AM, Chris Buxton wrote:

> Here is the command that apparently failed (it's a long one):
>
>  /usr/src/butterfly/butterfly-build/./gcc/xgcc -shared-libgcc -B/ 
> usr/src/butterfly/butterfly-build/./gcc -nostdinc++ -L/usr/src/ 
> butterfly/butterfly-build/i686-pc-linux-uclibc/libstdc++-v3/src -L/ 
> usr/src/butterfly/butterfly-build/i686-pc-linux-uclibc/libstdc++-v3/ 
> src/.libs -B/usr/i686-pc-linux-uclibc/bin/ -B/usr/i686-pc-linux- 
> uclibc/lib/ -isystem /usr/i686-pc-linux-uclibc/include -isystem / 
> usr/i686-pc-linux-uclibc/sys-include -L/usr/src/butterfly/butterfly- 
> build/./ld -shared -nostdlib /usr/lib/gcc/../crti.o /usr/src/ 
> butterfly/butterfly-build/./gcc/crtbeginS.o  .libs/ 
> bitmap_allocator.o .libs/pool_allocator.o .libs/ 
> mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/ 
> complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/ 
> functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ 
> ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/ 
> limits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/ 
> locale_facets.o .libs/localename.o .libs/stdexcept.o
>   .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/ 
> concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios- 
> inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/ 
> istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc- 
> inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf- 
> inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray- 
> inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/ 
> atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ 
> ctype_members.o .libs/messages_members.o .libs/ 
> monetary_members.o .libs/numeric_members.o .libs/ 
> time_members.o .libs/basic_file.o .libs/c++locale.o -Wl,--whole- 
> archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc+ 
> +convenience.a /usr/lib/libssp_nonshared.a /usr/lib/ 
> libssp_nonshared.a /usr/lib/libssp_nonshared.a -Wl,--no-whole- 
> archive  -L/usr/src/butterfly/butterfly-build/i686-pc-linux-uclibc/ 
> libstdc++-v3/src -L/usr/src/butterfly/butterfly-build/i686-pc-linux- 
> uclibc/libstdc++-v3/src/.l
>  ibs -L/usr/src/butterfly/butterfly-build/./ld -lm ../libmath/.libs/ 
> libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/usr/ 
> src/butterfly/butterfly-build/./gcc -L/usr/lib/gcc/.. -lgcc_s -lc - 
> lc -lgcc_s -lm /usr/lib/libssp_nonshared.a /usr/lib/libssp.so - 
> lgcc_s /lib/libintl.so -lc -lgcc_s   /usr/src/butterfly/butterfly- 
> build/./gcc/crtendS.o /usr/lib/gcc/../crtn.o  -Wl,-O1 -Wl,-z - 
> Wl,relro -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname - 
> Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.8
>
> And here are the error messages after that:
>
> /usr/lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o): In  
> function `__stack_chk_fail_local':
> ../ssp-local.c:48: multiple definition of `__stack_chk_fail_local'
> /usr/lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):../ssp- 
> local.c:48: first defined here
> /usr/lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o): In  
> function `__stack_chk_fail_local':
> ../ssp-local.c:48: multiple definition of `__stack_chk_fail_local'
> /usr/lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):../ssp- 
> local.c:48: first defined here
> collect2: ld returned 1 exit status
> make[4]: Leaving directory `/usr/src/butterfly/butterfly-build/i686- 
> pc-linux-uclibc/libstdc++-v3/src'
> make[4]: *** [libstdc++.la] Error 1
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/usr/src/butterfly/butterfly-build/i686- 
> pc-linux-uclibc/libstdc++-v3'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/usr/src/butterfly/butterfly-build/i686- 
> pc-linux-uclibc/libstdc++-v3'
> make[1]: Leaving directory `/usr/src/butterfly/butterfly-build'
>

I've seen this error before, and it was related to the fact that  
libssp_nonshared.a is being included multiple when being linked into  
libstdc++.so.  If one examines the command carefully,  
libssp_nonshared.a is listed multiple times as arguments following "- 
Wl,--whole-archive".

When I encountered it, I eventually determined that there was a  
problem with the dependency detection in ltcf-cxx.sh for libstdc++- 
v3.  I was able to workaround this issue by running the following  
commands against the source to "fix" the problem:

      echo 'postdeps="${postdeps//-lssp_nonshared}"' >> ltcf-cxx.sh
      echo 'postdeps="${postdeps//-lssp}"' >> ltcf-cxx.sh
      sed -i.orig -e 's@\$(LIBS)@& -lssp_nonshared -lssp@' \
          ./libstdc++-v3/src/Makefile.in

Hope that helps.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHjuMYWbVJrJm/lrsRApZXAJsEfqOJFiFhDAIDQH3mghw5rzB7UQCgnezr
GYomZlA+uHIJViqHfAaQkp0=
=yZcP
-----END PGP SIGNATURE-----



More information about the hlfs-dev mailing list