undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4
2012-05-23 00:08
393 查看
From: root <root at server dot boros dot com>
To: libc-alpha at sourceware dot org
Date: Tue, 6 Feb 2007 15:57:20 -0600 (CST)
Subject: undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4
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
Follow-Ups:
Re: undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4
From: Ulrich Drepper
http://cygwin.com/ml/libc-alpha/2007-02/msg00008.html
To: libc-alpha at sourceware dot org
Date: Tue, 6 Feb 2007 15:57:20 -0600 (CST)
Subject: undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4
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.
Follow-Ups:
Re: undefined references: __sync_fetch_and_add_4 and __sync_val_compare_and_swap_4
From: Ulrich Drepper
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
相关文章推荐
- 编译redis2.6.2报zmalloc.c:223: undefined reference to__sync_add_and_fetch_4'解决方法
- 编译redis2.6.2报zmalloc.c:223: undefined reference to__sync_add_and_fetch_4′解决方法
- __sync_val_compare_and_swap, 无锁锁
- mingw编译x264 出错undefined reference to `__sync_add_and_fetch_4
- Bug 28671 - [4.2 regression] undefined reference to `__sync_fetch_and_add_4'
- Linux-Linux下安装redis报错"undefined reference to__sync_add_and_fetch_4"解决办法
- 编译redis2.6.7报zmalloc.c:223: undefined reference to__sync_add_and_fetch_4'解决方法
- undefined reference to `__sync_bool_compare_and_swap_4
- 安装Redis报错:undefined reference to `__sync_add_and_fetch_4'
- 32位Linux编译redis失败解决方法:zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4`
- C/C++-------------__sync_fetch_and_add 原子操作------------------
- linux无锁化编程--__sync_fetch_and_add系列原子操作函数
- 多线程下变量-原子操作 sync_fetch_and_add等等
- linux无锁化编程--__sync_fetch_and_add系列原子操作函数
- 嵌入式 __sync_fetch_and_add系列函数
- 多线程下变量-gcc原子操作 __sync_fetch_and_add等
- __sync_fetch_and_add系列
- linux无锁化编程--__sync_fetch_and_add系列原子操作函数
- How to solve the "undefined reference to '__sync_sub_and_fetch_4'" compilation problem
- 多线程条件下的计数器__原子的加/减 __sync_fetch_and_add