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

87bea6550ae0dda7c40937cff2e86cc2b0b09491 (Stable 1.1.1) breaks compilation #9839

Closed
LordOfDragons opened this issue Sep 10, 2019 · 26 comments
Closed
Assignees
Labels
resolved: answered The issue contained a question which has been answered

Comments

@LordOfDragons
Copy link

LordOfDragons commented Sep 10, 2019

The commit 87bea65 in the Stable 1.1.1 branch breaks compiling (in this case static compiling OpenSSL):

/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:276: undefined reference to `aesni_set_decrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:278: undefined reference to `aesni_decrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:280: undefined reference to `aesni_cbc_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:282: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:284: undefined reference to `aesni_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:286: undefined reference to `aesni_cbc_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:288: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_cbc_cipher':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:304: undefined reference to `aesni_cbc_encrypt'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_ecb_cipher':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:319: undefined reference to `aesni_ecb_encrypt'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_gcm_init_key':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:352: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:354: undefined reference to `aesni_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:355: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_xts_init_key':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:407: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:409: undefined reference to `aesni_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:410: undefined reference to `aesni_xts_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:412: undefined reference to `aesni_set_decrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:414: undefined reference to `aesni_decrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:415: undefined reference to `aesni_xts_decrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:418: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:421: undefined reference to `aesni_encrypt'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_ccm_init_key':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:445: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:447: undefined reference to `aesni_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:449: undefined reference to `aesni_ccm64_encrypt_blocks'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:449: undefined reference to `aesni_ccm64_decrypt_blocks'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aesni_ocb_init_key':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:491: undefined reference to `aesni_set_encrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:493: undefined reference to `aesni_set_decrypt_key'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:495: undefined reference to `aesni_ocb_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:495: undefined reference to `aesni_ocb_decrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:495: undefined reference to `aesni_decrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:495: undefined reference to `aesni_encrypt'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aes_gcm_tls_cipher':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3101: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3101: undefined reference to `gcm_ghash_avx'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3105: undefined reference to `aesni_gcm_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3142: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3142: undefined reference to `gcm_ghash_avx'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3146: undefined reference to `aesni_gcm_decrypt'
/usr/bin/ld: ./libcrypto.a(e_aes.o): in function `aes_gcm_cipher':
/build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3211: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3211: undefined reference to `gcm_ghash_avx'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3217: undefined reference to `aesni_gcm_encrypt'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3255: undefined reference to `aesni_ctr32_encrypt_blocks'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3255: undefined reference to `gcm_ghash_avx'
/usr/bin/ld: /build/contrib/build/openssl/unix64/../../../openssl/crypto/evp/e_aes.c:3261: undefined reference to `aesni_gcm_decrypt'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:6300: apps/openssl] Error 1

Reverting right before this commit fixes the issue. Any commit after this commit breaks compiling.

(Edit by mspncp: replaced single backquotes by triple backquotes)

@LordOfDragons LordOfDragons added the issue: bug report The issue was opened to report a bug label Sep 10, 2019
@levitte levitte self-assigned this Sep 10, 2019
@levitte
Copy link
Member

levitte commented Sep 10, 2019

Please run this and tell me the result:

perl configdata.pm -c -e

@levitte
Copy link
Member

levitte commented Sep 10, 2019

I have tried configuring with no-shared, and had no issue. This is on Linux x86_64.

So unless I get a little more details, @LordOfDragons, I simply cannot reproduce your issue.

@LordOfDragons
Copy link
Author

Please run this and tell me the result:

perl configdata.pm -c -e

Here it is:

Command line (with current working directory = .):

    /usr/bin/perl ./Configure --debug no-dso no-shared no-threads no-ui no-zlib no-afalgeng --api=1.0.0 linux-generic64

Perl information:

    /usr/bin/perl
    5.28.1 for x86_64-linux-gnu-thread-multi

Recorded environment:

    AR = 
    ARFLAGS = 
    AS = 
    ASFLAGS = 
    BUILDFILE = 
    CC = 
    CFLAGS = 
    CPP = 
    CPPDEFINES = 
    CPPFLAGS = 
    CPPINCLUDES = 
    CROSS_COMPILE = 
    CXX = 
    CXXFLAGS = 
    HASHBANGPERL = 
    LD = 
    LDFLAGS = 
    LDLIBS = 
    MT = 
    MTFLAGS = 
    OPENSSL_LOCAL_CONFIG_DIR = 
    PERL = 
    RANLIB = 
    RC = 
    RCFLAGS = 
    RM = 
    WINDRES = 
    __CNF_CFLAGS = 
    __CNF_CPPDEFINES = 
    __CNF_CPPFLAGS = 
    __CNF_CPPINCLUDES = 
    __CNF_CXXFLAGS = 
    __CNF_LDFLAGS = 
    __CNF_LDLIBS = 

The config options mostly resulted from getting around compilation problems because this build is done for multiple OS, including the notorious trouble maker windows (cross mingw compiler).

@levitte
Copy link
Member

levitte commented Sep 11, 2019

The mistake you're doing is to configure with linux-generic64, with which you must include no-asm (yeah, I know, one might argue that this should happen automatically, but it doesn't).

You would make your life easier if you configured like this:

$ ./config --debug no-dso no-shared no-threads no-ui no-zlib no-afalgeng --api=1.0.0

Or if you must use ./Configure directly, use a more appropriate target, such as linux-x86_64 or what have you... or lastly, if you insist on linux-generic64, add no-asm as well.

@LordOfDragons
Copy link
Author

The problem is two-fold. First OpenSSL seems to not support "out of tree" building and we need to build for various targets at the same time. The Configure had been the only solution so far I found which worked. The same for linux-generic64. All other linux targets fail to compile. This had been the only configuration which worked at all. If you have a working configuration which allows building OpenSSL sanely out-of-tree with unix-64, unix-32, windows-64, windows-32 and arm platforms statically then I'm all ears. So far that's the best I could find.

@mattcaswell
Copy link
Member

OpenSSL absolutely supports "out of tree" building. See:

openssl/INSTALL

Lines 823 to 859 in 7f0a8dc

1c. Configure OpenSSL for building outside of the source tree.
OpenSSL can be configured to build in a build directory separate from
the directory with the source code. It's done by placing yourself in
some other directory and invoking the configuration commands from
there.
Unix example:
$ mkdir /var/tmp/openssl-build
$ cd /var/tmp/openssl-build
$ /PATH/TO/OPENSSL/SOURCE/config [[ options ]]
or
$ /PATH/TO/OPENSSL/SOURCE/Configure {{ target }} [[ options ]]
OpenVMS example:
$ set default sys$login:
$ create/dir [.tmp.openssl-build]
$ set default [.tmp.openssl-build]
$ @[PATH.TO.OPENSSL.SOURCE]config [[ options ]]
or
$ @[PATH.TO.OPENSSL.SOURCE]Configure {{ target }} [[ options ]]
Windows example:
$ C:
$ mkdir \temp-openssl
$ cd \temp-openssl
$ perl d:\PATH\TO\OPENSSL\SOURCE\Configure {{ target }} [[ options ]]
Paths can be relative just as well as absolute. Configure will
do its best to translate them to relative paths whenever possible.

@LordOfDragons
Copy link
Author

So far this did not work (configure fails with missing files in the source directory). That though had been on an openssl version some month ago. Did this change? I'll give this a try tomorrow.

@mattcaswell
Copy link
Member

So far this did not work (configure fails with missing files in the source directory). That though had been on an openssl version some month ago. Did this change? I'll give this a try tomorrow.

I'm not aware of any problems in this area, and I've just tried it and it worked fine for me.

@petrovr
Copy link

petrovr commented Sep 11, 2019 via email

@levitte
Copy link
Member

levitte commented Sep 11, 2019

If there are cases where out-of-source-tree configuration / build does not work, we want to know.
(we know that it doesn't work for 1.0.2, that support was added with the so called "unified" build for 1.1.0)

@petrovr
Copy link

petrovr commented Sep 11, 2019 via email

@levitte
Copy link
Member

levitte commented Sep 11, 2019

I did mean cases where OpenSSL configuration / build goes wrong.

@LordOfDragons
Copy link
Author

LordOfDragons commented Sep 12, 2019

I did now the following and compilation fails right at the start:

cd build/openssl/linux46
../../../openssl/config --debug no-dso no-shared no-threads no-zlib no-afalgeng --api=1.0.0
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1e-dev (0x10101050L) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************

make
/usr/bin/perl "-I." -Mconfigdata "../../../openssl/util/dofile.pl" \
    "-oMakefile" ../../../openssl/crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../../openssl/util/dofile.pl" \
    "-oMakefile" ../../../openssl/crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../../openssl/util/dofile.pl" \
    "-oMakefile" ../../../openssl/include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
make[1]: Entering directory '/contrib/build/openssl/linux64'
make[1]: Leaving directory '/contrib/build/openssl/linux64'
make[1]: Entering directory '/contrib/build/openssl/linux64'
gcc  -fPIC -m64 -Wa,--noexecstack -Wall -O0 -g -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -DOPENSSL_API_COMPAT=0x10000000L  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o ../../../openssl/apps/app_rand.c
In file included from ../../../openssl/apps/app_rand.c:10:
../../../openssl/apps/apps.h:13:11: fatal error: e_os.h: No such file or directory
 # include "e_os.h" /* struct timeval for DTLS */
           ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:680: apps/app_rand.o] Error 1

@mattcaswell
Copy link
Member

Hmm. Very strange. I just did exactly the same as you above (same config options) and it works with no problems.

@mattcaswell
Copy link
Member

I compared the gcc line from my build with yours and interestingly they are different:

Mine:

gcc  -I. -Iinclude -I../openssl-write -I../openssl-write/include -fPIC -m64 -Wa,--noexecstack -Wall -O0 -g -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -DOPENSSL_API_COMPAT=0x10000000L  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o ../openssl-write/apps/app_rand.c

Yours:

gcc  -fPIC -m64 -Wa,--noexecstack -Wall -O0 -g -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -DOPENSSL_API_COMPAT=0x10000000L  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o ../../../openssl/apps/app_rand.c

They are actually identical except for the beginning. Mine additionally has these command line options to gcc:

-I. -Iinclude -I../openssl-write -I../openssl-write/include

Which obviously explains why yours is failing to find that include file. The question is why aren't you getting those command line opts?

@mattcaswell
Copy link
Member

I'm hoping @levitte will step in at this point with an insightful comment...

@levitte
Copy link
Member

levitte commented Sep 12, 2019

I have no clue. I just tried this in my 1.1.1 source tree:

: ; mkdir -p build/openssl/linux64
: ; cd build/openssl/linux64
: ; ../../../config --debug no-dso no-shared no-threads no-zlib no-afalgeng --api=1.0.0
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1e-dev (0x10101050L) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
: ; make
/usr/bin/perl "-I." -Mconfigdata "../../../util/dofile.pl" \
    "-oMakefile" ../../../crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../../util/dofile.pl" \
    "-oMakefile" ../../../crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "../../../util/dofile.pl" \
    "-oMakefile" ../../../include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
make[1]: Entering directory '/home/levitte/gitwrk/openssl.net/official/1.1.1/build/openssl/linux64'
make[1]: Leaving directory '/home/levitte/gitwrk/openssl.net/official/1.1.1/build/openssl/linux64'
make[1]: Entering directory '/home/levitte/gitwrk/openssl.net/official/1.1.1/build/openssl/linux64'
gcc  -I. -Iinclude -I../../.. -I../../../include -fPIC -m64 -Wa,--noexecstack -Wall -O0 -g -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -DOPENSSL_API_COMPAT=0x10000000L  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o ../../../apps/app_rand.c
gcc  -I. -Iinclude -I../../.. -I../../../include -fPIC -m64 -Wa,--noexecstack -Wall -O0 -g -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -DOPENSSL_API_COMPAT=0x10000000L  -MMD -MF apps/apps.d.tmp -MT apps/apps.o -c -o apps/apps.o ../../../apps/apps.c
...

@levitte
Copy link
Member

levitte commented Sep 12, 2019

@LordOfDragons, do you have any local modifications we should know about (including hacking the resulting Makefile)?

@LordOfDragons
Copy link
Author

LordOfDragons commented Sep 12, 2019

I did not change anything, no. But I deleted now the entire openssl directory and checked it out again. Using this command line it would go through building. Okay so far but when I try using "linux-x86_64" as you suggested it fails to compile:

target already defined - linux-x86_64 (offending arg: linux-x86_64)
make: *** No targets specified and no makefile found.  Stop.

That's why I used linux-generic64 in the first place. That said using your new command line both "linux-x64_64" and "linux-generic64" fail with the same error.

@levitte
Copy link
Member

levitte commented Sep 12, 2019

When you get that, target already defined, what was your exact configuration command?

@LordOfDragons
Copy link
Author

/contrib/openssl/config --debug no-dso no-shared no-threads no-zlib no-afalgeng no-asm --api=1.0.0 linux-x86_64

@levitte
Copy link
Member

levitte commented Sep 13, 2019

Ok, so how about trying this:

/contrib/openssl/config --debug no-dso no-shared no-threads no-zlib no-afalgeng no-asm --api=1.0.0

See, there's a difference between the config and the Configure scripts. config doesn't take a target platform argument (linux-x86_64), it figures it out from the machine you run it on, while Configure requires a target platform argument. (as a matter of fact, when config has figured out the target platform, it simply calls Configure with that plus all its command line arguments)

@levitte
Copy link
Member

levitte commented Sep 13, 2019

Yes, we know this is confusing, and an effort to merge the two scripts is underway (but only going forward, i.e. for OpenSSL 3.0 and on)

@LordOfDragons
Copy link
Author

I see. Then I need to stick with Configure since we are cross-compiling for different targets on the same machine for the same final build.

@levitte
Copy link
Member

levitte commented Sep 13, 2019

Sure... but if you use the generic target platform targets, you usually have to add no-asm, as they usually do not have assembler support. That's the issue you had to start with. If you want assembler support, you need to make more specific with your choices (and assembler support may still be shaky, depending on your toolchain)

boklm added a commit to boklm/tor-browser-build that referenced this issue Sep 26, 2019
With the linux-generic64 target the build is broken if we don't add the
no-asm option:
openssl/openssl#9839

We fix that by switching to the linux-x86_64 target. At the same time
we also switch the linux-generic32 target to linux-x86.
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Oct 27, 2019
Use no-asm when building with generic architectures such as gcc or
linux-generic32, see openssl/openssl#9839

This will fix a static build failure on x86_64 due to the removal of
x86/x86_64 BSAES and AES_ASM support by
openssl/openssl@87bea65

Fixes:
 - http://autobuild.buildroot.org/results/e4f04bb13ec1b82b73db645bea4933e52bca4185

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Oct 31, 2019
Use no-asm when building with generic architectures such as gcc or
linux-generic32, see openssl/openssl#9839

This will fix a static build failure on x86_64 due to the removal of
x86/x86_64 BSAES and AES_ASM support by
openssl/openssl@87bea65

Fixes:
 - http://autobuild.buildroot.org/results/e4f04bb13ec1b82b73db645bea4933e52bca4185

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 027c026)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Oct 31, 2019
Use no-asm when building with generic architectures such as gcc or
linux-generic32, see openssl/openssl#9839

This will fix a static build failure on x86_64 due to the removal of
x86/x86_64 BSAES and AES_ASM support by
openssl/openssl@87bea65

Fixes:
 - http://autobuild.buildroot.org/results/e4f04bb13ec1b82b73db645bea4933e52bca4185

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 027c026)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
@levitte levitte removed the issue: bug report The issue was opened to report a bug label Dec 5, 2019
@mattcaswell mattcaswell added the resolved: answered The issue contained a question which has been answered label Dec 5, 2019
@mattcaswell
Copy link
Member

This question seems to have been answered. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved: answered The issue contained a question which has been answered
Projects
None yet
Development

No branches or pull requests

4 participants