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
Comments
It also fails with this simplified configuration:
perl configdata.pm --dumpCommand line (with current working directory = .):
Perl information:
Enabled features:
Disabled features:
Config target attributes:
Recorded environment:
Makevars:
NOTE: These variables only represent the configuration view. The build file build file:
build file templates:
|
Maybe a bug in toolchain? What versions of binutils and gcc are you using? On my Gentoo crossdev environment the build seems fine, using:
|
|
There is no mingw runtime on Arch afaik.
As an argument to
EDIT: I just tested exactly tag |
Probably a wrong assembler is invoked from gcc I guess, from the following observation:
The
|
It's indeed calling GNU assembler (x86_64-pc-linux-gnu). Any idea how to fix this? |
https://stackoverflow.com/a/24741760/7242251 Adding EDIT: If I add |
To |
How would I go about debugging this? If I simply run It does not call the linux assembler at all. |
Hold on, that's two different binutils and two different gcc packages. If I understand correctly, they don't mix well, and considering this
What happens if you uninstall the non-mingw gcc and binutils? |
Quick sidenote: I just successfully built OpenSSL in an ubuntu vm.
Yes. But the one for linux shouldn't be used after all because I'm compiling for Windows, right?
|
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,
Unsure... I don't use |
I think we can conclude that for some reason, your setup uses the wrong |
perl configdata.pm --dump
Command line (with current working directory = .):Perl information:
Enabled features:
Disabled features:
Config target attributes:
Recorded environment:
Makevars:
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:
build file templates:
Hello,
I am currently trying to build OpenSSL 1.1.1k (as a dependency for OpenVPN).
I ran these commands:
make
gives this error: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.
The text was updated successfully, but these errors were encountered: