Comments (6)
You don't have to describe your negative emotions here with a "sigh". Please be patient and kind. Did you install the OpenSSL 3.0.11 headers (devel) package such as /usr/include/openssl/*.h
files?
from openssl.
Note that we are testing the openssl gem with OpenSSL 3.0.x on Ubuntu
openssl/.github/workflows/test.yml
Line 81 in f948e6b
We are also testing the openssl gem bundled in Ruby (ruby/ruby) on our Ruby project's CI on FreeBSD
FreeBSD 13.1 x64
FreeBSD 12.4 x64
from openssl.
In make.out.txt:
[...]
ossl.c:322:21: warning: implicit declaration of function 'ERR_get_error_all' is invalid in C99 [-Wimplicit-function-declaration]
while ((e = ERR_get_error_all(&file, &line, &func, &data, &flags))) {
^
1 warning generated.
[...]
This isn't quite right. ERR_get_error_all()
is declared in OpenSSL 3.0's openssl/err.h
. ossl.c
does include that file, so this warning should never happen.
ERR_get_error_all()
is a new function in OpenSSL 3.0. My best guess is that header files from OpenSSL <= 1.1 sneaked into the search paths somehow.
What options did you pass to the configure
script? Also please provide ext/openssl/mkmf.log
and ext/openssl/Makefile
which are generated while running make
(after it prints configuring openssl
).
from openssl.
You don't have to describe your negative emotions here with a "sigh".
I've been at this for two days... I've done hundreds of builds with differing variations. I've even transplanted the ext/openssl
files from your master
branch into the directory created when I extracted the tar.gz
file I got from ruby-lang.org. I'm incredibly frustrated...
Did you install the OpenSSL 3.0.11 headers (devel) package such as /usr/include/openssl/*.h files?
On FreeBSD there is no openssl-devel
...like on Debian/Ubuntu. There is only the openssl
port (which installs libraries and headers)...this goes for all the versions available: 1.1.1, 3.0, 3.1, 3.2alpha, etc. I've tried building/installing the openssl
(3.0) port too (instead of relying on pkg
...which works fine -- no warnings). I verified the headers are installed using either pkg
or building openssl
from the port. Here's the openssl
version in the headers:
opensslv.h:
# define OPENSSL_VERSION_MAJOR 3
opensslv.h:# define OPENSSL_VERSION_MINOR 0
opensslv.h:# define OPENSSL_VERSION_PATCH 11
...
opensslv.h:# define OPENSSL_VERSION_STR "3.0.11"
opensslv.h:# define OPENSSL_FULL_VERSION_STR "3.0.11"
opensslv.h:# define OPENSSL_VERSION_TEXT "OpenSSL 3.0.11 19 Sep 2023"
What options did you pass to the configure script?
No options...just cd ~/ruby-3.2.2; ./configure
. The output is attached as configure.out.txt
.
Thanks very much for your response. Attached are the two files you requested (I added the .txt
extension so github wouldn't complain).
configure.out.txt
mkmf.log.txt
Makefile.txt
from openssl.
I found it! There's a set of openssl 1.1.1 headers installed in /usr/include
and a set of openssl 1.1.1 libraries installed in /lib
and /usr/lib
. These directories are searched before /usr/local/lib
by the C/C++ compiler (clang
) and the linker (ld
).
These openssl 1.1.1 headers/libraries were put there when the system was installed...so I can't get rid of them (they're used by things like sudo
and pkg
...and probably the FreeBSD crypto drivers). FreeBSD 14.0 (real soon now) is supposed to upgrade all this to openssl 3.X.
I solved my immediate problem by running configure --with-openssl --with-openssl-dir=/usr/local
. This causes the location of openssl 3.0 to be set explicitly. This is confirmed by
stevewi@dave:~/ruby-3.2.2 $
ldd .ext/x86_64-freebsd13.2/openssl.so
.ext/x86_64-freebsd13.2/openssl.so:
libssl.so.12 => /usr/local/lib/libssl.so.12 (0x13cdcc26000)
<-- openssl 3.0 shared library
libcrypto.so.12 => /usr/local/lib/libcrypto.so.12 (0x13cddfad000)
<-- openssl 3.0 shared library
libm.so.5 => /lib/libm.so.5 (0x13cdd5f9000)
libthr.so.3 => /lib/libthr.so.3 (0x13cdf901000)
libc.so.7 => /lib/libc.so.7 (0x13cda2ba000)
after the build is complete.
stevewi@dave:~/ruby-3.2.2 $
ldd /usr/local/lib/ruby/gems/3.2.0/gems/openssl-3.2.0/lib/openssl.so
/usr/local/lib/ruby/gems/3.2.0/gems/openssl-3.2.0/lib/openssl.so:
libssl.so.12 => /usr/local/lib/libssl.so.12 (0x13cdcc26000)
<-- openssl 3.0 shared library
libcrypto.so.12 => /usr/local/lib/libcrypto.so.12 (0x13cddfad000)
<-- openssl 3.0 shared library
libm.so.5 => /lib/libm.so.5 (0x13cdd5f9000)
libthr.so.3 => /lib/libthr.so.3 (0x13cdf901000)
libc.so.7 => /lib/libc.so.7 (0x13cda2ba000)
after the new build is installed confirms this as well.
This was the clue:
ERR_get_error_all()
is a new function in OpenSSL 3.0. My best guess is that header files from OpenSSL <= 1.1 sneaked into the search paths somehow.
Thanks for your help.
from openssl.
This issue is now resolved.
from openssl.
Related Issues (20)
- macos-latest truffeeruby-head: test_basic_response_response_operations failing HOT 3
- truffleruby-head 24.0.0-dev: Failing to compile dependant stringio gem. HOT 14
- OpenSSL::PKey::EC.new(nil).generate_key fails with OpenSSL::PKey::PKeyError HOT 6
- OpenSSL 3.2.0 - sessions, time, signed vs unsigned, failure with negative session timeout values HOT 6
- OpenSSL::SSL::SSLContext.new returns SSL_CTX_new: library has no ciphers HOT 6
- Respect system wide minimum TLS version HOT 2
- windows-latest 3.3 case failing with "OpenSSL::Provider::ProviderError: Failed to load legacy provider: (null) (name=legacy)" HOT 8
- OpenSSL::PKey::PKey subclass for EVP_PKEY_RSA_PSS HOT 4
- Error "Failed to build gem native extension." when running "gem install openssl" in Fedora HOT 4
- OpenSSL udate 3.2.1 for CVE-2023-6129 HOT 3
- OpenSSL 3 | Providers | Support broader range of URI schemes for loading keys HOT 3
- OpenSSL 3 support for loading engine keys HOT 3
- OpenSSL version 3.3.0-dev: OpenSSL::ASN1::ASN1Error: utctime/generalizedtime is too short HOT 7
- OpenSSL::ASN1.decode doesn't correctly parse UTCTime or GeneralizedTime with fractional seconds or a timezone
- remove file check to support proxied SSL connection HOT 5
- When decrypted with a different private key, `OpenSSL::PKey::RSAError` does not occur HOT 2
- Upcoming OpenSSL Webinar: Writing Your First OpenSSL Application
- Invalid CSR versions set in regress tests HOT 2
- OpenSSL::SSL::SSLError: SSL_write: unsupported method HOT 4
- Can we please cut a 3.3.0 release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openssl.