actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

macOS output of $(pkg-config --libs openssl ) incorrect #9789

Closed slewsys closed 1 week ago

slewsys commented 1 week ago

Description

On GitHub runner for macos-latest, with openssl installed via brew (workflow here: ed.yml), pkg-config produces an incorrect library path for linking libssl. Instead of:

-L/opt/homebrew/Cellar/openssl@3/3.3.0/lib -lssl -clrypto

it produces:

-L/opt/homebrew/Cellar/openssl@3/3.3.0 -lssl -lcrypto

as seen here link step.

The issue is not repeatable locally on M1/macOS 14.4.1 Homebrew 4.2.20-104-gdfbf269. In this particular case, explicitly setting LDFLAGS during configure is a workaround as seen here: configure step.

Platforms affected

Runner images affected

Image version and build link

Version: 20240422.3 Build link

Is it regression?

Maybe? Was openssl recently removed from macOS runners?

Expected behavior

After installing openssl:

brew install m4 autoconf automake libtool gettext openssl texinfo
brew unlink openssl@1.1 &&  brew link --force --overwrite openssl@3

then

pkg-config --libs openssl

should report:

-L/opt/homebrew/Cellar/openssl@3/3.3.0/lib -lssl -lcrypto

Actual behavior

-L/opt/homebrew/Cellar/openssl@3/3.3.0 -lssl -lcrypto

i.e., the lib subdirectory is missing.

Repro steps

Run an action on macos-latest that installs openssl and attempts to link against the installed -lssl.

erik-bershel commented 1 week ago

Heads up!

It's a clone of the existing issue: https://github.com/actions/runner-images/issues/9759 You may use brew upgrade as a workaround. Will be fixed with the next image rollout.