+++ This bug was initially created as a clone of Bug #1185266 +++ pcre.pc is incomplete and static builds against pcre are broken Actual results: $ pkg-config --static --libs libpcre -lpcre $ cat test_pcre.c #include <pcre.h> int main() { pcre_jit_free_unused_memory(); return 0; } $ gcc -static test_pcre.c `pkg-config --static --libs libpcre` /usr/lib/gcc/x86_64-redhat-linux/5.0.1/../../../../lib64/libpcre.a(libpcre_la-pcre_jit_compile.o): In function `sljit_generate_code': (.text+0x6b1): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-redhat-linux/5.0.1/../../../../lib64/libpcre.a(libpcre_la-pcre_jit_compile.o): In function `sljit_generate_code': (.text+0x7a6): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-redhat-linux/5.0.1/../../../../lib64/libpcre.a(libpcre_la-pcre_jit_compile.o): In function `sljit_generate_code': (.text+0xb31): undefined reference to `pthread_mutex_unlock' ... Expected results: $ pkg-config --static --libs libpcre -lpcre -pthread $ gcc -static test_pcre.c `pkg-config --static --libs libpcre` $
Created attachment 1017949 [details] Fix proposed the upstream This patch fixes it. The `-static' gcc patch forces searching for static libpthread library which is provided by glibc-static. I could add glibc-static to run-time dependencies of pcre-static, however it's not really necessary because one can link against /usr/lib64/libpcre.a directly without the -static option (and pkg-config), and then the glibc-static package is not needed. Also with -static, one needs static libc because of the main program entry point. So the dependency can bee seen as a dependency of the compiled program, not pcre-static. I'm not sure about the dependency.
All Fedoras are affected.
Created attachment 1018309 [details] Upstream fix Patch accepted.
pcre-8.36-6.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/pcre-8.36-6.fc22
pcre-8.35-10.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/pcre-8.35-10.fc21
pcre-8.33-10.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/pcre-8.33-10.fc20
Package pcre-8.36-6.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pcre-8.36-6.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-6875/pcre-8.36-6.fc22 then log in and leave karma (feedback).
pcre-8.36-6.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
pcre-8.35-10.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
pcre-8.33-10.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.