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

Fix linking to older OpenSSL for Ruby < 2.7.7 #2322

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Conversation

mislav
Copy link
Member

@mislav mislav commented Dec 7, 2023

Explicitly set PKG_CONFIG_PATH when --with-openssl-dir is used for older Rubies. Otherwise, Ruby will attempt to link to the latest OpenSSL found by pkg-config, which could be incompatible.

Even though these Ruby versions are EOL, people are still inexplicably using them, and this problem comes up over and over again in user support questions.

# openssl gem version that fixes this is 2.1.4
$ curl -fsSL https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.bz2 | \
    tar jxO -- \*/ext/openssl/openssl.gemspec | grep -w version
  spec.version       = "2.1.3"

Explicitly set PKG_CONFIG_PATH when `--with-openssl-dir` is used for older Rubies.
Otherwise, Ruby will attempt to link to the latest OpenSSL found by pkg-config,
which could be incompatible.
@mislav mislav merged commit 974ec23 into master Dec 8, 2023
6 checks passed
@mislav mislav deleted the pkg-config-workaround branch December 8, 2023 09:37
@eregon
Copy link
Member

eregon commented Dec 8, 2023

Nice, PKG_CONFIG_PATH is what truffleruby internally used to set as well before it was fixed in the openssl gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants