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

openssl@3: fix OPENSSL_LIBRARY_DIR in OpenSSLConfig.cmake #169721

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Apr 22, 2024

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

OpenSSL 3.3 introduced CMake files, but the installed file's OPENSSL_LIBRARY_DIR is wrong:

# Directories and names
set(OPENSSL_INCLUDE_DIR "${_ossl_prefix}/include")
set(OPENSSL_LIBRARY_DIR "${_ossl_prefix}/.")
set(OPENSSL_ENGINES_DIR "${_ossl_prefix}/lib/engines-3")
set(OPENSSL_MODULES_DIR "${_ossl_prefix}/lib/ossl-modules")
set(OPENSSL_RUNTIME_DIR "${_ossl_prefix}/bin")

This looks like due to using an absolute path for --libdir. Documentation says:

### libdir

    --libdir=DIR

The name of the directory under the top of the installation directory tree
(see the `--prefix` option) where libraries will be installed.  By default
this is `lib`. Note that on Windows only static libraries (`*.lib`) will
be stored in this location. Shared libraries (`*.dll`) will always be
installed to the `bin` directory.

Some build targets have a multilib postfix set in the build configuration.
For these targets the default libdir is `lib<multilib-postfix>`. Please use
`--libdir=lib` to override the libdir if adding the postfix is undesirable.

Seen in snappy PR which fails to build libpulsar due to wrong path (partly as a side effect of setting -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON so new CMake config is used rather than module) - https://github.com/Homebrew/homebrew-core/actions/runs/8778078486/job/24084058696?pr=168100#step:3:195

  OPENSSL_INCLUDE_DIR: /opt/homebrew/include
  OPENSSL_LIBRARIES: /opt/homebrew/./libssl.dylib

Signed-off-by: Michael Cho <michael@michaelcho.dev>
@cho-m cho-m added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Apr 22, 2024
@github-actions github-actions bot added the CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. label Apr 22, 2024
@cho-m cho-m added long build Needs CI-long-timeout CI-linux-self-hosted Build on Linux self-hosted runner labels Apr 22, 2024
@carlocab
Copy link
Member

Possibly related: #169728

@iMichka iMichka added the CI-long-timeout Use longer GitHub Actions CI timeout. label Apr 23, 2024
@cho-m
Copy link
Member Author

cho-m commented Apr 23, 2024

dura and git-series have unrelated failures due to Homebrew/brew#17116

@github-actions github-actions bot removed the CI-long-timeout Use longer GitHub Actions CI timeout. label Apr 23, 2024
@cho-m cho-m added the ready to merge PR can be merged once CI is green label Apr 23, 2024
Copy link
Contributor

⚠️ @fxcoudert pre-merge checks failed.

Copy link
Contributor

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Apr 24, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Apr 24, 2024
Merged via the queue into master with commit a3b2465 Apr 24, 2024
14 checks passed
@BrewTestBot BrewTestBot deleted the openssl@3-fix-cmake-libdir branch April 24, 2024 10:25
nijel added a commit to nijel/weblate that referenced this pull request Apr 25, 2024
nijel added a commit to WeblateOrg/weblate that referenced this pull request Apr 25, 2024
maxfierke added a commit to maxfierke/mstrap that referenced this pull request Apr 28, 2024
Static libs are missing for OpenSSL@3 in current GitHub Actions macOS-14 runner
image is broken until it pulls in Homebrew/homebrew-core#169721

Removed "install from API" config too, since auto upgrades are disabled anyway.
maxfierke added a commit to maxfierke/mstrap that referenced this pull request Apr 28, 2024
Static libs are missing for OpenSSL@3 in current GitHub Actions macOS-14 runner
image is broken until it pulls in Homebrew/homebrew-core#169721

Removed "install from API" config too, since auto upgrades are disabled anyway.
maxfierke added a commit to maxfierke/mstrap that referenced this pull request Apr 28, 2024
Static libs are missing for OpenSSL@3 in current GitHub Actions macOS-14 runner
image is broken until it pulls in Homebrew/homebrew-core#169721

Removed "install from API" config too, since auto upgrades are disabled anyway.
maxfierke added a commit to maxfierke/mstrap that referenced this pull request Apr 28, 2024
Static libs are missing for OpenSSL@3 in current GitHub Actions macOS-14 runner
image is broken until it pulls in Homebrew/homebrew-core#169721

Removed "install from API" config too, since auto upgrades are disabled anyway.
@github-actions github-actions bot added the outdated PR was locked due to age label May 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-linux-self-hosted Build on Linux self-hosted runner CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. CI-skip-recursive-dependents Pass --skip-recursive-dependents to brew test-bot. long build Needs CI-long-timeout outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants