libiomp5.so: undefined reference to 'pthread_atfork' compiling openssl on intel64/emt64
I am attempting to compile openssl using the patch to allow the openssl functions to link against the special crypto functions in ipp (so that I can leverage the built in AES instructions on my Westmere chip.) I've been following the guide here:
Everything is working great except that when I try to compile after patching openssl, at the step:
./build_ssl_ipp_sh. openssl-0.9.8j linuxemt64
I get the the following error:
ar: creating ../libssl.a /opt/intel/Compiler/11.1/072/lib/intel64/libiomp5.so: undefined reference to `pthread_atfork' collect2: ld returned 1 exit status make: *** [link_app.gnu] Error 1 make: *** [openssl] Error 2 make: *** [build_apps] Error 1 /opt/intel/Compiler/11.1/072/lib/intel64/libiomp5.so: undefined reference to `pthread_atfork' collect2: ld returned 1 exit status make: *** [link_app.gnu] Error 1 make: *** [bntest] Error 2 make: *** [tests] Error 2
I've gone through the makefiles and tried changing -lpthread to -pthread, but that didn't solve the problem. Any help? I'm using the ipp that came with my Linux Intel Professional C++ Compiler Suite 11.1. Here is my $LD_LIBRARY_PATH:
I've installed everything using the steps in the aforementioned link. Doing a search on this error, I see that others have run into the same problem-- though usually it is solved by adding -lpthread. What I'm wondering is if I have to add it anywhere else in the make process, but I can't figure out where because it's part of $LIBRARIES that seems to get pulled into everything for linking.