uclibc

Chris Buxton cbuxton at menandmice.com
Wed Jan 16 16:08:52 PST 2008


Well, disabling the building of static libraries during the butterfly toolchain did not fix it - I got the exact same error when building the shared libraries.

Let me ask a few questions, if you will indulge me:

1. What is the purpose of building the gcc ssp library essentially right before building gcc itself? One of my guesses in trying to interpret the error message I posted (below) is that there is a conflict between the installed libssp and the one it's just built. (Is there a way to disable the rebuilding of libssp during the butterfly toolchain?)

2. In the "re-adjusting the toolchain" step, which comes between building libssp and the rest of gcc, there is this definition:

export CONFIG_SITE=/usr/share/config.site

Is it important that this environment variable be carried to later steps? The package user system tends to preclude this, though of course I could adjust the package skeleton, once this step is completed, to redefine this variable for each package user.

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: "Chris Buxton" <cbuxton at menandmice.com>
To: "Hardened LFS Development List" <hlfs-dev at linuxfromscratch.org>
Sent: Wednesday, January 16, 2008 7:05:16 AM (GMT-0800) America/Los_Angeles
Subject: Re: uclibc

Robert,

In this old post of yours, below, you said that nothing in HLFS is built statically. But in trying to figure out why the butterfly toolchain build failed, I saw that the error message involves a static libraries - it appears to be trying to build a static libstc++ (if I'm reading it right - I'm not a programmer), using the static libssp_nonshared that was built earlier during the gcc-libssp step.

I'm using the uClibc/kernel 2.6 book from 20080108, with package users. If you need more of the build log, I have it all (one great advantage of the package user system).

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'

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: "Robert Connolly" <robert at linuxfromscratch.org>
To: hlfs-dev at linuxfromscratch.org
Sent: Wednesday, December 26, 2007 2:11:39 PM (GMT-0800) America/Los_Angeles
Subject: uclibc

Since just before 0.9.29, to current snapshot, I get segfaults when anything 
is linked statically to uClibc. Now I've reproduced it with a very vanilla 
uClibc buildroot, so it looks like a bug with uClibc and not a bug with 
something I'm doing. So I'm not going to try to fix it. I did a bugzilla 
about it at the uClibc site. I did find a workaround, which is to compile 
libc.a with no optimization (-O0). Nothing on an hlfs-uclibc system is linked 
statically, so it doesn't really affect the build.

-fstack-protector-all also causes segmentation faults, which may or may not be 
related to the bug with -static. Libssp seems to work, but there are some 
frustrating issues with the ssp header installation for 
default -D_FORTIFY_SOURCE.

Getting there...

robert

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