Skip to content
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

getting an error from ssl? #1207

Closed
briandsquinn opened this issue Jun 5, 2018 · 6 comments
Closed

getting an error from ssl? #1207

briandsquinn opened this issue Jun 5, 2018 · 6 comments

Comments

@briandsquinn
Copy link

briandsquinn commented Jun 5, 2018

been getting this error with any version of Ruby I try to install. I've tried reinstalling openssl and still getting the same thing.

here's the last few lines of the log file it created:

linking shared-object objspace.so
make[2]: Leaving directory '/tmp/ruby-build.20180605123236.4773/ruby-2.2.7/ext/objspace'
make[2]: Entering directory '/tmp/ruby-build.20180605123236.4773/ruby-2.2.7/ext/openssl'
compiling ossl_ssl_session.c
In file included from ossl.h:58:0,
from ossl_ssl_session.c:5:
/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."
#error "This file is obsolete; please update your software."
^~~~~
In file included from ossl.h:220:0,
from ossl_ssl_session.c:5:
openssl_missing.h:79:35: error: macro "EVP_MD_CTX_create" passed 1 arguments, but takes just 0
EVP_MD_CTX *EVP_MD_CTX_create(void);
^
In file included from /usr/include/openssl/x509.h:23:0,
from /usr/include/openssl/x509v3.h:14,
from ossl.h:59,
from ossl_ssl_session.c:5:
openssl_missing.h:83:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
^
openssl_missing.h:91:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
^
In file included from ossl.h:234:0,
from ossl_ssl_session.c:5:
ossl_pkey.h:44:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if HAVE_BN_GENCB
^~~~~~~~~~~~~
ossl_pkey.h:44:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
ossl_pkey.h:44:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
ossl_ssl_session.c: In function ‘SSL_SESSION_cmp’:
ossl_ssl_session.c:79:10: error: dereferencing pointer to incomplete type ‘SSL_SESSION {aka const struct ssl_session_st}’
if (a->ssl_version != b->ssl_version ||
^~
ossl_ssl_session.c:83:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:293: recipe for target 'ossl_ssl_session.o' failed
make[2]: *** [ossl_ssl_session.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20180605123236.4773/ruby-2.2.7/ext/openssl'
exts.mk:205: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default nkf libraries
linking shared-object nkf.so
make[2]: Leaving directory '/tmp/ruby-build.20180605123236.4773/ruby-2.2.7/ext/nkf'
make[1]: Leaving directory '/tmp/ruby-build.20180605123236.4773/ruby-2.2.7'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2

@briandsquinn
Copy link
Author

edits were me being a noob at github. trying to figure out that quote thing. ¯_(ツ)_/¯

@mislav
Copy link
Member

mislav commented Jun 6, 2018

It would really help if you provided:

  • ruby-build version
  • your OS information
  • which -a openssl and openssl version

@briandsquinn
Copy link
Author

briandsquinn commented Jun 6, 2018

AH! i guess it would, wouldn't it?

Ruby_Build version 20170726
Ubuntu 18.04 LTS
OpenSSL 1.1.0g 2 Nov 2017

i also did openssl version -a and got:

OpenSSL 1.1.0g 2 Nov 2017
built on: reproducible build, date unspecified
platform: debian-amd64
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR=""/usr/lib/ssl"" -DENGINESDIR=""/usr/lib/x86_64-linux-gnu/engines-1.1""
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"

is that what you need for -a oppenssl ?

@mislav
Copy link
Member

mislav commented Jun 7, 2018

@briandsquinn Thank you! Could you try a newer version of ruby-build to see if there are any differences? https://github.com/rbenv/ruby-build/releases

@tpope
Copy link

tpope commented Jun 14, 2018

Same setup with 20180601 and can confirm the same failure. I was able to sidestep the issue by installing libssl1.0-dev.

@hsbt
Copy link
Member

hsbt commented Jun 24, 2018

The old Ruby (< Ruby 2.4) didn't support openssl 1.1. Please do install libssl1.0 and libssl1.0-dev or upgrade your ruby version that was the latest version like 2.5.

See https://github.com/rbenv/ruby-build/wiki#openssl-usrincludeopensslasn1_mach102-error-error-this-file-is-obsolete-please-update-your-software

@hsbt hsbt closed this as completed Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants