Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 288833

Summary: net-misc/memcached-1.4.2 fails to build (--as-needed ??)
Product: Gentoo Linux Reporter: Priit Laes (IRC: plaes) <plaes>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, smoothhound, xarthisius
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: adding patch to ebuild
fixing as-needed issues

Description Priit Laes (IRC: plaes) 2009-10-13 08:05:57 UTC
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]
Comment 1 Scott Thomson 2009-10-13 08:16:21 UTC
I got same error with as-needed compiler spec (http://www.gentoo.org/proj/en/qa/asneeded.xml)

It compiles fine without --as-needed
Comment 2 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2009-10-19 18:51:39 UTC
Created attachment 207582 [details, diff]
adding patch to ebuild
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2009-10-19 18:53:25 UTC
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.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-27 23:24:45 UTC
rediffed and commited for 1.4.4.