Make error in glibc

gaurav k gk_manutd at yahoo.co.in
Mon May 3 19:24:10 PDT 2010


Hey Guys, 

This is my first mail to the list- I'm a relative newbie- though not a complete Linux noob who is clueless about what is happening.


I am using Ubuntu 10.04- Lucid Lynx and I'm following LFS version 6.6. 


My Host System Requirements output is as follows:

bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.20.1-system.20100303
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
GNU C Library (Ubuntu EGLIBC 2.11.1-0ubuntu7) stable release version 2.11.1
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-21-generic (buildd at rothera) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
m4 (GNU M4) 1.4.13
GNU Make 3.81
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
Texinfo:
Compilation OK



I am getting errors while trying to 'make' glibc (SECTION 5.7):

make[4]: Leaving directory `/mnt/lfs/glibc-build/glibc-2.11.1/time'
make[3]: Leaving directory `/mnt/lfs/glibc-build/glibc-2.11.1/elf'
make[2]: Leaving directory `/mnt/lfs/glibc-build/glibc-2.11.1/elf'
i686-lfs-linux-gnu-gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs 
-Wl,-dynamic-linker=/tools/lib/ld-linux.so.2  
-B/mnt/lfs/glibc-build/csu/  
-Wl,--version-script=/mnt/lfs/glibc-build/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -nostdlib 
-nostartfiles -e __libc_main -L/mnt/lfs/glibc-build 
-L/mnt/lfs/glibc-build/math -L/mnt/lfs/glibc-build/elf 
-L/mnt/lfs/glibc-build/dlfcn -L/mnt/lfs/glibc-build/nss 
-L/mnt/lfs/glibc-build/nis -L/mnt/lfs/glibc-build/rt 
-L/mnt/lfs/glibc-build/resolv -L/mnt/lfs/glibc-build/crypt 
-L/mnt/lfs/glibc-build/nptl 
-Wl,-rpath-link=/mnt/lfs/glibc-build:/mnt/lfs/glibc-build/math:/mnt/lfs/glibc-build/elf:/mnt/lfs/glibc-build/dlfcn:/mnt/lfs/glibc-build/nss:/mnt/lfs/glibc-build/nis:/mnt/lfs/glibc-build/rt:/mnt/lfs/glibc-build/resolv:/mnt/lfs/glibc-build/crypt:/mnt/lfs/glibc-build/nptl -o /mnt/lfs/glibc-build/libc.so -T /mnt/lfs/glibc-build/shlib.lds 
/mnt/lfs/glibc-build/csu/abi-note.o /mnt/lfs/glibc-build/elf/soinit.os 
/mnt/lfs/glibc-build/libc_pic.os /mnt/lfs/glibc-build/elf/sofini.os 
/mnt/lfs/glibc-build/elf/interp.os /mnt/lfs/glibc-build/elf/ld.so -lgcc
/mnt/lfs/glibc-build/libc_pic.os: In function `__libc_fork':
/mnt/lfs/glibc-build/glibc-2.11.1/posix/../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:79: undefined reference to `__sync_bool_compare_and_swap_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `__nscd_drop_map_ref':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd-client.h:320: undefined 
reference to `__sync_fetch_and_add_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `nscd_getpw_r':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd_getpw_r.c:233: undefined 
reference to `__sync_fetch_and_add_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `__nscd_drop_map_ref':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd-client.h:320: undefined 
reference to `__sync_fetch_and_add_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `nscd_getgr_r':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd_getgr_r.c:322: undefined 
reference to `__sync_fetch_and_add_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `__nscd_drop_map_ref':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd-client.h:320: undefined 
reference to `__sync_fetch_and_add_4'
/mnt/lfs/glibc-build/libc_pic.os:/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd_gethst_r.c:415: more undefined references to `__sync_fetch_and_add_4' follow
/mnt/lfs/glibc-build/libc_pic.os: In function `__nscd_get_map_ref':
/mnt/lfs/glibc-build/glibc-2.11.1/nscd/nscd_helper.c:433: undefined 
reference to `__sync_val_compare_and_swap_4'
/mnt/lfs/glibc-build/libc_pic.os: In function `*__GI___libc_freeres':
/mnt/lfs/glibc-build/glibc-2.11.1/malloc/set-freeres.c:39: undefined 
reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
make[1]: *** [/mnt/lfs/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/mnt/lfs/glibc-build/glibc-2.11.1'
make: *** [all] Error 2


I hope this excerpt of the make output is enough. 



I have not deviated from the book at all, the only possible difference might be any differences in the host system requirement. For example, /bin/sh  is not a symlink to bash, but I've only used bash throughout. 


I went through a few of the mail archives, and I realized that I had made a mistake in the configparams file - I have rectified it. 

$ cat configparams 
CFLAGS += -march=i486 -mtune=native



My extracted glibc is a subfolder of an independent folder glibc-build.


I removed glibc-2.11.1 & downloaded & tried to install glibc version 2.5.1 & 2.8.1.  But, I got errors saying that these packages are too outdated.

How do I proceed further?  


Thank you so much!

 Gaurav K"There is a place. Like no place on Earth. A land full of wonder,mystery, and danger! Some say to survive it: You need to be as mad as a hatter..."


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20100504/ebda2244/attachment.html>


More information about the lfs-support mailing list