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
Ability to override OpenSSL version w/pkg_config #1412
Comments
This would indeed be handy. I'm trying to install Puma in Ruby 2.3.1 with LibreSSL (or OpenSSL 1.0.1f but I can't get Ruby to install correctly, anyway) |
I can't figure this one out. Not a c programmer, and mkmf is pretty confusing! I can get pkg_config to return libressl, but the generated makefile still contains openssl. So I'm not sure where I'm going wrong. For anyone attempting this, a successful patch will make: bundle exec ruby -Ilib -e "require 'puma'; require 'puma/minissl'; require 'puma/puma_http11'; Puma::Server.class; Puma::MiniSSL.check; puts Puma::MiniSSL::OPENSSL_LIBRARY_VERSION" ...return LibreSSL, not OpenSSL. |
@nateberkopec Not a C programmer either.
Show the code, please. I mean, the way it is now, there's no way to make it search for For example, on Arch Linux you can install And this one:
is supposed to show what exactly? Is |
ack sorry What I'm saying is that, if you clone down Puma and then:
...then you should compile Puma with Libressl. If that worked, then...
should return a string saying "LibreSSL" |
Might as well make it three. I briefly tried the code from ruby/openssl, but it didn't work. I know some of the build options available should allow one to link to another openssl version, but I haven't checked. Also, I believe one can set build flags when using Bundler, but I can't recall how...
Does a Ruby built with it show "LibreSSL"? Sorry, dumb question by a Windows guy... |
@nateberkopec Why would it? You don't tell it to use https://ruby-doc.org/stdlib-2.6.5/libdoc/mkmf/rdoc/MakeMakefile.html#method-i-pkg_config
You can take a look at the But I tried anyway:
|
I messed with pkg_config, just didn't seem to work. But, you might try the following:
EDIT: I'm on windows, but my build system and the version of Ruby I was running both have OpenSSL 1.1.1d installed. When I ran the above using a folder with OpenSSL 1.0.2t, the so file was compiled against the 1.0.2 files, as it's easy to see, as the OpenSSL file names changed between 1.0.2 & 1.1.0... |
@MSP-Greg Not in my case:
|
Interesting. Can you install the openssl gem using pkg_config? |
Okay, probably my bad. I had includes in
But this one doesn't:
But that's a known issue. Passing multiple parameters will supposedly be fixed in Now then, this one also works:
But no way to install it with |
Sorry. My default Ruby is trunk/master/head. You mentioned something about your lib & include folder layout above, I'm glad you got it to (sort of) work. One question. Did you have any luck using pkg_config with OpenSSL? I'm kind of wrestling with something else, but if you can get it to work, we can probably get changes in Puma's extconf.rb... |
I'm not sure I understand your question.
Maybe to make it work with
|
If you can't get PKG_CONFIG_PATH to work then please modify this gem source so env variables like OPENSSL-LIB and OPENSSL-INCLUDE populates --with-openssl-lib --with-openssl-include so sysadmin can set those and not instruct every single user to set --with-openssl-lib= --with-openssl-include .... |
#2648 works fine. I hope it will get included into main branch soon so my users don't have to use --with-openssl-lib --with-openssl-include= |
Why don't you make use of pkg_config?
Steps to reproduce
Expected behavior
Gem installs successfully
Actual behavior
System configuration
Ruby version: 2.3.4p301
Puma version: 3.6.0
The text was updated successfully, but these errors were encountered: