Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-15-2006, 06:19 AM
|
#1
|
LQ Newbie
Registered: Jan 2006
Posts: 21
Rep:
|
libc.so error in glibc compilation
I am trying to build cross toolchain by looking at CLFS.
Here , instead of nptl I am using linuxthreads.
Tools used are:
linux-2.6.15.1
binutils-2.14
gcc-4.0.2
glibc-2.3.6
glibc-linuxthreads-2.3.6
After installing bootstrap compiler, when I tried to compile glibc I am getting error.I have installed binutils,glibc headers and bootstrap compiler successfully.
To configure:
BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
../glibc-2.3.6/configure --prefix=/tools \
--host=${LFS_TARGET} --build=${LFS_HOST} \
--disable-profile --enable-add-ons=linuxthreads \
--with-tls --enable-kernel=2.6.15.1 --with-__thread \
--with-binutils=/cross-tools/bin --with-headers=/tools/include \
--cache-file=config.cache
Here comes the error.
To compile :
make
.......
.......
...
make[3]: Leaving directory `/mnt/lfs/sources/glibc-2.3.6/elf'
i686-pc-linux-gnu-gcc interp.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mpreferred-stack-boundary=2 -fPIC -D'RUNTIME_LINKER="/tools/lib/ld-linux.so.2"' -DNOT_IN_libc=1 -I../include -I. -I/mnt/lfs/sources/glibc-build/elf -I.. -I../libio -I/mnt/lfs/sources/glibc-build -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /mnt/lfs/cross-tools/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /mnt/lfs/sources/glibc-build/elf/interp.os -MD -MP -MF /mnt/lfs/sources/glibc-build/elf/interp.os.dt -MT /mnt/lfs/sources/glibc-build/elf/interp.os
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.3.6/elf'
cd /mnt/lfs/sources/glibc-build && /mnt/lfs/cross-tools/bin/../lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/bin/ar cruv libc.a `cat csu/stamp.o iconv/stamp.o iconvdata/stamp.o locale/stamp.o localedata/stamp.o assert/stamp.o ctype/stamp.o intl/stamp.o catgets/stamp.o math/stamp.o setjmp/stamp.o signal/stamp.o stdlib/stamp.o stdio-common/stamp.o libio/stamp.o dlfcn/stamp.o malloc/stamp.o string/stamp.o wcsmbs/stamp.o timezone/stamp.o time/stamp.o dirent/stamp.o grp/stamp.o pwd/stamp.o posix/stamp.o io/stamp.o termios/stamp.o resource/stamp.o misc/stamp.o socket/stamp.o sysvipc/stamp.o gmon/stamp.o gnulib/stamp.o wctype/stamp.o manual/stamp.o shadow/stamp.o po/stamp.o argp/stamp.o crypt/stamp.o linuxthreads/stamp.o resolv/stamp.o nss/stamp.o rt/stamp.o conform/stamp.o debug/stamp.o linuxthreads_db/stamp.o inet/stamp.o hesiod/stamp.o sunrpc/stamp.o nis/stamp.o nscd/stamp.o streams/stamp.o login/stamp.o elf/stamp.o stamp.o`
r - csu/version.o
: /mnt/lfs/sources/glibc-build/libc.a
i686-pc-linux-gnu-gcc -nostdlib -nostartfiles -r -o /mnt/lfs/sources/glibc-build/libc_pic.os \
-Wl,-d -Wl,--whole-archive /mnt/lfs/sources/glibc-build/libc_pic.a
i686-pc-linux-gnu-gcc -shared -Wl,-O1 \
-nostdlib -nostartfiles \
-Wl,-dynamic-linker=/tools/lib/ld-linux.so.2 -Wl,-z,combreloc \
-Wl,--verbose 2>&1 | \
sed > /mnt/lfs/sources/glibc-build/shlib.ldsT \
-e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/^.*\.hash[ ]*:.*$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
-e 's/^.*\*(\.dynbss).*$/& \
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-e 's/^.*\*(\.jcr).*$/& \
PROVIDE(__start___libc_subfreeres = .);\
__libc_subfreeres : { *(__libc_subfreeres) }\
PROVIDE(__stop___libc_subfreeres = .);\
PROVIDE(__start___libc_atexit = .);\
__libc_atexit : { *(__libc_atexit) }\
PROVIDE(__stop___libc_atexit = .);\
PROVIDE(__start___libc_thread_subfreeres = .);\
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
PROVIDE(__stop___libc_thread_subfreeres = .);/'
mv -f /mnt/lfs/sources/glibc-build/shlib.ldsT /mnt/lfs/sources/glibc-build/shlib.lds
i686-pc-linux-gnu-gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/tools/lib/ld-linux.so.2 -B/mnt/lfs/sources/glibc-build/csu/ -Wl,--version-script=/mnt/lfs/sources/glibc-build/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -nostdlib -nostartfiles -e __libc_main -L/mnt/lfs/sources/glibc-build -L/mnt/lfs/sources/glibc-build/math -L/mnt/lfs/sources/glibc-build/elf -L/mnt/lfs/sources/glibc-build/dlfcn -L/mnt/lfs/sources/glibc-build/nss -L/mnt/lfs/sources/glibc-build/nis -L/mnt/lfs/sources/glibc-build/rt -L/mnt/lfs/sources/glibc-build/resolv -L/mnt/lfs/sources/glibc-build/crypt -L/mnt/lfs/sources/glibc-build/linuxthreads -Wl,-rpath-link=/mnt/lfs/sources/glibc-build:/mnt/lfs/sources/glibc-build/math:/mnt/lfs/sources/glibc-build/elf:/mnt/lfs/sources/glibc-build/dlfcn:/mnt/lfs/sources/glibc-build/nss:/mnt/lfs/sources/glibc-build/nis:/mnt/lfs/sources/glibc-build/rt:/mnt/lfs/sources/glibc-build/resolv:/mnt/lfs/sources/glibc-build/crypt:/mnt/lfs/sources/glibc-build/linuxthreads -o /mnt/lfs/sources/glibc-build/libc.so -T /mnt/lfs/sources/glibc-build/shlib.lds /mnt/lfs/sources/glibc-build/csu/abi-note.o /mnt/lfs/sources/glibc-build/elf/soinit.os /mnt/lfs/sources/glibc-build/libc_pic.os /mnt/lfs/sources/glibc-build/elf/sofini.os /mnt/lfs/sources/glibc-build/elf/interp.os /mnt/lfs/sources/glibc-build/elf/ld.so -lgcc
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb48f2): In function `*__GI___register_atfork':
../linuxthreads/sysdeps/pthread/list.h:61: undefined reference to `__fork_block'
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb48f8):../linuxthreads/sysdeps/pthread/list.h:60: undefined reference to `__fork_block'
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb4905):../linuxthreads/sysdeps/pthread/list.h:63: undefined reference to `__fork_block'
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb490f):../linuxthreads/sysdeps/pthread/list.h:60: undefined reference to `__fork_block'
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb4915):../linuxthreads/sysdeps/pthread/list.h:61: undefined reference to `__fork_block'
/mnt/lfs/sources/glibc-build/libc_pic.os(.text+0xb4922):../linuxthreads/sysdeps/pthread/list.h:63: more undefined references to `__fork_block' follow
collect2: ld returned 1 exit status
make[1]: *** [/mnt/lfs/sources/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.3.6'
make: *** [all] Error 2
Plz help me.I am trying to build a cross build toolchain from the past 2 weeks, but not yet succeeded.
|
|
|
02-16-2006, 05:13 AM
|
#2
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Rep:
|
You can try ugrading to a higher glibc, or downgrading to a lower binutils. It helped for this guy: http://www.cygwin.com/ml//binutils/2.../msg00205.html
Also you might try doing:
Code:
BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
../glibc-20051107/configure --prefix=/tools \
--host=${LFS_TARGET} --build=${LFS_HOST} \
--disable-profile --enable-add-ons \
--with-tls --enable-kernel=2.6.0 --with-__thread \
--with-binutils=/cross-tools/bin --with-headers=/tools/include \
--cache-file=config.cache
|
|
|
02-17-2006, 12:13 AM
|
#3
|
LQ Newbie
Registered: Jan 2006
Posts: 21
Original Poster
Rep:
|
My configuration command was:
To configure:
BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
../glibc-2.3.6/configure --prefix=/tools \
--host=${LFS_TARGET} --build=${LFS_HOST} \
--disable-profile --enable-add-ons=linuxthreads \
--with-tls --enable-kernel=2.6.15.1 --with-__thread \
--with-binutils=/cross-tools/bin --with-headers=/tools/include \
--cache-file=config.cache
To compile :
make
But still, I got the error...which version of binutils and glibc will work ?
Regarding the software tools that I have used, I have already mentioned earlier.
|
|
|
02-18-2006, 04:23 AM
|
#4
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Rep:
|
I really don't know the specifics of what version to get of either.
[GUESS]
I figure since only the development release of CLFS is available.
Your going to have to ask people on the CLFS project or on projects like GCC, Glibc, or Binutils.
You might need to exeriment yourself with versions.
[/GUESS]
|
|
|
All times are GMT -5. The time now is 10:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|