Created attachment 578363 [details]
Patch to fix linker problem
Description of problem:
When trying to build PCL 1.5 (package pcl) on F-16 I get the following errors:
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/../../../../lib64/libgtest.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/../../../../lib64/libgtest.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/../../../../lib64/libgtest.so: undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-redhat-linux/4.6.2/../../../../lib64/libgtest.so: undefined reference to `pthread_setspecific'
This is caused by gtest not properly linking against pthread. The attached patch applies to the recent master of the gtest package repository (git am) and adds "-lpthread" to the link libraries.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Get src rpm from http://koji.fedoraproject.org/koji/buildinfo?buildID=311730
2. rpmbuild --rebuild pcl-1.5-1.src.rpm
The patch adds a minimal patch to add the -lpthread flag.
Any idea if and when you fix this? Or has this been fixed?
Well, this issue seems not happening when building with cmake which is recommended way. new upstream version is also available but "make test" seems not passed. I'm trying to see what's wrong.
gtest-1.6.0-1.fc18 has been submitted as an update for Fedora 18.
gtest-1.6.0-1.fc17 has been submitted as an update for Fedora 17.
gtest-1.6.0-1.fc16 has been submitted as an update for Fedora 16.
can you provide some feedback on comment #1 in
Hmm, given that they think there are the violation of the ODR in gtest itself, roughly speaking, IMHO API is to protect this case. if they give up to maintain their APIs and address some conflict then, hmm, yeah, it may be better stop shipping it in Fedora perhaps. fortunately mozc doesn't require gtest anymore. I don't mind either.
Anyway, I guess it's not introduced by 1.6.0 but just they realized and stopped "make install" since. so it should be a separate issue so far.
I'm wondering if it can be avoided with shipping the static library only?
We should open an another bug for that maybe.
FWIW I haven't ever tried to write any test cases with it. so I may be wrong.
From my side all I asked for was linking against pthread. It seems stupid to have a library that you cannot ship prebuilt. Is there a link to the reasoning behind this?
I think the above bugzilla link explains all. in addition to, if you aren't sure what's the One Definition Rule, http://en.wikipedia.org/wiki/One_Definition_Rule.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gtest-1.6.0-1.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
dunno why this bug wasn't closed even though the updated package has already been pushed to the stable. anyway closing.