I experience "Undefined symbol "EVP_PKEY_get0_RSA" errors with this port because of the patch that was committed in r465590. Removing files/patch-ext_openssl_openssl__missing.h from the port fixes the problem for me. I am compiling against OpenSSL in base. OpenSSL 1.0.2k-freebsd 26 Jan 2017 # ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [amd64-freebsd11] # irb irb(main):001:0> require 'openssl'; OpenSSL::PKey::RSA.new(`openssl genrsa`).private_encrypt('foo') Generating RSA private key, 2048 bit long modulus .....+++ ...............................................................+++ e is 65537 (0x10001) /usr/local/lib/ruby/2.5/amd64-freebsd11/openssl.so: Undefined symbol "EVP_PKEY_get0_RSA" This is related to bug 226852 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226852) - the fix for it was committed upstream and now causes this bug.
Created attachment 195147 [details] Fix openssl ext behavior with OpenSSL 1.0 This patch should fix runtime behavior with both OpenSSL from base and from security/openssl port (broken since ports r465590, bug #226852). Current status, without this patch: ssl=base runtime behavior is broken ssl=openssl runtime behavior is broken ssl=openssl-devel does not build ssl=libressl OK ssl=libressl-devel OK After applying the patch: ssl=base OK ssl=openssl OK ssl=openssl-devel does not build ssl=libressl OK ssl=libressl-devel OK I'm not sure yet why I can't build against openssl-devel, but I've been using this patch with ssl=openssl since a few months and didn't notice any particular problem. I just checked again that it still allow building with ssl=libressl-devel, and seems to run fine.
Created attachment 195149 [details] Fix openssl ext behavior with OpenSSL 1.0 Updated patch to be more similar to the one for lang/ruby24: ports r471799, reported in bug 227851. Alternatively, we can just remove patch added in ports r465590 and copy the one from lang/ruby24: svn rm lang/ruby25/files/patch-ext_openssl_openssl__missing.h cp lang/ruby24/files/patch-ext-openssl-extconf.rb lang/ruby25/files svn add lang/ruby25/files/patch-ext-openssl-extconf.rb
A commit references this bug: Author: swills Date: Wed Aug 15 18:23:46 UTC 2018 New revision: 477249 URL: https://svnweb.freebsd.org/changeset/ports/477249 Log: lang/ruby25: Fix with ports OpenSSL and LibreSSL PR: 229119 PR: 226852 Submitted by: Thibault Jouan <tj+freebsd_ports@a13.fr> Reported by: Piotr Kubaj <pkubaj@anongoth.pl> With hat: ruby@ Changes: head/lang/ruby25/files/patch-ext-openssl-extconf.rb head/lang/ruby25/files/patch-ext_openssl_openssl__missing.h
Committed, thanks!