Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 646734

Summary: dev-lang/ruby:2.3 with >=dev-libs/openssl-1.1.0: "Ignore OpenSSL broken by Apple" silent failure
Product: Gentoo Linux Reporter: Quentin Minster <quentin>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, dschridde+gentoobugs, mike, quentin, thomas.bettler
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 661262    
Bug Blocks: 592438    
Attachments: build.log
ruby-2.3.6-openssl1.1-detection.patch

Description Quentin Minster 2018-02-06 07:40:59 UTC
Created attachment 518054 [details]
build.log

While building dev-lang/ruby-2.3.6 (with 'ssl' USE flag enabled), I noticed the following in the build output:

  ../.././ext/openssl/extconf.rb
  Ignore OpenSSL broken by Apple.
  Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl')
  Failed to configure openssl. It will not be installed.

However the build proceeded fine.

I checked, and indeed Ruby 2.3 does not seem to properly detect OpenSSL 1.1.0, so it silently disables the OpenSSL module. This is likely to cause errors down the road.

The failed detection is due to OpenSSL 1.1.0 deprecating and removing declarations from its headers. I'm attaching a patch that fixes detection (for the 2.3 branch).
The patch has also been submitted upstream: https://github.com/ruby/ruby/pull/1810
Comment 1 Quentin Minster 2018-02-06 07:41:38 UTC
Created attachment 518056 [details, diff]
ruby-2.3.6-openssl1.1-detection.patch
Comment 2 Quentin Minster 2018-02-06 22:55:02 UTC
Comment on attachment 518056 [details, diff]
ruby-2.3.6-openssl1.1-detection.patch

I'm retracting from my previous statement: this patch does fix OpenSSL 1.1.0 detection, but the build still fails, silently.

So this is still an issue, but I don't have a fix. Backporting OpenSSL 1.1.0 compatibility from Ruby 2.5 is too much work for me right now.
Comment 3 Craig Andrews gentoo-dev 2018-12-10 16:33:39 UTC
I think it's pretty clear that we're not going to be creating a patch for Ruby 2.3 to support OpenSSL 1.1 any time soon, and upstream isn't going to do it for us.

So I think the solution is to update the ruby 2.3 ebuilds to request <dev-lib/openssl-1.1 and call it day; I've submitted a pull request to do that: https://github.com/gentoo/gentoo/pull/10606
Comment 4 Larry the Git Cow gentoo-dev 2018-12-11 09:48:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51ae16ec01c1575c8335066aa2620d8bc3bede0e

commit 51ae16ec01c1575c8335066aa2620d8bc3bede0e
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2018-12-11 09:08:25 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2018-12-11 09:48:06 +0000

    dev-lang/ruby: 2.3 requires <dev-libs/openssl-1.1
    
    Ruby 2.3 does not compile with dev-libs/openssl-1.1.0 or newer
    and this will not be fixed upstream since ruby 2.3 is EOL in
    March 2019 and currently only receives security fixes.
    
    Thanks to candrews for the proposed approach to this.
    
    Fixes: https://bugs.gentoo.org/646734
    Package-Manager: Portage-2.3.51, Repoman-2.3.11
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-lang/ruby/Manifest             |   1 +
 dev-lang/ruby/ruby-2.3.8-r1.ebuild | 242 +++++++++++++++++++++++++++++++++++++
 2 files changed, 243 insertions(+)