undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4

root-46
Upon attempting to compile the latest libc from *cvs*, I get the following
errors when compiling.

make[4]: Leaving directory `/tmp/glibc-2.6/string'
make subdir=time -C ../time ..=../ objdir=/tmp/glibc-build -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
make[4]: Entering directory `/tmp/glibc-2.6/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/tmp/glibc-2.6/time'
make[3]: Leaving directory `/tmp/glibc-2.6/elf'
gcc   -nostdlib -nostartfiles -shared   \
                       -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
-Wl,-z,defs -Wl,--verbose 2>&1 |  \
                       LC_ALL=C \
                       sed -e '/^=========/,/^=========/!d;/^=========/d'
\
                           -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . -
SIZEOF_HEADERS;/' \
                       > /tmp/glibc-build/elf/ld.so.lds
gcc   -nostdlib -nostartfiles -shared -o /tmp/glibc-build/elf/ld.so
\
                       -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
-Wl,-z,defs       \
                       /tmp/glibc-build/elf/librtld.os
-Wl,--version-script=/tmp/glibc-build/ld.map          \
                       -Wl,-soname=ld-linux.so.2 -T
/tmp/glibc-build/elf/ld.so.lds
/tmp/glibc-build/elf/librtld.os: In function `add_dependency':
/tmp/glibc-2.6/elf/dl-lookup.c:106: undefined reference to
`__sync_fetch_and_add_4'
/tmp/glibc-2.6/elf/dl-lookup.c:110: undefined reference to
`__sync_val_compare_and_swap_4'
/tmp/glibc-build/elf/librtld.os: In function `_dl_profile_fixup':
/tmp/glibc-2.6/elf/dl-runtime.c:196: undefined reference to
`__sync_val_compare_and_swap_4'
/tmp/glibc-2.6/elf/dl-runtime.c:205: undefined reference to
`__sync_fetch_and_add_4'
/tmp/glibc-build/elf/librtld.os: In function `_dl_fixup':
/tmp/glibc-2.6/elf/dl-runtime.c:102: undefined reference to
`__sync_val_compare_and_swap_4'
/tmp/glibc-2.6/elf/dl-runtime.c:110: undefined reference to
`__sync_fetch_and_add_4'
/tmp/glibc-build/elf/librtld.os: In function `dl_open_worker':
/tmp/glibc-2.6/elf/dl-open.c:424: undefined reference to
`__sync_val_compare_and_swap_4'
/tmp/glibc-2.6/elf/dl-open.c:426: undefined reference to
`__sync_fetch_and_add_4'
/tmp/glibc-build/elf/librtld.os: In function `_dl_close_worker':
/tmp/glibc-2.6/elf/dl-close.c:406: undefined reference to
`__sync_val_compare_and_swap_4'
/tmp/glibc-2.6/elf/dl-close.c:408: undefined reference to
`__sync_fetch_and_add_4'
collect2: ld returned 1 exit status
make[2]: *** [/tmp/glibc-build/elf/ld.so] Error 1

I grepped through all the sources and I couldn't find any reference to
those two functions. This has been an issues with the latest libc for a
couple of weeks already.
Reply | Threaded
Open this post in threaded view
|

Re: undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4

Ulrich Drepper
root wrote:
> Upon attempting to compile the latest libc from *cvs*, I get the following
> errors when compiling.

Why don't you first read the list archive?  Pass -march=i486 to the
compiler.  i386 are not supported anymore.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


signature.asc (259 bytes) Download Attachment