pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/58157: OpenSSL 3.3.0 has wrong libdir in pkg-config



>Number:         58157
>Category:       pkg
>Synopsis:       OpenSSL 3.3.0 has wrong libdir in pkg-config
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 16 04:20:00 +0000 2024
>Originator:     Colin Simmonds
>Release:        Latest pkgsrc from git as of 20240415
>Organization:
>Environment:
Darwin meiling.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64 arm Darwin
>Description:
OpenSSL 3.3.0 has changed how it generates its .pc files for pkg-config, with the end result that the LDPATH output from pkg-config is wrong.

There is an open bug for this upstream: <https://github.com/openssl/openssl/issues/23569>

>From the discussion there, it appears that part of the problem is that the OpenSSL config script accepts a parameter "--libdir" which behaves differently from the same named parameter in autoconf. Autoconf expects it to be the full path to the install library directory (and that's what the pkgsrc Makefile is setting it to), but OpenSSL expects it to be a relative directory path (with default value "lib").

I noticed this trying to build devel/rust - when it tries to build the cargo binary, the rust build was failing with an error saying that it couldn't find "-l ssl", and the root cause was that it was getting the wrong libdir from pkg-config.
>How-To-Repeat:
Install OpenSSL 3.3.0

$ pkg-config --libs openssl
-L/opt/pkg -lssl -lcrypto
$ pkg-config --libs libssl
-L/opt/pkg -lssl
$ pkg-config --libs libcrypto
-L/opt/pkg -lcrypto

Where the first entry for all three queries should be "-L/opt/pkg/lib" instead.
>Fix:
The simple workaround is to manually edit the three .pc files in the openssl package after installation to add "/lib" to the end, and then running pkg-config for openssl gives the expected results.


Home | Main Index | Thread Index | Old Index