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

compiling 1.1.1k on linux/64 for win/64 fails: Assembler messages: bad .section directive #16259

Closed
scrouthtv opened this issue Aug 7, 2021 · 14 comments
Labels
branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch help wanted triaged: question The issue contains a question

Comments

@scrouthtv
Copy link

perl configdata.pm --dump Command line (with current working directory = .):
/usr/bin/perl ./Configure --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64 dir=/etc/ssl --libdir=/lib -static-libgcc

Perl information:

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

Enabled features:

aria
asm
async
autoalginit
autoerrinit
autoload-config
bf
blake2
camellia
capieng
cast
chacha
cmac
cms
comp
ct
deprecated
des
dgram
dh
dsa
dso
dtls
dynamic-engine
ec
ec2m
ecdh
ecdsa
engine
err
filenames
gost
hw(-.+)?
idea
makedepend
md4
mdc2
multiblock
nextprotoneg
pinshared
ocb
ocsp
pic
poly1305
posix-io
psk
rc2
rc4
rdrand
rfc3779
rmd160
scrypt
seed
shared
siphash
sm2
sm3
sm4
sock
srp
srtp
sse2
ssl
static-engine
stdio
tests
threads
tls
ts
ui-console
whirlpool
tls1
tls1-method
tls1_1
tls1_1-method
tls1_2
tls1_2-method
tls1_3
dtls1
dtls1-method
dtls1_2
dtls1_2-method

Disabled features:

afalgeng                [not-linux] OPENSSL_NO_AFALGENG
asan                    [default]   OPENSSL_NO_ASAN
buildtest-c++           [default]
crypto-mdebug           [default]   OPENSSL_NO_CRYPTO_MDEBUG
crypto-mdebug-backtrace [default]   OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
devcryptoeng            [default]   OPENSSL_NO_DEVCRYPTOENG
ec_nistp_64_gcc_128     [default]   OPENSSL_NO_EC_NISTP_64_GCC_128
egd                     [default]   OPENSSL_NO_EGD
external-tests          [default]   OPENSSL_NO_EXTERNAL_TESTS
fuzz-libfuzzer          [default]   OPENSSL_NO_FUZZ_LIBFUZZER
fuzz-afl                [default]   OPENSSL_NO_FUZZ_AFL
heartbeats              [default]   OPENSSL_NO_HEARTBEATS
md2                     [default]   OPENSSL_NO_MD2 (skip crypto/md2)
msan                    [default]   OPENSSL_NO_MSAN
rc5                     [default]   OPENSSL_NO_RC5 (skip crypto/rc5)
sctp                    [default]   OPENSSL_NO_SCTP
ssl-trace               [default]   OPENSSL_NO_SSL_TRACE
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

Config target attributes:

AR => "ar",
ARFLAGS => "r",
CC => "gcc",
CFLAGS => "-Wall -O3",
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",
apps_aux_src => "win32_init.c",
apps_init_src => "",
apps_obj => "win32_init.o",
bf_asm_src => "bf_enc.c",
bf_obj => "bf_enc.o",
bn_asm_src => "asm/x86_64-gcc.c x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s rsaz-avx2.s",
bn_obj => "asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o",
bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
build_file => "Makefile",
build_scheme => [ "unified", "unix" ],
cast_asm_src => "c_enc.c",
cast_obj => "c_enc.o",
cflags => "-m64",
chacha_asm_src => "chacha-x86_64.s",
chacha_obj => "chacha-x86_64.o",
cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
cmll_obj => "cmll-x86_64.o cmll_misc.o",
cppflags => "-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT",
cpuid_asm_src => "x86_64cpuid.s",
cpuid_obj => "x86_64cpuid.o",
defines => [  ],
des_asm_src => "des_enc.c fcrypt_b.c",
des_obj => "des_enc.o fcrypt_b.o",
disable => [  ],
dso_extension => ".dll",
dso_scheme => "win32",
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 => [  ],
ex_libs => "-lws2_32 -lgdi32 -lcrypt32",
exe_extension => ".exe",
includes => [  ],
keccak1600_asm_src => "keccak1600-x86_64.s",
keccak1600_obj => "keccak1600-x86_64.o",
lflags => "",
lib_cflags => "",
lib_cppflags => "-DL_ENDIAN",
lib_defines => [  ],
md5_asm_src => "md5-x86_64.s",
md5_obj => "md5-x86_64.o",
modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
modes_obj => "ghash-x86_64.o aesni-gcm-x86_64.o",
module_cflags => "",
module_cxxflags => "",
module_ldflags => "-static-libgcc -shared -Wl,--enable-auto-image-base",
multilib => "64",
padlock_asm_src => "e_padlock-x86_64.s",
padlock_obj => "e_padlock-x86_64.o",
perlasm_scheme => "mingw64",
poly1305_asm_src => "poly1305-x86_64.s",
poly1305_obj => "poly1305-x86_64.o",
rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
rc4_obj => "rc4-x86_64.o rc4-md5-x86_64.o",
rc5_asm_src => "rc5_enc.c",
rc5_obj => "rc5_enc.o",
rmd160_asm_src => "",
rmd160_obj => "",
sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
sha1_obj => "sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o sha256-mb-x86_64.o",
shared_cflag => "",
shared_cppflags => "_WINDLL",
shared_defflag => "",
shared_defines => [  ],
shared_extension => ".dll",
shared_extension_simple => ".dll",
shared_impflag => "-Wl,--out-implib=",
shared_import_extension => ".dll.a",
shared_ldflag => "-static-libgcc -shared -Wl,--enable-auto-image-base",
shared_rcflag => "--target=pe-x86-64",
shared_target => "mingw-shared",
sys_id => "MINGW64",
thread_defines => [  ],
thread_scheme => "winthreads",
unistd => "<unistd.h>",
uplink_aux_src => "",
uplink_obj => "",
wp_asm_src => "wp-x86_64.s",
wp_obj => "wp-x86_64.o",

Recorded environment:

AR =
BUILDFILE =
CC =
CFLAGS =
CPPFLAGS =
CROSS_COMPILE =
CXX =
CXXFLAGS =
HASHBANGPERL =
LDFLAGS =
LDLIBS =
OPENSSL_LOCAL_CONFIG_DIR =
PERL =
RANLIB =
RC =
RCFLAGS =
WINDRES =
__CNF_CFLAGS =
__CNF_CPPDEFINES =
__CNF_CPPFLAGS =
__CNF_CPPINCLUDES =
__CNF_CXXFLAGS =
__CNF_LDFLAGS =
__CNF_LDLIBS =

Makevars:

AR              = x86_64-w64-mingw32-ar
ARFLAGS         = r
CC              = x86_64-w64-mingw32-gcc
CFLAGS          = -Wall -O3 -static-libgcc
CPPDEFINES      =
CPPFLAGS        =
CPPINCLUDES     =
CROSS_COMPILE   = x86_64-w64-mingw32-
CXXFLAGS        = -static-libgcc
HASHBANGPERL    = /usr/bin/env perl
LDFLAGS         =
LDLIBS          =
PERL            = /usr/bin/perl
RANLIB          = x86_64-w64-mingw32-ranlib
RC              = x86_64-w64-mingw32-windres
RCFLAGS         =

NOTE: These variables only represent the configuration view. The build file
template may have processed these variables further, please have a look at the
build file for more exact data:
Makefile

build file:

Makefile

build file templates:

Configurations/common0.tmpl
Configurations/unix-Makefile.tmpl
Configurations/common.tmpl

Hello,

I am currently trying to build OpenSSL 1.1.1k (as a dependency for OpenVPN).

I ran these commands:

 > ./Configure --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64 dir=/etc/ssl --libdir=/lib -static-libgcc
**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
**********************************************************************
 > make

make gives this error:

/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/usr/sbin/make depend && /usr/sbin/make _all
make[1]: Entering directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make[1]: Leaving directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make[1]: Entering directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
x86_64-w64-mingw32-gcc  -I. -Iinclude -m64 -Wa,--noexecstack -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
/tmp/cczahEXC.s: Assembler messages:
/tmp/cczahEXC.s:3: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string
make[1]: *** [Makefile:729: apps/app_rand.o] Error 1
make[1]: Leaving directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make: *** [Makefile:188: all] Error 2

The help file suggests running it with --no-asm. It doesn't change anything for me, I still get the same error.

What can I do now? Thanks for any help in advance.

@scrouthtv scrouthtv added the issue: bug report The issue was opened to report a bug label Aug 7, 2021
@scrouthtv
Copy link
Author

It also fails with this simplified configuration:

 > ./Configure --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64
perl configdata.pm --dump Command line (with current working directory = .):
/usr/bin/perl ./Configure --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64

Perl information:

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

Enabled features:

aria
asm
async
autoalginit
autoerrinit
autoload-config
bf
blake2
camellia
capieng
cast
chacha
cmac
cms
comp
ct
deprecated
des
dgram
dh
dsa
dso
dtls
dynamic-engine
ec
ec2m
ecdh
ecdsa
engine
err
filenames
gost
hw(-.+)?
idea
makedepend
md4
mdc2
multiblock
nextprotoneg
pinshared
ocb
ocsp
pic
poly1305
posix-io
psk
rc2
rc4
rdrand
rfc3779
rmd160
scrypt
seed
shared
siphash
sm2
sm3
sm4
sock
srp
srtp
sse2
ssl
static-engine
stdio
tests
threads
tls
ts
ui-console
whirlpool
tls1
tls1-method
tls1_1
tls1_1-method
tls1_2
tls1_2-method
tls1_3
dtls1
dtls1-method
dtls1_2
dtls1_2-method

Disabled features:

afalgeng                [not-linux] OPENSSL_NO_AFALGENG
asan                    [default]   OPENSSL_NO_ASAN
buildtest-c++           [default]
crypto-mdebug           [default]   OPENSSL_NO_CRYPTO_MDEBUG
crypto-mdebug-backtrace [default]   OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
devcryptoeng            [default]   OPENSSL_NO_DEVCRYPTOENG
ec_nistp_64_gcc_128     [default]   OPENSSL_NO_EC_NISTP_64_GCC_128
egd                     [default]   OPENSSL_NO_EGD
external-tests          [default]   OPENSSL_NO_EXTERNAL_TESTS
fuzz-libfuzzer          [default]   OPENSSL_NO_FUZZ_LIBFUZZER
fuzz-afl                [default]   OPENSSL_NO_FUZZ_AFL
heartbeats              [default]   OPENSSL_NO_HEARTBEATS
md2                     [default]   OPENSSL_NO_MD2 (skip crypto/md2)
msan                    [default]   OPENSSL_NO_MSAN
rc5                     [default]   OPENSSL_NO_RC5 (skip crypto/rc5)
sctp                    [default]   OPENSSL_NO_SCTP
ssl-trace               [default]   OPENSSL_NO_SSL_TRACE
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

Config target attributes:

AR => "ar",
ARFLAGS => "r",
CC => "gcc",
CFLAGS => "-Wall -O3",
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",
apps_aux_src => "win32_init.c",
apps_init_src => "",
apps_obj => "win32_init.o",
bf_asm_src => "bf_enc.c",
bf_obj => "bf_enc.o",
bn_asm_src => "asm/x86_64-gcc.c x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s rsaz-avx2.s",
bn_obj => "asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o",
bn_ops => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
build_file => "Makefile",
build_scheme => [ "unified", "unix" ],
cast_asm_src => "c_enc.c",
cast_obj => "c_enc.o",
cflags => "-m64",
chacha_asm_src => "chacha-x86_64.s",
chacha_obj => "chacha-x86_64.o",
cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
cmll_obj => "cmll-x86_64.o cmll_misc.o",
cppflags => "-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT",
cpuid_asm_src => "x86_64cpuid.s",
cpuid_obj => "x86_64cpuid.o",
defines => [  ],
des_asm_src => "des_enc.c fcrypt_b.c",
des_obj => "des_enc.o fcrypt_b.o",
disable => [  ],
dso_extension => ".dll",
dso_scheme => "win32",
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 => [  ],
ex_libs => "-lws2_32 -lgdi32 -lcrypt32",
exe_extension => ".exe",
includes => [  ],
keccak1600_asm_src => "keccak1600-x86_64.s",
keccak1600_obj => "keccak1600-x86_64.o",
lflags => "",
lib_cflags => "",
lib_cppflags => "-DL_ENDIAN",
lib_defines => [  ],
md5_asm_src => "md5-x86_64.s",
md5_obj => "md5-x86_64.o",
modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
modes_obj => "ghash-x86_64.o aesni-gcm-x86_64.o",
module_cflags => "",
module_cxxflags => "",
module_ldflags => "-static-libgcc -shared -Wl,--enable-auto-image-base",
multilib => "64",
padlock_asm_src => "e_padlock-x86_64.s",
padlock_obj => "e_padlock-x86_64.o",
perlasm_scheme => "mingw64",
poly1305_asm_src => "poly1305-x86_64.s",
poly1305_obj => "poly1305-x86_64.o",
rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
rc4_obj => "rc4-x86_64.o rc4-md5-x86_64.o",
rc5_asm_src => "rc5_enc.c",
rc5_obj => "rc5_enc.o",
rmd160_asm_src => "",
rmd160_obj => "",
sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
sha1_obj => "sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o sha256-mb-x86_64.o",
shared_cflag => "",
shared_cppflags => "_WINDLL",
shared_defflag => "",
shared_defines => [  ],
shared_extension => ".dll",
shared_extension_simple => ".dll",
shared_impflag => "-Wl,--out-implib=",
shared_import_extension => ".dll.a",
shared_ldflag => "-static-libgcc -shared -Wl,--enable-auto-image-base",
shared_rcflag => "--target=pe-x86-64",
shared_target => "mingw-shared",
sys_id => "MINGW64",
thread_defines => [  ],
thread_scheme => "winthreads",
unistd => "<unistd.h>",
uplink_aux_src => "",
uplink_obj => "",
wp_asm_src => "wp-x86_64.s",
wp_obj => "wp-x86_64.o",

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 =

Makevars:

AR              = x86_64-w64-mingw32-ar
ARFLAGS         = r
CC              = x86_64-w64-mingw32-gcc
CFLAGS          = -Wall -O3
CPPDEFINES      =
CPPFLAGS        =
CPPINCLUDES     =
CROSS_COMPILE   = x86_64-w64-mingw32-
CXXFLAGS        =
HASHBANGPERL    = /usr/bin/env perl
LDFLAGS         =
LDLIBS          =
PERL            = /usr/bin/perl
RANLIB          = x86_64-w64-mingw32-ranlib
RC              = x86_64-w64-mingw32-windres
RCFLAGS         =

NOTE: These variables only represent the configuration view. The build file
template may have processed these variables further, please have a look at the
build file for more exact data:
Makefile

build file:

Makefile

build file templates:

Configurations/common0.tmpl
Configurations/unix-Makefile.tmpl
Configurations/common.tmpl

@t8m t8m added help wanted triaged: question The issue contains a question branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch and removed issue: bug report The issue was opened to report a bug labels Aug 9, 2021
@xtkoba
Copy link
Contributor

xtkoba commented Aug 16, 2021

Maybe a bug in toolchain? What versions of binutils and gcc are you using?

On my Gentoo crossdev environment the build seems fine, using:

binutils-2.36.1-r2
gcc-11.2.0
mingw64-runtime-9.0.0

@levitte
Copy link
Member

levitte commented Aug 16, 2021

The help file suggests running it with --no-asm. It doesn't change anything for me, I still get the same error.

no-asm, i.e. no initial dashes

@scrouthtv
Copy link
Author

scrouthtv commented Aug 16, 2021

What versions of binutils and gcc are you using?

 ~ pacman -Q binutils gcc mingw-w64-headers mingw-w64-binutils mingw-w64-gcc
binutils 2.36.1-3
gcc 11.1.0-1
mingw-w64-headers 9.0.0-2
mingw-w64-binutils 2.36.1-1
mingw-w64-gcc 11.2.0-1

There is no mingw runtime on Arch afaik.

no-asm, i.e. no initial dashes

As an argument to ./Configure or make? Neither works:

 ~ ./Configure no-asm --cross-compile-prefix=x86_64-w64-mingw32- shared mingw64
***   OpenSSL has been successfully configured                     ***
 ~ make
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/usr/sbin/make depend && /usr/sbin/make _all
make[1]: Entering directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make[1]: Leaving directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make[1]: Entering directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
x86_64-w64-mingw32-gcc  -I. -Iinclude -m64 -Wall -O3 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
/tmp/ccBhgJGz.s: Assembler messages:
/tmp/ccBhgJGz.s:3: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string
make[1]: *** [Makefile:729: apps/app_rand.o] Error 1
make[1]: Leaving directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make: *** [Makefile:188: all] Error 2
 ~ make no-asm
make: *** No rule to make target 'no-asm'.  Stop.

EDIT: I just tested exactly tag OpenSSL_1_1_1k from github.com / openssl / openssl and my issue persists. (I previously had an unknown version that came with OpenVPN_build)

@xtkoba
Copy link
Contributor

xtkoba commented Aug 16, 2021

Probably a wrong assembler is invoked from gcc I guess, from the following observation:

$ cat foo.s
        .file   "app_rand.c"
        .text
        .section .rdata,"dr"

$ x86_64-w64-mingw32-gcc foo.s -c

$ x86_64-pc-linux-gnu-gcc foo.s -c
foo.s: Assembler messages:
foo.s:3: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string

The -v option for gcc might help investigating, such as:

$ x86_64-w64-mingw32-gcc  -I. -Iinclude -m64 -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c -v
(...snip...)
 /usr/libexec/gcc/x86_64-w64-mingw32/as -v -I . -I include --64 -o apps/app_rand.o /tmp/ccz2SY6x.s
GNU assembler version 2.36.1 (x86_64-w64-mingw32) using BFD version (Gentoo 2.36.1 p4) 2.36.1
(...snip...)

@scrouthtv
Copy link
Author

 ~ x86_64-w64-mingw32-gcc  -I. -Iinclude -m64 -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c -v
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
        compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

warning: MPFR header version 4.1.0 differs from library version 4.1.0-p13.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 79221e2262d09bd567b30f4c0e1e7955
COLLECT_GCC_OPTIONS='-I' '.' '-I' 'include' '-m64' '-Wall' '-O3' '-static-libgcc' '-D' 'L_ENDIAN' '-D' 'OPENSSL_PIC' '-D' 'OPENSSL_CPUID_OBJ' '-D' 'OPENSSL_IA32_SSE2' '-D' 'OPENSSL_BN_ASM_MONT' '-D' 'OPENSSL_BN_ASM_MONT5' '-D' 'OPENSSL_BN_ASM_GF2m' '-D' 'SHA1_ASM' '-D' 'SHA256_ASM' '-D' 'SHA512_ASM' '-D' 'KECCAK1600_ASM' '-D' 'RC4_ASM' '-D' 'MD5_ASM' '-D' 'AESNI_ASM' '-D' 'VPAES_ASM' '-D' 'GHASH_ASM' '-D' 'ECP_NISTZ256_ASM' '-D' 'X25519_ASM' '-D' 'POLY1305_ASM' '-D' 'OPENSSLDIR="C:/Program Files/Common Files/SSL"' '-D' 'ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1"' '-D' 'UNICODE' '-D' '_UNICODE' '-D' 'WIN32_LEAN_AND_MEAN' '-D' '_MT' '-D' 'NDEBUG' '-MMD' '-MF' 'apps/app_rand.d.tmp' '-MT' 'apps/app_rand.o' '-c' '-o' 'apps/app_rand.o' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'apps/'
 as -v -I . -I include --64 -o apps/app_rand.o /tmp/ccKuiaBZ.s
GNU assembler version 2.36.1 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.36.1
/tmp/ccKuiaBZ.s: Assembler messages:
/tmp/ccKuiaBZ.s:3: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string

It's indeed calling GNU assembler (x86_64-pc-linux-gnu). Any idea how to fix this?

@scrouthtv
Copy link
Author

scrouthtv commented Aug 16, 2021

https://stackoverflow.com/a/24741760/7242251

Adding
-B /usr/sbin/x86_64-w64-mingw32-
to your command line fixes the issue.

EDIT: If I add -B /usr/sbin/x86_64-w64-mingw32- to the CFLAGS, I get the same issue as in #9922

@levitte
Copy link
Member

levitte commented Aug 17, 2021

no-asm, i.e. no initial dashes

As an argument to ./Configure or make?

To Configure. Also, it doesn't affect the toolchain, it only disables the use most of OpenSSL assembler modules.
gcc converts C to assembler and then calls gas (GNU assembler) with the result. There's nothing that we can do to change that. Therefore, it seems like you do have a toolchain problem.

@scrouthtv
Copy link
Author

it seems like you do have a toolchain problem.

How would I go about debugging this?

If I simply run x86_64-w64-mingw32-gcc on a test file without the options provided by xtkoba
(x86_64-w64-mingw32-gcc -I. -Iinclude -m64 -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR=""C:/Program Files/Common Files/SSL"" -DENGINESDIR=""C:/Program Files/OpenSSL/lib/engines-1_1"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c -v)

It does not call the linux assembler at all.

@levitte
Copy link
Member

levitte commented Aug 17, 2021

What versions of binutils and gcc are you using?

 ~ pacman -Q binutils gcc mingw-w64-headers mingw-w64-binutils mingw-w64-gcc
binutils 2.36.1-3
gcc 11.1.0-1
mingw-w64-headers 9.0.0-2
mingw-w64-binutils 2.36.1-1
mingw-w64-gcc 11.2.0-1

Hold on, that's two different binutils and two different gcc packages. If I understand correctly, they don't mix well, and considering this -v output, it could be that the gcc from mingw-w64-gcc is calling the as from binutils:

 as -v -I . -I include --64 -o apps/app_rand.o /tmp/ccKuiaBZ.s

What happens if you uninstall the non-mingw gcc and binutils?

@scrouthtv
Copy link
Author

Quick sidenote: I just successfully built OpenSSL in an ubuntu vm.

Hold on, that's two different binutils and two different gcc packages.

Yes. But the one for linux shouldn't be used after all because I'm compiling for Windows, right?

What happens if you uninstall the non-mingw gcc and binutils?

x86_64-w64-mingw32-gcc: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
make[1]: *** [Makefile:729: apps/app_rand.o] Error 1
make[1]: Leaving directory '/home/lenni/git/openvpn-build/generic/tmp/openssl-1.1.1k'
make: *** [Makefile:188: all] Error 2

@levitte
Copy link
Member

levitte commented Aug 17, 2021

 ~ x86_64-w64-mingw32-gcc  -I. -Iinclude -m64 -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c -v
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
        compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

warning: MPFR header version 4.1.0 differs from library version 4.1.0-p13.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 79221e2262d09bd567b30f4c0e1e7955
COLLECT_GCC_OPTIONS='-I' '.' '-I' 'include' '-m64' '-Wall' '-O3' '-static-libgcc' '-D' 'L_ENDIAN' '-D' 'OPENSSL_PIC' '-D' 'OPENSSL_CPUID_OBJ' '-D' 'OPENSSL_IA32_SSE2' '-D' 'OPENSSL_BN_ASM_MONT' '-D' 'OPENSSL_BN_ASM_MONT5' '-D' 'OPENSSL_BN_ASM_GF2m' '-D' 'SHA1_ASM' '-D' 'SHA256_ASM' '-D' 'SHA512_ASM' '-D' 'KECCAK1600_ASM' '-D' 'RC4_ASM' '-D' 'MD5_ASM' '-D' 'AESNI_ASM' '-D' 'VPAES_ASM' '-D' 'GHASH_ASM' '-D' 'ECP_NISTZ256_ASM' '-D' 'X25519_ASM' '-D' 'POLY1305_ASM' '-D' 'OPENSSLDIR="C:/Program Files/Common Files/SSL"' '-D' 'ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1"' '-D' 'UNICODE' '-D' '_UNICODE' '-D' 'WIN32_LEAN_AND_MEAN' '-D' '_MT' '-D' 'NDEBUG' '-MMD' '-MF' 'apps/app_rand.d.tmp' '-MT' 'apps/app_rand.o' '-c' '-o' 'apps/app_rand.o' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' 'apps/'
 as -v -I . -I include --64 -o apps/app_rand.o /tmp/ccKuiaBZ.s
GNU assembler version 2.36.1 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.36.1
/tmp/ccKuiaBZ.s: Assembler messages:
/tmp/ccKuiaBZ.s:3: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string

It's indeed calling GNU assembler (x86_64-pc-linux-gnu). Any idea how to fix this?

I tried this on my machine, and got a different result:

x86_64-w64-mingw32-gcc  -I. -Iinclude -I../_build-1.1.1/include -m64 -Wall -O3 -static-libgcc -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 -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"C:/Program Files/Common Files/SSL\"" -DENGINESDIR="\"C:/Program Files/OpenSSL/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG  -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c -v
Using built-in specs.
COLLECT_GCC=x86_64-w64-mingw32-gcc
Target: x86_64-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir='/usr/lib/x86_64-linux-gnu' --libexecdir='/usr/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --with-headers --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-lto --enable-threads=win32 --program-suffix=-win32 --program-prefix=x86_64-w64-mingw32- --target=x86_64-w64-mingw32 --with-as=/usr/bin/x86_64-w64-mingw32-as --with-ld=/usr/bin/x86_64-w64-mingw32-ld --enable-libatomic --enable-libstdcxx-filesystem-ts=yes --enable-dependency-tracking
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 10-win32 20210110 (GCC) 
COLLECT_GCC_OPTIONS='-I' '.' '-I' 'include' '-I' '../_build-1.1.1/include' '-m64' '-Wall' '-O3' '-static-libgcc' '-D' 'L_ENDIAN' '-D' 'OPENSSL_PIC' '-D' 'OPENSSL_CPUID_OBJ' '-D' 'OPENSSL_IA32_SSE2' '-D' 'OPENSSL_BN_ASM_MONT' '-D' 'OPENSSL_BN_ASM_MONT5' '-D' 'OPENSSL_BN_ASM_GF2m' '-D' 'SHA1_ASM' '-D' 'SHA256_ASM' '-D' 'SHA512_ASM' '-D' 'KECCAK1600_ASM' '-D' 'RC4_ASM' '-D' 'MD5_ASM' '-D' 'AESNI_ASM' '-D' 'VPAES_ASM' '-D' 'GHASH_ASM' '-D' 'ECP_NISTZ256_ASM' '-D' 'X25519_ASM' '-D' 'POLY1305_ASM' '-D' 'OPENSSLDIR="C:/Program Files/Common Files/SSL"' '-D' 'ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1"' '-D' 'UNICODE' '-D' '_UNICODE' '-D' 'WIN32_LEAN_AND_MEAN' '-D' '_MT' '-D' 'NDEBUG' '-MMD' '-MF' 'apps/app_rand.d.tmp' '-MT' 'apps/app_rand.o' '-c' '-o' 'apps/app_rand.o' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-w64-mingw32/10-win32/cc1 -quiet -v -I . -I include -I ../_build-1.1.1/include -MMD apps/app_rand.d -MF apps/app_rand.d.tmp -MT apps/app_rand.o -U_REENTRANT -D L_ENDIAN -D OPENSSL_PIC -D OPENSSL_CPUID_OBJ -D OPENSSL_IA32_SSE2 -D OPENSSL_BN_ASM_MONT -D OPENSSL_BN_ASM_MONT5 -D OPENSSL_BN_ASM_GF2m -D SHA1_ASM -D SHA256_ASM -D SHA512_ASM -D KECCAK1600_ASM -D RC4_ASM -D MD5_ASM -D AESNI_ASM -D VPAES_ASM -D GHASH_ASM -D ECP_NISTZ256_ASM -D X25519_ASM -D POLY1305_ASM -D OPENSSLDIR="C:/Program Files/Common Files/SSL" -D ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1" -D UNICODE -D _UNICODE -D WIN32_LEAN_AND_MEAN -D _MT -D NDEBUG apps/app_rand.c -quiet -dumpbase app_rand.c -m64 -mtune=generic -march=x86-64 -auxbase-strip apps/app_rand.o -O3 -Wall -version -o /tmp/ccXMxxpE.s
GNU C17 (GCC) version 10-win32 20210110 (x86_64-w64-mingw32)
	compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-w64-mingw32/10-win32/../../../../x86_64-w64-mingw32/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 .
 include
 ../_build-1.1.1/include
 /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include
 /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed
 /usr/lib/gcc/x86_64-w64-mingw32/10-win32/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C17 (GCC) version 10-win32 20210110 (x86_64-w64-mingw32)
	compiled by GNU C version 10.2.1 20210110, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.0, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 61a47bcb6d4e05a8a49aeaa377917952
COLLECT_GCC_OPTIONS='-I' '.' '-I' 'include' '-I' '../_build-1.1.1/include' '-m64' '-Wall' '-O3' '-static-libgcc' '-D' 'L_ENDIAN' '-D' 'OPENSSL_PIC' '-D' 'OPENSSL_CPUID_OBJ' '-D' 'OPENSSL_IA32_SSE2' '-D' 'OPENSSL_BN_ASM_MONT' '-D' 'OPENSSL_BN_ASM_MONT5' '-D' 'OPENSSL_BN_ASM_GF2m' '-D' 'SHA1_ASM' '-D' 'SHA256_ASM' '-D' 'SHA512_ASM' '-D' 'KECCAK1600_ASM' '-D' 'RC4_ASM' '-D' 'MD5_ASM' '-D' 'AESNI_ASM' '-D' 'VPAES_ASM' '-D' 'GHASH_ASM' '-D' 'ECP_NISTZ256_ASM' '-D' 'X25519_ASM' '-D' 'POLY1305_ASM' '-D' 'OPENSSLDIR="C:/Program Files/Common Files/SSL"' '-D' 'ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1"' '-D' 'UNICODE' '-D' '_UNICODE' '-D' 'WIN32_LEAN_AND_MEAN' '-D' '_MT' '-D' 'NDEBUG' '-MMD' '-MF' 'apps/app_rand.d.tmp' '-MT' 'apps/app_rand.o' '-c' '-o' 'apps/app_rand.o' '-v' '-mtune=generic' '-march=x86-64'
 /usr/bin/x86_64-w64-mingw32-as -v -I . -I include -I ../_build-1.1.1/include --64 -o apps/app_rand.o /tmp/ccXMxxpE.s
GNU assembler version 2.35.2 (x86_64-w64-mingw32) som använder BFD version (GNU Binutils) 2.35.2
COMPILER_PATH=/usr/lib/gcc/x86_64-w64-mingw32/10-win32/:/usr/lib/gcc/x86_64-w64-mingw32/10-win32/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/10-win32/:/usr/lib/gcc/x86_64-w64-mingw32/:/usr/lib/gcc/x86_64-w64-mingw32/10-win32/../../../../x86_64-w64-mingw32/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-w64-mingw32/10-win32/:/usr/lib/gcc/x86_64-w64-mingw32/10-win32/../../../../x86_64-w64-mingw32/lib/
COLLECT_GCC_OPTIONS='-I' '.' '-I' 'include' '-I' '../_build-1.1.1/include' '-m64' '-Wall' '-O3' '-static-libgcc' '-D' 'L_ENDIAN' '-D' 'OPENSSL_PIC' '-D' 'OPENSSL_CPUID_OBJ' '-D' 'OPENSSL_IA32_SSE2' '-D' 'OPENSSL_BN_ASM_MONT' '-D' 'OPENSSL_BN_ASM_MONT5' '-D' 'OPENSSL_BN_ASM_GF2m' '-D' 'SHA1_ASM' '-D' 'SHA256_ASM' '-D' 'SHA512_ASM' '-D' 'KECCAK1600_ASM' '-D' 'RC4_ASM' '-D' 'MD5_ASM' '-D' 'AESNI_ASM' '-D' 'VPAES_ASM' '-D' 'GHASH_ASM' '-D' 'ECP_NISTZ256_ASM' '-D' 'X25519_ASM' '-D' 'POLY1305_ASM' '-D' 'OPENSSLDIR="C:/Program Files/Common Files/SSL"' '-D' 'ENGINESDIR="C:/Program Files/OpenSSL/lib/engines-1_1"' '-D' 'UNICODE' '-D' '_UNICODE' '-D' 'WIN32_LEAN_AND_MEAN' '-D' '_MT' '-D' 'NDEBUG' '-MMD' '-MF' 'apps/app_rand.d.tmp' '-MT' 'apps/app_rand.o' '-c' '-o' 'apps/app_rand.o' '-v' '-mtune=generic' '-march=x86-64'

Most notably, /usr/bin/x86_64-w64-mingw32-as is used, not just as.

Yes. But the one for linux shouldn't be used after all because I'm compiling for Windows, right?

Unsure... I don't use pacman on my linux machinery...

@levitte
Copy link
Member

levitte commented Aug 17, 2021

I think we can conclude that for some reason, your setup uses the wrong as

@scrouthtv
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch help wanted triaged: question The issue contains a question
Projects
None yet
Development

No branches or pull requests

4 participants