Summary: | dev-libs/protobuf-2.4.1 - google/protobuf/stubs/common.cc:48:2: error: #error "No suitable threading library available." | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | EEva <eeva+gentoo_bugzilla> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | tdalman |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
Failing config.log |
Description
EEva
2012-05-18 08:22:37 UTC
Created attachment 312165 [details]
build.log
As you've noticed yourself, config.log required. I can confirm this. It seems to not be able to find pthread.h which isn't installed by prefix. I just looked into this more. This error is happening when compiling because HAVE_PTHREAD isn't defined. Went to the config.log, and it seems it isn't finding the pthread library during config (Even if we supply -L/usr/lib -I/usr/include) The logs say configure:16142: checking for the pthreads library -lpthreads configure:16175: x86_64-apple-darwin12-gcc -o conftest -I/usr/include -L/usr/lib -L/usr/lib conftest.c -lpthreads -lz >&5 ld: library not found for -lpthreads This is funny because I have "libpthread.dyld" not "libpthreads.dyld" in my /usr/lib. I think patching the config script to look for -lpthread would work. Perhaps it is just a typo. Sorry, my bad... I don't think my last comment is correct. Will just attach my config.log. Created attachment 321148 [details]
Failing config.log
Figured it out: "-Wl,-z,defs" is causing the pthread check to fail. When I removed it from the configure file, it works. This isn't a proper fix but it isolates the problem. --- configure 2012-08-12 12:36:22.000000000 -0700 +++ /Users/mike/foo/configure 2012-08-12 12:36:00.000000000 -0700 @@ -16315,7 +16315,7 @@ # FIXME: -fPIC is required for -shared on many architectures, # so we specify it here, but the right way would probably be to # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" + CFLAGS="-shared -fPIC $CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CC="$PTHREAD_CC And for a fix: --- /sb/usr/portage/dev-libs/protobuf/protobuf-2.4.1.ebuild 2012-08-09 07:08:44.000000000 -0700 +++ dev-libs/protobuf/protobuf-2.4.1.ebuild 2012-08-12 13:04:17.000000000 -0700 @@ -43,6 +43,10 @@ python_convert_shebangs -r 2 . distutils_src_prepare fi + + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i 's/-Wl,-z,defs //' configure + fi } src_configure() { The error in config.log is: configure:16523: x86_64-apple-darwin12-gcc -o conftest -nostdlib -shared -fPIC -Wl,-z,defs -I/usr/include -L/usr/lib -D_THREAD_SAFE -L/usr/lib conftest.c -lpthread -lc_r -lz -lc >&5 ld: unknown option: -z so binutils complain, but seems prefix specific, as sys-devel/binutils shouldn't have this problem. well, it's just passing a GNU ld specific flag to a non-GNU ld (linker) it's true that this only happens in Prefix we do have test-flag stuff This was fixed in recent versions, thanks. |