uclibc

Chris Buxton cbuxton at menandmice.com
Thu Jan 17 14:09:59 PST 2008


Hello Gregory,

Thanks for the tip. That seems to have gotten me past that linking error and on to the next error in the building of libstdc++-v3. :\

I'll post information about that once any easy problems are answered (like the missing /bin/sed - a symlink should solve that).

Chris Buxton
Professional Services
Men & Mice
Address: Noatun 17, IS-105, Reykjavik, Iceland
Phone:   +354 412 1500
Email:   cbuxton at menandmice.com
www.menandmice.com
 
Men & Mice
We bring control and flexibility to network management
 
This e-mail and its attachments may contain confidential and privileged information only intended for the person or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any retention, dissemination, distribution or copy of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify us immediately by reply e-mail and immediately delete this message and all its attachment.

----- Original Message -----
From: "Gregory Fleischer (Lists)" <gfleischer.lists at gmail.com>
To: "Hardened LFS Development List" <hlfs-dev at linuxfromscratch.org>
Sent: Wednesday, January 16, 2008 9:09:43 PM (GMT-0800) America/Los_Angeles
Subject: Re: uclibc

-----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-----
-- 
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page




More information about the hlfs-dev mailing list