From: shevegen@... Date: 2014-08-23T21:07:22+00:00 Subject: [ruby-core:64513] [ruby-trunk - Bug #10166] Problem with openssl and ext/openssl - ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] Issue #10166 has been updated by Robert A. Heiler. Sorry for the strange last line, I did not intend to have python appear so big - the last line was a set of = so I assume that the formatting automatically makes the last stuff appear bold ======================================================================== ---------------------------------------- Bug #10166: Problem with openssl and ext/openssl - ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] https://bugs.ruby-lang.org/issues/10166#change-48455 * Author: Robert A. Heiler * Status: Open * Priority: Low * Assignee: * Category: * Target version: * ruby -v: 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- Hi guys, Not sure if it is worth reporting but I guess it is better to report twice than zero times, in the event someone else already reported it. I have compiled ruby from source lately. The version is: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] I downloaded it from this URL: wget ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2 Now, I am using a debian-base system and I decided to compile most stuff anew, including readline, ncurses etc... Readline bindings of Ruby work well, but I have problems with openssl. I just finished compiling openssl from source: wget ftp://ftp.openssl.org/source/openssl-1.0.1i.tar.gz I followed the LFS guide here: http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html This works, and now I have openssl 1.0.1i installed. But ruby does not seem to like it. When I go into ext/openssl, I run this command: ruby extconf.rb Now, many checks happen, and a Makefile is created in the end: checking for t_open() in -lnsl... no checking for socket() in -lsocket... no checking for assert.h... yes checking for openssl/ssl.h... yes checking for openssl/conf_api.h... yes checking for SSL_library_init() in openssl/ssl.h with -Werror=deprecated-declarations... yes checking for openssl/ssl.h... yes checking for ERR_peek_last_error()... yes checking for ASN1_put_eoc()... yes checking for BN_mod_add()... yes checking for BN_mod_sqr()... yes checking for BN_mod_sub()... yes checking for BN_pseudo_rand_range()... yes checking for BN_rand_range()... yes checking for CONF_get1_default_config_file()... yes checking for EVP_CIPHER_CTX_copy()... yes checking for EVP_CIPHER_CTX_set_padding()... yes checking for EVP_CipherFinal_ex()... yes checking for EVP_CipherInit_ex()... yes checking for EVP_DigestFinal_ex()... yes checking for EVP_DigestInit_ex()... yes checking for EVP_MD_CTX_cleanup()... yes checking for EVP_MD_CTX_create()... yes checking for EVP_MD_CTX_destroy()... yes checking for EVP_MD_CTX_init()... yes checking for HMAC_CTX_cleanup()... yes checking for HMAC_CTX_copy()... yes checking for HMAC_CTX_init()... yes checking for PEM_def_callback()... yes checking for PKCS5_PBKDF2_HMAC()... yes checking for PKCS5_PBKDF2_HMAC_SHA1()... yes checking for X509V3_set_nconf()... yes checking for X509V3_EXT_nconf_nid()... yes checking for X509_CRL_add0_revoked()... yes checking for X509_CRL_set_issuer_name()... yes checking for X509_CRL_set_version()... yes checking for X509_CRL_sort()... yes checking for X509_NAME_hash_old()... yes checking for X509_STORE_get_ex_data()... no checking for X509_STORE_set_ex_data()... no checking for OBJ_NAME_do_all_sorted()... yes checking for SSL_SESSION_get_id()... yes checking for SSL_SESSION_cmp()... no checking for OPENSSL_cleanse()... yes checking for SSLv2_method()... yes checking for SSLv2_server_method()... yes checking for SSLv2_client_method()... yes checking for TLSv1_1_method()... yes checking for TLSv1_1_server_method()... yes checking for TLSv1_1_client_method()... yes checking for TLSv1_2_method()... yes checking for TLSv1_2_server_method()... yes checking for TLSv1_2_client_method()... yes checking for OPENSSL_NPN_NEGOTIATED in openssl/ssl.h... yes checking for SSL_set_tlsext_host_name() in openssl/ssl.h... no checking for SSL_set_tlsext_host_name in openssl/ssl.h... yes checking for openssl/engine.h... yes checking for ENGINE_add()... yes checking for ENGINE_load_builtin_engines()... yes checking for ENGINE_load_openbsd_dev_crypto()... no checking for ENGINE_get_digest()... yes checking for ENGINE_get_cipher()... yes checking for ENGINE_cleanup()... yes checking for ENGINE_load_dynamic()... yes checking for ENGINE_load_4758cca()... no checking for ENGINE_load_aep()... no checking for ENGINE_load_atalla()... no checking for ENGINE_load_chil()... no checking for ENGINE_load_cswift()... no checking for ENGINE_load_nuron()... no checking for ENGINE_load_sureware()... no checking for ENGINE_load_ubsec()... no checking for ENGINE_load_padlock()... no checking for ENGINE_load_capi()... no checking for ENGINE_load_gmp()... no checking for ENGINE_load_gost()... no checking for ENGINE_load_cryptodev()... yes checking for ENGINE_load_aesni()... no checking for DH_generate_parameters_ex()... yes checking for DSA_generate_parameters_ex()... yes checking for RSA_generate_key_ex()... yes checking for OpenSSL version is 0.9.7 or later... yes checking for openssl/ocsp.h... yes checking for CRYPTO_THREADID.ptr in openssl/crypto.h... yes checking for EVP_CIPHER_CTX.flags in openssl/evp.h... yes checking for EVP_CIPHER_CTX.engine in openssl/evp.h... yes checking for X509_ATTRIBUTE.single in openssl/x509.h... yes checking for OPENSSL_FIPS in openssl/opensslconf.h... no checking for EVP_CTRL_GCM_GET_TAG in openssl/evp.h... yes creating extconf.h creating Makefile Next, I run make command: make compiling ossl_ssl_session.c compiling ossl_x509store.c compiling ossl_digest.c compiling ossl_pkey_dsa.c compiling ossl_hmac.c compiling ossl_cipher.c compiling ossl_x509req.c compiling ossl_rand.c compiling ossl_pkcs12.c compiling openssl_missing.c compiling ossl_x509attr.c compiling ossl_x509ext.c compiling ossl_pkey_ec.c compiling ossl_bn.c compiling ossl_x509name.c compiling ossl_config.c compiling ossl_x509cert.c compiling ossl_x509revoked.c compiling ossl_ssl.c compiling ossl_pkcs5.c compiling ossl_x509crl.c compiling ossl_pkey_rsa.c compiling ossl_x509.c compiling ossl_engine.c compiling ossl_pkey.c make: *** No rule to make target '/thread_native.h', needed by 'ossl.o'. Stop. And here I do not know what to do. I do not know what is the header file thread_native.h but it is in the same directory: /Depot/Temp/ruby-2.1.2/thread_native.h I did a cat, and here is what it is: #ifndef RUBY_THREAD_NATIVE_H #define RUBY_THREAD_NATIVE_H #if defined(_WIN32) #include "thread_win32.h" #elif defined(HAVE_PTHREAD_H) #include "thread_pthread.h" #else #error "unsupported thread type" #endif RUBY_SYMBOL_EXPORT_BEGIN rb_nativethread_id_t rb_nativethread_self(); void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock); void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock); void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock); void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock); RUBY_SYMBOL_EXPORT_END #endif I am not sure how to proceed here. Is it possible to add a better error-description here so that the user understands what is wrong? I believe something may be wrong with threads on my system, but only in regards to openssl perhaps? If you can help me fix this error it would be very appreciated too, as rubygems requires openssl (unfortunately). Last but not least, here is my system output: ======================================================================== Operating System: GNU/Linux OS Bit Type: x86_64 Kernel Version: 3.13.0 GCC Version: 4.8.2 Glibc Version: (Ubuntu EGLIBC 2.19-0ubuntu6) 2.19 CFLAGS in use: -O2 -fPIC -fno-strict-overflow RAM: 7876284 kB RAM (7691.7 MB) (7.5 Gig) Binutils Version: 2.24 Make Version in use: 4.0 Cmake Version in use: 2.8.12.1 CPU Model: Intel(R) Celeron(R) CPU G1630 @ 2.80GHz Screen Resolution: 1920x1080 Openssl Version: 1.0.1i Tar Version: 1.27.1 Ruby Version: 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] Rubygems Version: 2.4.1 Rubygems Installation Directory: /usr/lib/ruby/gems/2.1.0 GTK Version 2: 2.24.22 GTK Version 3: 3.13.7 Glib Version: 2.41.3 ATK Version: 2.13.3 Pango Version: 1.36.6 Cairo Version: 1.12.16 Bison Version: 3.0.2 Intltool Version: 0.50.2 Nasm version: 2.11.05 M4 version: 1.4.17 Flex Version: 2.5.39 Readline Version: 6.3 File version: 5.14 KDE Version: 4.13.0 Grep Version: 2.16 Coreutils Version: 8.21 Fontconfig Version: 2.11.1 Perl Version: 5.20.0 Python Version: 2.7.8 ======================================================================== -- https://bugs.ruby-lang.org/