I want to build a statically linked version of memcached, but am not
able to accomplish this. I got the dynamically linked version to build
right away. To get the static build, I did this:

1. configure --with-libevent=/data/webserver_pkgs/target/dist/
libevent/
2. update Makefile to add the parameter -static to the LDFLAGS

but that results in:

gcc -std=gnu99  -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-
prototypes -Wmissing-declarations -Wredundant-decls  -L/data/
webserver_pkgs/target/dist/libevent//lib -static -o memcached
memcached-memcached.o memcached-hash.o memcached-slabs.o memcached-
items.o memcached-assoc.o memcached-thread.o memcached-daemon.o
memcached-stats.o memcached-util.o memcached-cache.o    -levent
memcached-memcached.o: In function `main':
/home/hduin/ots/memcached-1.4.5/memcached.c:4548: warning: Using
'getpwnam' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking
memcached-memcached.o: In function `server_socket':
/home/hduin/ots/memcached-1.4.5/memcached.c:3817: warning: Using
'getaddrinfo' in statically linked applications requires at runtime
the shared libraries from the glibc version used for linking
/data/webserver_pkgs/target/dist/libevent//lib/libevent.a(event.o): In
function `gettime':
/data/webserver_pkgs/target/extract/libevent-1.4.9-stable/event.c:150:
undefined reference to `clock_gettime'
/data/webserver_pkgs/target/dist/libevent//lib/libevent.a(event.o): In
function `detect_monotonic':
/data/webserver_pkgs/target/extract/libevent-1.4.9-stable/event.c:133:
undefined reference to `clock_gettime'
collect2: ld returned 1 exit status

Does anyone have a suggestion to make this work? Thanks,

Harry


-- 
Subscription settings: http://groups.google.com/group/memcached/subscribe?hl=en

Reply via email to