Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg-config files are no longer relocatable with 3.3 #24298

Open
lazka opened this issue Apr 29, 2024 · 2 comments
Open

pkg-config files are no longer relocatable with 3.3 #24298

lazka opened this issue Apr 29, 2024 · 2 comments
Assignees
Labels
branch: master Merge to master branch branch: 3.3 Merge to openssl-3.3 severity: regression The issue/pr is a regression from previous released version triaged: bug The issue/pr is/fixes a bug

Comments

@lazka
Copy link

lazka commented Apr 29, 2024

Starting with 3.3.0 the pkg-config files are missing a prefix and are using hardcoded paths instead of ${prefix}, breaking relocation on Windows:

new:

libdir=/clang64/lib
includedir=/clang64/include

Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 3.3.0
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Cflags: -I${includedir}

old:

prefix=/clang64
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 3.2.1
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Cflags: -I${includedir}

On Windows (and Unix) to make .pc files relocatable, paths should use ${prefix}, or if that's for some reason isn't possible then there is a fallback where every path that starts with the prefix recorded in the file is converted to use ${prefix} internally.

Starting with 3.3 the paths are no longer derived from ${prefix} and prefix is missing, which breaks relocation (also on Unix, but it's not that commonly used there)

@lazka lazka added the issue: bug report The issue was opened to report a bug label Apr 29, 2024
jasagredo added a commit to input-output-hk/actions that referenced this issue Apr 29, 2024
- [email protected] is broken in Windows. Downgraded to openssl 3.2.1. See openssl/openssl#24298.
- [email protected] is broken in macOS. Downgrading to openssl 3.0.1.
- GHCup was removed from macOS. Now this action installs it if missing in all OSes.
@t8m t8m added branch: master Merge to master branch triaged: bug The issue/pr is/fixes a bug severity: regression The issue/pr is a regression from previous released version branch: 3.3 Merge to openssl-3.3 and removed issue: bug report The issue was opened to report a bug labels Apr 30, 2024
@jasagredo
Copy link

Unless I am mistaken, it seems to me that this is also manifesting in macOS via brew. Notice the difference in .pc files for openssl 3.0.13 and 3.3.0:

bash-3.2$ cat /opt/homebrew/Cellar/openssl\@3.0/3.0.13/lib/pkgconfig/libssl.pc
prefix=/opt/homebrew/Cellar/[email protected]/3.0.13
exec_prefix=${prefix}
libdir=/opt/homebrew/Cellar/[email protected]/3.0.13/lib
includedir=${prefix}/include

Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 3.0.13
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Cflags: -I${includedir}


bash-3.2$ cat /opt/homebrew/Cellar/openssl\@3/3.3.0/lib/pkgconfig/libssl.pc
libdir=/opt/homebrew/Cellar/openssl@3/3.3.0
includedir=/opt/homebrew/Cellar/openssl@3/3.3.0/include

Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 3.3.0
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Cflags: -I${includedir}

github-merge-queue bot pushed a commit to input-output-hk/actions that referenced this issue May 6, 2024
* Fix recent GHA images issues

- [email protected] is broken in Windows. Downgraded to openssl 3.2.1. See openssl/openssl#24298.
- [email protected] is broken in macOS. Downgrading to openssl 3.0.1.
- GHCup was removed from macOS. Now this action installs it if missing in all OSes.

* Update action.yml

Always our pkgconfig first.

* use $(uname -m)-macos packages

* Update action.yml

* Update action.yml

* Update action.yml

---------

Co-authored-by: Moritz Angermann <[email protected]>
@h-vetinari
Copy link
Contributor

There are also tools that do pkg-config --variable=prefix openssl for populating OPEN_SSL_ROOT. This obviously broke too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 3.3 Merge to openssl-3.3 severity: regression The issue/pr is a regression from previous released version triaged: bug The issue/pr is/fixes a bug
Projects
Status: Refine
Development

No branches or pull requests

5 participants