Opened 23 months ago
Closed 23 months ago
#63845 closed defect (fixed)
ruby30 fails to build because of openssl 3 even though it is marked portgroup openssl 1.0
Reported by: | pmetzger (Perry E. Metzger) | Owned by: | kimuraw (kimura wataru) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | monterey | Cc: | mascguy (Christopher Nielsen), rtib (Tibor Répási) |
Port: | ruby30 |
Description (last modified by pmetzger (Perry E. Metzger))
Although the portfile for ruby30 is marked for portgroup openssl 1.0, for reasons I don't understand, my build on Monterey errors out with loads of errors that refer specifically to openssl3, like
:info:build /opt/local/libexec/openssl3/include/openssl/rsa.h:220:1: note: 'RSA_get0_factors' has been explicitly marked deprecated here
I'm not sure what's going on.
Attachments (1)
Change History (18)
comment:1 Changed 23 months ago by pmetzger (Perry E. Metzger)
Description: | modified (diff) |
---|
comment:2 Changed 23 months ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:3 Changed 23 months ago by mascguy (Christopher Nielsen)
comment:4 Changed 23 months ago by pmetzger (Perry E. Metzger)
The error that finally kills the build is:
:info:build ossl_pkey_rsa.c:950:5: error: use of undeclared identifier 'RSA_SSLV23_PADDING' :info:build DefRSAConst(SSLV23_PADDING); :info:build ^ :info:build ossl_pkey_rsa.c:885:58: note: expanded from macro 'DefRSAConst' :info:build #define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x)) :info:build ^ :info:build <scratch space>:60:1: note: expanded from here :info:build RSA_SSLV23_PADDING :info:build ^ :info:build 109 warnings and 1 error generated.
comment:5 Changed 23 months ago by ryandesign (Ryan Schmidt)
Keywords: | monterey added |
---|---|
Owner: | set to kimuraw |
Status: | new → assigned |
Please attach the main.log file.
Changed 23 months ago by pmetzger (Perry E. Metzger)
main.log for the build
comment:7 Changed 23 months ago by catap (Kirill A. Korinsky)
FYI RSA SSLv23 was removed from OpenSSL 3: https://github.com/openssl/openssl/commit/b0aae913246af1d07e728d24f53f55028f61c696
comment:8 follow-up: 10 Changed 23 months ago by pmetzger (Perry E. Metzger)
Yes, but given that the portfile specifies the OpenSSL 1.0 portgroup it is mysterious to me that it is trying to use OpenSSL 3 at all.
comment:9 Changed 23 months ago by mascguy (Christopher Nielsen)
Based on the logs, it appears that the OpenSSL header location isn't being added by the portfile, nor is the library search path being properly set:
CPPFLAGS = -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT DLDFLAGS = -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -arch x86_64 -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/opt/local/lib -install_name /opt/local/lib/libruby.3.0.dylib -compatibility_version 3.0 -current_version 3.0.2 -fstack-protector-strong -framework Security -framework Foundation -fstack-protector-strong -framework Security -framework Foundation -arch x86_64
So the appropriate flags need to be adjusted, to prepend something akin to -I [openssl::include_dir]
for the headers, and -L [openssl::lib_dir]
for the libs.
There may be a better way, like passing OpenSSL-specific flags for those paths. But that's the general gist.
comment:10 Changed 23 months ago by jmroot (Joshua Root)
Replying to pmetzger:
Yes, but given that the portfile specifies the OpenSSL 1.0 portgroup it is mysterious to me that it is trying to use OpenSSL 3 at all.
An important detail that may have caused confusion by its omission so far is that ruby30 also sets openssl.branch 1.1
.
comment:11 Changed 23 months ago by kimuraw (kimura wataru)
Status: | assigned → accepted |
---|
it looks pkg-config in ext/openssl/extconf.rb retruns unexpexted results. I'll fix it.
comment:15 Changed 23 months ago by rtib (Tibor Répási)
Cc: | rtib added |
---|
comment:16 Changed 23 months ago by kimura wataru <kimuraw@…>
comment:17 Changed 23 months ago by kimura wataru <kimuraw@…>
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
I'm seeing plenty of OpenSSL-related deprecation warnings in various ports, but not actual errors.
Which error(s) are you specifically seeing?