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

complie failed on CentOS 7 #6641

Closed
kn007 opened this issue Jul 3, 2018 · 23 comments
Closed

complie failed on CentOS 7 #6641

kn007 opened this issue Jul 3, 2018 · 23 comments
Milestone

Comments

@kn007
Copy link

kn007 commented Jul 3, 2018

make install failed on CentOS 7 x64(kernel 4.9.86-30) with gcc 7.3.1 20180303

install libcrypto.a -> /data/src/openssl/.openssl/lib/libcrypto.a
install libssl.a -> /data/src/openssl/.openssl/lib/libssl.a
install libcrypto.so.1.1 -> /data/src/openssl/.openssl/lib/libcrypto.so.1.1
link /data/src/openssl/.openssl/lib/libcrypto.so -> /data/src/openssl/.openssl/lib/libcrypto.so.1.1
install libcrypto.so -> /data/src/openssl/.openssl/lib/libcrypto.so
install libcrypto.so.1.1 -> /data/src/openssl/.openssl/lib/libcrypto.so
ar: /data/src/openssl/.openssl/lib/libcrypto.so: File format not recognized
ar: /data/src/openssl/.openssl/lib/libcrypto.so.new: File format not recognized
make: *** [Makefile:328: install_dev] Error 1
@levitte
Copy link
Member

levitte commented Jul 3, 2018

That's curious... Would you mind showing us your configuration command? The output of this should do:

perl configdata.pm -c

@kn007
Copy link
Author

kn007 commented Jul 3, 2018

 perl configdata.pm -c                                                                                      master [dfee862] modified untracked

Command line (with current working directory = .):

    /usr/bin/perl ./Configure linux-x86_64 --prefix=/data/src/openssl/.openssl --openssldir=/etc/pki/tls shared zlib-dynamic enable-tls1_3 enable-weak-ssl-ciphers enable-ec_nistp_64_gcc_128

Perl information:

    /usr/bin/perl
    5.16.3 for x86_64-linux-thread-multi

@mattcaswell mattcaswell added this to the 1.1.1 milestone Jul 4, 2018
@richsalz
Copy link
Contributor

richsalz commented Jul 5, 2018

@kn007 He meant the output of running perl configdata. (And . is always the name of the current working directory :)

@kn007
Copy link
Author

kn007 commented Jul 5, 2018

@richsalz Yes, it is the result of the perl configdata.pm -c

@richsalz
Copy link
Contributor

richsalz commented Jul 5, 2018

So it generated no output? Strange.

@kn007
Copy link
Author

kn007 commented Jul 5, 2018

The output is here: #6641 (comment)

@richsalz
Copy link
Contributor

richsalz commented Jul 5, 2018

okay, thanks (I mis-read it). @levitte will have to look at this.

@kn007
Copy link
Author

kn007 commented Jul 6, 2018

Thank you.

Which gcc version is recommand to compile openssl?

@levitte
Copy link
Member

levitte commented Jul 9, 2018

The trouble with this is that the Makefile seems to be generated for AIX. AIX is a strange beast in many regards, and the Makefile for it contains code that stuffs libcrypto.so into libcrypto.a (long story). This shouldn't appear anywhere else, but it seems like it did in your case, hence the ar error messages that you see.

@dot-asm, you did the AIX work, do you have any idea what happened here?

@levitte
Copy link
Member

levitte commented Jul 9, 2018

It might be that my guess is wrong as well. Looking further...

@dot-asm
Copy link
Contributor

dot-asm commented Jul 9, 2018

@dot-asm, you did the AIX work, do you have any idea what happened here?

No. And I can't see that one should blame AIX support. Because if it went that road, i.e. AIX-specific Makefile generated in reply to linux-x86_64, then ar wouldn't complain with "File format not recognized", it would create archive file.

@levitte
Copy link
Member

levitte commented Jul 9, 2018

Well, in that case, I'm out of ideas. @kn007, would you mind sharing the produced Makefile?

@kn007
Copy link
Author

kn007 commented Jul 9, 2018

Sure, Makefile.zip

@levitte
Copy link
Member

levitte commented Jul 9, 2018

... and looking at that, I found exactly the AIX stuff that I suspected!

@levitte
Copy link
Member

levitte commented Jul 9, 2018

(look for strip -X32_64, the suspected code surrounds that line)

@dot-asm
Copy link
Contributor

dot-asm commented Jul 9, 2018

Then question is how come did it emit AIX-specific segment in reply to Configure linux-x86_64. It should noted that there are three target-specific segments, Linux, mingw and AIX. All three seem to be emitted. So it boils down to output_on/output_off thing, i.e. back to you:-) Let's keep in mind that make install is exercised by travis on per-push basis, on Linux and Mac OS X.

@levitte
Copy link
Member

levitte commented Jul 9, 2018

Ah, I looked through the changelog for Text::Template, and the changes indicate that Text::Template->append_text_to_output came in version 1.46. That means that any version older than that will fail in exactly this way (i.e. output_off and output_on have no effect).

@levitte
Copy link
Member

levitte commented Jul 9, 2018

So I suppose that @kn007 has an older Text::Template, which can be confirmed like this:

perl -e 'use Text::Template; print $Text::Template::VERSION,"\n";'

levitte added a commit to levitte/openssl that referenced this issue Jul 9, 2018
The reason is that we override Text::Template::append_text_to_output(),
and it didn't exist before Text::Template 1.46.

Fixes openssl#6641
@kn007
Copy link
Author

kn007 commented Jul 9, 2018

Thank you, it is 1.45.
Let me try to upgrade it and complie openssl again.

@kn007
Copy link
Author

kn007 commented Jul 9, 2018

After Text::Template upgrade to 1.53, openssl compile fine, thanks a lot.

@kn007 kn007 closed this as completed Jul 9, 2018
levitte added a commit that referenced this issue Jul 10, 2018
The reason is that we override Text::Template::append_text_to_output(),
and it didn't exist before Text::Template 1.46.

Fixes #6641

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #6682)
levitte added a commit that referenced this issue Jul 10, 2018
The reason is that we override Text::Template::append_text_to_output(),
and it didn't exist before Text::Template 1.46.

Fixes #6641

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #6682)

(cherry picked from commit 4e351ca)
wrowe added a commit to vmware-tanzu/oss-httpd-build that referenced this issue Nov 21, 2018
…lity

with the os distributed flavor of Text::Template, resolved by breaking
the build in 1.1.1; openssl/openssl#6641
@nathancfox
Copy link

@kn007 Hi, I just ran into the same issue in a different setting and my Text::Template is also 1.45. How did you upgrade yours to fix the issue?

@kn007
Copy link
Author

kn007 commented Oct 10, 2019

using cpan to upgrade it.
other way you could compile it by yourself.

@AbleSteven
Copy link

Thank you, you save my life ! @levitte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants