Re: undefined reference to `__sync_fetch_and_add_4
(2010/07/28 8:45), Bill Moseley wrote: > > > 2010/7/27 KaiGai Kohei mailto:kai...@ak.jp.nec.com>> > > > > > > clients/ms_thread.o:/home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:208: > > more undefined references to `__sync_fetch_and_add_4' > > > It is a localism of GCC. > > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html > > > I'm not clear about the problem. I assume it means my platform doesn't > support it. Should configure figure out that it's not supported on this > platform? Or am I missing a library? > > Or more to the point, what do I need to do to get it to build? > > Configuration summary for libmemcached version 0.42 > > * Installation prefix: > /home/bill/.cpan/build/Memcached-libmemcached-0. > 4201-iS0dnh/src_inst > * System type: pc-linux-gnu > * Host CPU: i686 > * C Compiler:gcc (GCC) 4.1.2 (Gentoo 4.1.2) > * Assertions enabled:yes > * Debug enabled: no > * Warnings as failure: no > I found some people who face similar problem: http://sourceware.org/ml/libc-alpha/2007-02/msg8.html http://sourceware.org/ml/libc-alpha/2007-02/msg9.html http://djodjo.jp/archives/359 Should it be handled by configure script? -- KaiGai Kohei
Re: undefined reference to `__sync_fetch_and_add_4
2010/7/27 KaiGai Kohei > > > > clients/ms_thread.o:/home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:208: > > more undefined references to `__sync_fetch_and_add_4' > > > It is a localism of GCC. > > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html I'm not clear about the problem. I assume it means my platform doesn't support it. Should configure figure out that it's not supported on this platform? Or am I missing a library? Or more to the point, what do I need to do to get it to build? Configuration summary for libmemcached version 0.42 * Installation prefix: /home/bill/.cpan/build/Memcached-libmemcached-0. 4201-iS0dnh/src_inst * System type: pc-linux-gnu * Host CPU: i686 * C Compiler:gcc (GCC) 4.1.2 (Gentoo 4.1.2) * Assertions enabled:yes * Debug enabled: no * Warnings as failure: no -- Bill Moseley mose...@hank.org
Re: undefined reference to `__sync_fetch_and_add_4
(2010/07/28 3:11), Bill Moseley wrote: > Building the Memcached-libmemcached-0.4201 Perl module and I get the > following: > > ... >CC clients/ms_thread.o >CCLD clients/memslap > clients/ms_conn.o: In function `ms_get_udp_request_id': > /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:194: > > undefined reference to `__sync_fetch_and_add_4' > clients/ms_conn.o: In function `ms_reconn_socks': > /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:1051: > > undefined reference to `__sync_fetch_and_add_4' > clients/ms_conn.o: In function `ms_reconn': > /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:919: > > undefined reference to `__sync_fetch_and_add_4' > /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:956: > > undefined reference to `__sync_fetch_and_add_4' > clients/ms_thread.o: In function `ms_setup_thread': > /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:225: > > undefined reference to `__sync_fetch_and_add_4' > clients/ms_thread.o:/home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:208: > > more undefined references to `__sync_fetch_and_add_4' > It is a localism of GCC. http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html Thanks, -- KaiGai Kohei
undefined reference to `__sync_fetch_and_add_4
Building the Memcached-libmemcached-0.4201 Perl module and I get the following: ... CC clients/ms_thread.o CCLD clients/memslap clients/ms_conn.o: In function `ms_get_udp_request_id': /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:194: undefined reference to `__sync_fetch_and_add_4' clients/ms_conn.o: In function `ms_reconn_socks': /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:1051: undefined reference to `__sync_fetch_and_add_4' clients/ms_conn.o: In function `ms_reconn': /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:919: undefined reference to `__sync_fetch_and_add_4' /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_conn.c:956: undefined reference to `__sync_fetch_and_add_4' clients/ms_thread.o: In function `ms_setup_thread': /home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:225: undefined reference to `__sync_fetch_and_add_4' clients/ms_thread.o:/home/bill/.cpan/build/Memcached-libmemcached-0.4201-nWi5dF/src/libmemcached/clients/ms_thread.c:208: more undefined references to `__sync_fetch_and_add_4' -- Bill Moseley mose...@hank.org