libcrypto.pc needs to list libpthread as a dependency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

libcrypto.pc needs to list libpthread as a dependency

OpenSSL - Dev mailing list
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

--
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Matt Caswell-2
On Sat, 16 Sep 2017 22:26:10 +0100
Howard Chu via openssl-dev <[hidden email]> 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

Hmmm - there is no pkgconfig file at all in 1.1.0. It was removed because it was felt this was better added by OS specific packages. If you have one it probably came from the package for your specific distro not the openssl project itself.

Matt



> file.
>
> For example:
> https://github.com/monero-project/monero/issues/2402#issuecomment-327514216
>
> --
>    -- Howard Chu
>    CTO, Symas Corp.           http://www.symas.com
>    Director, Highland Sun     http://highlandsun.com/hyc/
>    Chief Architect, OpenLDAP  http://www.openldap.org/project/
> --
> openssl-dev mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>


--
Matt Caswell <[hidden email]>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Richard Levitte - VMS Whacker-2


Matt Caswell <[hidden email]> skrev: (17 september 2017 15:04:10 GMT+08:00)

>On Sat, 16 Sep 2017 22:26:10 +0100
>Howard Chu via openssl-dev <[hidden email]> 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
>
>Hmmm - there is no pkgconfig file at all in 1.1.0. It was removed
>because it was felt this was better added by OS specific packages. If
>you have one it probably came from the package for your specific distro
>not the openssl project itself.

You have to look in the Makefile template to find it.

>
>Matt
>
>
>
>> file.
>>
>> For example:
>>
>https://github.com/monero-project/monero/issues/2402#issuecomment-327514216
>>
>> --
>>    -- Howard Chu
>>    CTO, Symas Corp.           http://www.symas.com
>>    Director, Highland Sun     http://highlandsun.com/hyc/
>>    Chief Architect, OpenLDAP  http://www.openldap.org/project/
>> --
>> openssl-dev mailing list
>> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>>

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Roumen Petrov
In reply to this post by OpenSSL - Dev mailing list
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.

Regards,
Roumen
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

OpenSSL - Dev mailing list
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.

--
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Kurt Roeckx
In reply to this post by Matt Caswell-2
On Sun, Sep 17, 2017 at 08:04:10AM +0100, Matt Caswell wrote:
> On Sat, 16 Sep 2017 22:26:10 +0100
> Howard Chu via openssl-dev <[hidden email]> 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
>
> Hmmm - there is no pkgconfig file at all in 1.1.0. It was removed because it was felt this was better added by OS specific packages. If you have one it probably came from the package for your specific distro not the openssl project itself.

The .pc files are still in master.


Kurt

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Roumen Petrov
In reply to this post by OpenSSL - Dev mailing list
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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: libcrypto.pc needs to list libpthread as a dependency

Richard Levitte - VMS Whacker-2
In message <[hidden email]> on Sun, 17 Sep 2017 21:29:57 +0300, Roumen Petrov <[hidden email]> said:

openssl> Hi Howard,
openssl>
openssl> Howard Chu wrote:
openssl> > Roumen Petrov wrote:
openssl> >> Howard Chu via openssl-dev wrote:
openssl> >>> In OpenSSL 1.1 on Linux (at least) libcrypto now has a dependency on
openssl> >>> libpthread but this is not reflected in the pkgconfig file. As a
openssl> >>> result, tools like CMake fail to detect libcrypto properly when
openssl> >>> linking against the static library. libpthread should be added to the
openssl> >>> Libs.private line of the pkgconfig file.
openssl> >>>
openssl> >>> For example:
openssl> >>> https://github.com/monero-project/monero/issues/2402#issuecomment-327514216
openssl> >>>
openssl> >>
openssl> >> Problem is that OpenSSL does not add it directly.
openssl> >> Build process does not know libraries added by compiler flags like
openssl> >> -pthread.
openssl> >>
openssl> >> Does not look like OpenSSL issue.
openssl> >
openssl> > That sounds like a lame cop-out. Currently the build process already
openssl> > knows that -ldl goes in ${EX_LIBS}. The Makefile is full of
openssl> > system-dependent settings already.
openssl> >
openssl>
openssl> Case is totally different. Library dl is needed by DSO functionality.
openssl>
openssl> Thread library is platform dependent . For instance it is not added on android. See gcc spec file (version 4.9+?).
openssl>
openssl> Dunno what will be impact if openssl exports C-flag -pthread.

-pthread should be part of both compiling and linking, so Howard is
perfectly correct, we're not doing this quite right.  When -pthread is
used, it should also be added to the libcrypto.pc's Libs.private line.

I'm currently travelling, but will give this more concrete attention
when I've returned, i.e. next week.

Cheers,
Richard

--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev