I assume this is caused by LDFLAGS="-Wl,--as-needed" [snip] x86_64-pc-linux-gnu-gcc -std=gnu99 -march=native -ggdb -O2 -pipe -UNDEBUG -Wl,--as-needed -o testapp testapp-testapp.o testapp-util.o testapp-cache.o -levent mv -f .deps/memcached_debug-cache.Tpo .deps/memcached_debug-cache.Po testapp-testapp.o: In function `test_binary_pipeline_hickup': /var/tmp/portage/net-misc/memcached-1.4.2/work/memcached-1.4.2/testapp.c:1624: undefined reference to `pthread_create' /var/tmp/portage/net-misc/memcached-1.4.2/work/memcached-1.4.2/testapp.c:1643: undefined reference to `pthread_join' collect2: ld returned 1 exit status make: *** [testapp] Error 1 make: *** Waiting for unfinished jobs.... mv -f .deps/memcached_debug-memcached.Tpo .deps/memcached_debug-memcached.Po [/snip]
I got same error with as-needed compiler spec (http://www.gentoo.org/proj/en/qa/asneeded.xml) It compiles fine without --as-needed
Created attachment 207582 [details, diff] adding patch to ebuild
Created attachment 207586 [details, diff] fixing as-needed issues I am not sure whether this will work on ~BSD systems. If someone could verify or (even better) correct it, I would be grateful.
rediffed and commited for 1.4.4.