CC clients/ms_thread.o CCLD clients/memslap clients/ms_conn.o: In function `ms_get_udp_request_id': /data2/build/libmemcached-0.37/clients/ms_conn.c:184: undefined reference to `__sync_fetch_and_add_4' clients/ms_conn.o: In function `ms_reconn_socks': /data2/build/libmemcached-0.37/clients/ms_conn.c:1055: undefined reference to `__sync_fetch_and_add_4' clients/ms_conn.o: In function `ms_reconn': /data2/build/libmemcached-0.37/clients/ms_conn.c:924: undefined reference to `__sync_fetch_and_add_4' /data2/build/libmemcached-0.37/clients/ms_conn.c:960: undefined reference to `__sync_fetch_and_add_4' clients/ms_thread.o: In function `ms_setup_thread': /data2/build/libmemcached-0.37/clients/ms_thread.c:215: undefined reference to `__sync_fetch_and_add_4' clients/ms_thread.o:/data2/build/libmemcached-0.37/clients/ms_thread.c:198: more undefined references to `__sync_fetch_and_add_4' follow collect2: ld returned 1 exit status make[2]: *** [clients/memslap] Error 1 make[2]: Leaving directory `/data2/build/libmemcached-0.37' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/data2/build/libmemcached-0.37' make: *** [all] Error 2
当时使用的参数是
./configure --prefix=/data2/server/ --with-libevent-prefix=/data2/server/后来又是
./configure --prefix=/data2/server/ --with-libevent-prefix=/data2/server/ --disable-64bit还是不行
后来绕墙看到了这个
libmemcached undefined reference to `__sync_fetch_and_add_4′
改configure参数为
./configure --prefix=/data2/server/ --with-libevent-prefix=/data2/server/ --disable-64bit CFLAGS="-O3 -march=i686"make clean install 就好了
No comments:
Post a Comment