gsmedia |
02-14-2009 03:27 AM |
Glibc 1st pass wont compile (possibly i486 related)
Hi everyone,
I'm trying to compile Glibc-2.8-20080929 on Fedora10, as part of LFS6.4 chapter 5.7.
when i make glibc i get the following error message at the end of the compile:
Code:
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `__libc_fork':
/mnt/lfs/sources/glibc-2.8-20080929/posix/../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:76: undefined reference to `__sync_bool_compare_and_swap_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `nscd_getpw_r':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd_getpw_r.c:232: undefined reference to `__sync_fetch_and_add_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `__nscd_drop_map_ref':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd-client.h:320: undefined reference to `__sync_fetch_and_add_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `nscd_getgr_r':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd_getgr_r.c:321: undefined reference to `__sync_fetch_and_add_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `__nscd_drop_map_ref':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd-client.h:320: undefined reference to `__sync_fetch_and_add_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `nscd_gethst_r':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd_gethst_r.c:400: undefined reference to `__sync_fetch_and_add_4'
/mnt/lfs/sources/glibc-build/libc_pic.os:/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd-client.h:320: more undefined references to `__sync_fetch_and_add_4' follow
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `__nscd_get_map_ref':
/mnt/lfs/sources/glibc-2.8-20080929/nscd/nscd_helper.c:406: undefined reference to `__sync_val_compare_and_swap_4'
/mnt/lfs/sources/glibc-build/libc_pic.os: In function `*__GI___libc_freeres':
/mnt/lfs/sources/glibc-2.8-20080929/malloc/set-freeres.c:39: undefined reference to `__sync_bool_compare_and_swap_4'
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.8-20080929'
make: *** [all] Error 2
Googling undefined reference to `__sync_val_compare_and_swap_4' reveals that this error generally occurs when -march=i486 isn't passed to the compiler. I've checked and triple checked that ive followed the instruction:
Code:
echo "CFLAGS += -march=i486 -mtune=native" > configparms
The above command is meant to be run in the glibc-build directory isn't it?
I've tried replacing CFLAGS += -march=i486 -mtune=native with CFLAGS += -march=i686 -mtune=native. After lookin at this thread, I tried both:
Code:
CFLAGS="-g -02 -march=i486"
and
Code:
CFLAGS=" -02 -march=i486"
All of the above combinations give the same error message during compilation. Does anyone know what I should try next to solve this problem?
Thanks
Also, every time I try a different configuration combination, should I start with a fresh build directory, or can I just run configure again?
|