You are not logged in.
I'm trying to install a gem "puma" and it fails. Searching, I've found that I'd have to install libssl-dev, libsl in Ubuntu. However, they're installed already in my Arch system: openssl, libsm and libssl.
$ gem install puma -v '3.6.0'
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
current directory: /home/me123/.gem/ruby/2.4.0/gems/puma-3.6.0/ext/puma_http11
/home/me123/.rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170513-3091-d0khjr.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/me123/.gem/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/puma-3.6.0/mkmf.log
current directory: /home/me123/.gem/ruby/2.4.0/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR=" clean
current directory: /home/me123/.gem/ruby/2.4.0/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
In file included from ext/puma_http11/http11_parser.rl:7:0:
ext/puma_http11/http11_parser.rl: In function ‘puma_parser_execute’:
ext/puma_http11/http11_parser.rl:111:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ext/puma_http11/http11_parser.rl: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c: In function ‘get_dh1024’:
mini_ssl.c:90:5: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
^~
mini_ssl.c: In function ‘engine_init_server’:
mini_ssl.c:139:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
ID sym_cert = rb_intern("cert");
^~
mini_ssl.c:144:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
ID sym_ca = rb_intern("ca");
^~
mini_ssl.c:166:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
DH *dh = get_dh1024();
^~
mini_ssl.c:170:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_secp521r1);
^~~~~~
mini_ssl.c: In function ‘engine_init_client’:
mini_ssl.c:197:3: warning: ‘DTLSv1_method’ is deprecated [-Wdeprecated-declarations]
conn->ctx = SSL_CTX_new(DTLSv1_method());
^~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from mini_ssl.c:15:
/usr/include/openssl/ssl.h:1614:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
^
mini_ssl.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
make: *** [Makefile:242: mini_ssl.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/me123/.gem/ruby/2.4.0/gems/puma-3.6.0 for inspection.
Results logged to /home/me123/.gem/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/puma-3.6.0/gem_make.outHow to fix it?
Offline
Hi, did you find a solution other than using a more recent version? I can install puma 3.9.1 but would if possible like to be able to use 3.6.0.
Offline
Same here. This bit seems to be relevant:
mini_ssl.c: In function ‘get_dh1024’:
mini_ssl.c:84:5: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
^~any help would be much appreciated.
Offline
You can try newer versions of puma or you can build it using this line:
$ yaourt -S openssl-1.0
$ gem install puma -v 3.6 -- --with-cppflags=-I/usr/include/openssl-1.0
$ bundle installOffline