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

Cannot build and install openssl_1_1_1x on CentOS 7.6 #9086

Open
harmin-parra opened this issue Jun 5, 2019 · 7 comments
Open

Cannot build and install openssl_1_1_1x on CentOS 7.6 #9086

harmin-parra opened this issue Jun 5, 2019 · 7 comments
Labels
inactive triaged: bug The issue/pr is/fixes a bug

Comments

@harmin-parra
Copy link

untar file OpenSSL_1_1_1c.tar.gz or OpenSSL_1_1_1b.tar.gz or OpenSSL_1_1_1a.tar.gz
cd openssl_1_1_1x
./config
make
make install

Output :

install libcrypto.a -> /usr/local/lib/libcrypto.a
install libssl.a -> /usr/local/lib/libssl.a
link /usr/local/lib/libcrypto.so -> /usr/local/lib/libcrypto.so.1.1
install libcrypto.so -> /usr/local/lib/libcrypto.so
install libcrypto.so.1.1 -> /usr/local/lib/libcrypto.so
ar: /usr/local/lib/libcrypto.so: File format not recognized
ar: /usr/local/lib/libcrypto.so.new: File format not recognized
make: *** [install_dev] Error 1

@mattcaswell mattcaswell added the triaged: bug The issue/pr is/fixes a bug label Nov 19, 2019
@levitte
Copy link
Member

levitte commented Nov 19, 2019

Sorry for taking so long to get around to this. Is this still an issue? If it is, please provide the output from perl configdata.pm --dump

@CSimpiFoN
Copy link

Hello I have the same issue on a CentOS 7.7 and OpenSSL 1.1.1c
I attached the output of the command @levitte mentioned
dump.txt

@CSimpiFoN
Copy link

CSimpiFoN commented Jan 13, 2020

Actually I also found this thread: #6641 and I updated Text::Template to version 1.58, but it did not help.
Honestly, I don't know if I did right, but cpan -l | grep Text::Template shows 3 entries:
Text::Template 1.58
Text::Template::Preprocess 1.58
external::perl::transfer::Text::Template 1.46

I cannot find where 'external::perl::transfer::Text::Template 1.46' is installed, thus, I cannot remove it, but I suppose the version 1.58 should be used.

@petrovr
Copy link

petrovr commented Jan 13, 2020

$ cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)

After correction for #10759 1.1.1 stable branch builds fine even with --with-rand-seed=devrandom .

Difference between my current configuration and dump.txt from previous post is following:

--- my	2020-01-13 21:36:34.118125563 +0200
+++ other	2020-01-13 21:36:45.318063882 +0200
@@ -1,8 +1,7 @@
-[centos@localhost openssl-1.1.1_stable]$ perl configdata.pm --dump
 
 Command line (with current working directory = .):
 
-    /usr/bin/perl ./Configure linux-x86_64 --with-rand-seed=devrandom
+    /usr/bin/perl ./Configure linux-x86_64 --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
 
 Perl information:
 
@@ -33,7 +32,6 @@
     dgram
     dh
     dsa
-    dso
     dtls
     dynamic-engine
     ec
@@ -83,6 +81,7 @@
     ts
     ui-console
     whirlpool
+    zlib
     tls1
     tls1-method
     tls1_1
@@ -97,7 +96,7 @@
 
 Disabled features:
 
-    afalgeng                [too-old-kernel] OPENSSL_NO_AFALGENG
+    afalgeng                [too-old-kernel]
     asan                    [default]        OPENSSL_NO_ASAN
     crypto-mdebug           [default]        OPENSSL_NO_CRYPTO_MDEBUG
     crypto-mdebug-backtrace [default]        OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
@@ -116,7 +115,6 @@
     ubsan                   [default]        OPENSSL_NO_UBSAN
     unit-test               [default]        OPENSSL_NO_UNIT_TEST
     weak-ssl-ciphers        [default]        OPENSSL_NO_WEAK_SSL_CIPHERS
-    zlib                    [default]        
     zlib-dynamic            [default]        
     ssl3                    [default]        OPENSSL_NO_SSL3
     ssl3-method             [default]        OPENSSL_NO_SSL3_METHOD
@@ -132,8 +130,8 @@
     HASHBANGPERL => "/usr/bin/env perl",
     RANLIB => "ranlib",
     RC => "windres",
-    aes_asm_src => "aes_core.c aes_cbc.c vpaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
-    aes_obj => "aes_core.o aes_cbc.o vpaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o",
+    aes_asm_src => "aes-x86_64.s vpaes-x86_64.s bsaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
+    aes_obj => "aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o",
     apps_aux_src => "",
     apps_init_src => "",
     apps_obj => "",
@@ -155,7 +153,7 @@
     cpuid_asm_src => "x86_64cpuid.s",
     cpuid_obj => "x86_64cpuid.o",
     cxxflags => "-std=c++11 -pthread -m64",
-    defines => [  ],
+    defines => [ "ZLIB" ],
     des_asm_src => "des_enc.c fcrypt_b.c",
     des_obj => "des_enc.o fcrypt_b.o",
     disable => [  ],
@@ -164,7 +162,7 @@
     ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86_64.s x25519-x86_64.s",
     ec_obj => "ecp_nistz256.o ecp_nistz256-x86_64.o x25519-x86_64.o",
     enable => [ "afalgeng" ],
-    ex_libs => "-ldl -pthread",
+    ex_libs => "-lz -ldl -pthread",
     exe_extension => "",
     includes => [  ],
     keccak1600_asm_src => "keccak1600-x86_64.s",

No idea why build does not work for some users.
Actually my non-regular build are with 1.1.1 'stable' branch and I cannot remember issues with shared library: OpenSSL regression tests pass , PKIX-SSH (build against non-installed 1.1.1 stable) tests also pass.

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

@CSimpiFoN
Copy link

CSimpiFoN commented Jan 14, 2020

Hi @petrovr,

OpenSSL 1.1.1d compiled fine with the switch in your comment. So it is probably with the support of the switches I commented.

cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

openssl version
OpenSSL 1.1.1d 10 Sep 2019 (Library: OpenSSL 1.1.1c 28 May 2019)

Here is my new dump.txt
newdump.txt

@petrovr
Copy link

petrovr commented Jan 19, 2020

I use only module provided by OpenSSL source:

$ cat external/perl/MODULES.txt

Text-Template-1.56/lib

It is used for instance in

  • Configure:
use OpenSSL::fallback "$FindBin::Bin/external/perl/MODULES.txt";
  • configdata.pm.in
        use OpenSSL::fallback '{- sourcefile('external', 'perl', 'MODULES.txt') -}';

No host Text::Template!
$perl -e 'use Text::Template; print $Text::Template::VERSION,"\n";'
Can't locate Text/Template.pm in @inc ( ..

$ perl -I external/perl/Text-Template-1.46/lib -e 'use Text::Template; print $Text::Template::VERSION,"\n";'
1.46

@CSimpiFoN which flag do you mean?
Remark: my compare of configuration shows that you build is with "static" compression library, i.e. zlib on configuration command line. This is not significant deference. The same for devrandom and afalg engine.

Also #7982 mention some missing libraries.

@nhorman
Copy link
Contributor

nhorman commented Jun 15, 2024

Marking as inactive, to be closed at the end of 3.4 dev barring further input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

No branches or pull requests

6 participants