[openssl-dev] libcrypto.pc needs to list libpthread as a dependency

Roumen Petrov openssl at roumenpetrov.info
Sun Sep 17 18:29:57 UTC 2017


Hi Howard,

Howard Chu wrote:
> Roumen Petrov wrote:
>> Howard Chu via openssl-dev wrote:
>>> In OpenSSL 1.1 on Linux (at least) libcrypto now has a dependency on
>>> libpthread but this is not reflected in the pkgconfig file. As a
>>> result, tools like CMake fail to detect libcrypto properly when
>>> linking against the static library. libpthread should be added to the
>>> Libs.private line of the pkgconfig file.
>>>
>>> For example:
>>> https://github.com/monero-project/monero/issues/2402#issuecomment-327514216
>>>
>>
>> Problem is that OpenSSL does not add it directly.
>> Build process does not know libraries added by compiler flags like
>> -pthread.
>>
>> Does not look like OpenSSL issue.
>
> That sounds like a lame cop-out. Currently the build process already
> knows that -ldl goes in ${EX_LIBS}. The Makefile is full of
> system-dependent settings already.
>

Case is totally different. Library dl is needed by DSO functionality.

Thread library is platform dependent . For instance it is not added on 
android. See gcc spec file (version 4.9+?).

Dunno what will be impact if openssl exports C-flag -pthread.

Regards
Roumen



More information about the openssl-dev mailing list