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

OpenSSL build fails on windows with mingw(64) #80

Closed
SSE4 opened this issue Sep 24, 2019 · 4 comments
Closed

OpenSSL build fails on windows with mingw(64) #80

SSE4 opened this issue Sep 24, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@SSE4
Copy link
Contributor

SSE4 commented Sep 24, 2019

moved from https://github.com/conan-community/community/issues/276
by @ruipires

Description of Problem, Request, or Question

Unable to build OpenSSL on windows, using the mingw64 compiler.

Opened an issue upstream, but was wondering if a workaround could be implemented in the conan recipe.

Compilation fails with:
x86_64-w64-mingw32/bin/as.exe: unknown option -- noexecstack

Package Details (Include if Applicable)

  • Package Name/Version: OpenSSL:conan / 1.1.1c:stable
  • Operating System: Windows
  • Operation System Version: Windows 10
  • Compiler+version: gcc-8.1 (mingw64)
  • Conan version: conan 1.18.4
  • Python version: python 3.7.4

Steps to reproduce (Include if Applicable)

Attempt to install OpenSSL as a dependency and request it is built
conan install .. --build=OpenSSL

Build logs (Include if Available)

OpenSSL/1.1.1c@conan/stable: ['"mingw-conan-Release-Windows-x86_64-gcc-8"', 'no-shared', '--prefix=/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822', '--opens
sldir=/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res', 'no-unit-test', 'PERL=perl', 'no-tests', '--release', '--with-zlib-include="C:/Users/rupires/.con
an/data/zlib/1.2.11/conan/stable/package/9965605309592d7e617ec929633249a2031e4263/include"', '--with-zlib-lib="C:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/package/9965605309592d7e617ec929633249a2031e4263/lib/z
lib.lib"']
OpenSSL/1.1.1c@conan/stable: run_in_windows_bash: C:\WINDOWS\system32\bash.exe --login -c ^"cd \^"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources\^" ^&
^& perl ./Configure \^"mingw-conan-Release-Windows-x86_64-gcc-8\^" no-shared --prefix=/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822 --openssldir=/mnt/c/Use
rs/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res no-unit-test PERL=perl no-tests --release --with-zlib-include=\^"C:/Users/rupires/.conan/data/zlib/1.2.11/conan/sta
ble/package/9965605309592d7e617ec929633249a2031e4263/include\^" --with-zlib-lib=\^"C:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/package/9965605309592d7e617ec929633249a2031e4263/lib/zlib.lib\^" ^"
OpenSSL/1.1.1c@conan/stable: Configuring OpenSSL version 1.1.1c (0x1010103fL) for mingw-conan-Release-Windows-x86_64-gcc-8
OpenSSL/1.1.1c@conan/stable: Using os-specific seed configuration
OpenSSL/1.1.1c@conan/stable: Creating configdata.pm
OpenSSL/1.1.1c@conan/stable: Creating Makefile
OpenSSL/1.1.1c@conan/stable:
OpenSSL/1.1.1c@conan/stable: **********************************************************************
OpenSSL/1.1.1c@conan/stable: ***                                                                ***
OpenSSL/1.1.1c@conan/stable: ***   OpenSSL has been successfully configured                     ***
OpenSSL/1.1.1c@conan/stable: ***                                                                ***
OpenSSL/1.1.1c@conan/stable: ***   If you encounter a problem while building, please open an    ***
OpenSSL/1.1.1c@conan/stable: ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
OpenSSL/1.1.1c@conan/stable: ***   and include the output from the following command:           ***
OpenSSL/1.1.1c@conan/stable: ***                                                                ***
OpenSSL/1.1.1c@conan/stable: ***       perl configdata.pm --dump                                ***
OpenSSL/1.1.1c@conan/stable: ***                                                                ***
OpenSSL/1.1.1c@conan/stable: ***   (If you are new to OpenSSL, you might want to consult the    ***
OpenSSL/1.1.1c@conan/stable: ***   'Troubleshooting' section in the INSTALL file first)         ***
OpenSSL/1.1.1c@conan/stable: ***                                                                ***
OpenSSL/1.1.1c@conan/stable: **********************************************************************
OpenSSL/1.1.1c@conan/stable: run_in_windows_bash: C:\WINDOWS\system32\bash.exe --login -c ^"cd \^"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources\^" ^&
^& /mnt/c/ProgramData/chocolatey/bin/mingw32-make.exe -j4 ^"
OpenSSL/1.1.1c@conan/stable: perl "-I." -Mconfigdata "util/dofile.pl" \
OpenSSL/1.1.1c@conan/stable:     "-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
OpenSSL/1.1.1c@conan/stable: perl "-I." -Mconfigdata "util/dofile.pl" \
OpenSSL/1.1.1c@conan/stable:     "-oMakefile" crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
OpenSSL/1.1.1c@conan/stable: perl "-I." -Mconfigdata "util/dofile.pl" \
OpenSSL/1.1.1c@conan/stable:     "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
OpenSSL/1.1.1c@conan/stable: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/mingw32-make depend && C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/mingw32-make _all
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: Entering directory 'C:/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources'
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: Leaving directory 'C:/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources'
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: Entering directory 'C:/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources'
OpenSSL/1.1.1c@conan/stable: gcc  -I. -Iinclude -m64 -m64 -O3 -s -Wa,--noexecstack -Wall -O3 -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 -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/mnt/c/Users/rupires/.conan/da
ta/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res\"" -DENGINESDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/lib/en
gines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG -DNDEBUG -IC:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/package/9965605309592d7e617ec929633249a2031e4263/include  -MMD -MF apps/app_rand.d.
tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
OpenSSL/1.1.1c@conan/stable: gcc  -I. -Iinclude -m64 -m64 -O3 -s -Wa,--noexecstack -Wall -O3 -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 -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/mnt/c/Users/rupires/.conan/da
ta/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res\"" -DENGINESDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/lib/en
gines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG -DNDEBUG -IC:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/package/9965605309592d7e617ec929633249a2031e4263/include  -MMD -MF apps/apps.d.tmp -MT apps/apps.o -c -o apps/apps.o apps/apps.c
OpenSSL/1.1.1c@conan/stable: gcc  -I. -Iinclude -m64 -m64 -O3 -s -Wa,--noexecstack -Wall -O3 -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 -DK
ECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res\"" -DENG
INESDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG -DNDEBUG -IC:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/pa
ckage/9965605309592d7e617ec929633249a2031e4263/include  -MMD -MF apps/bf_prefix.d.tmp -MT apps/bf_prefix.o -c -o apps/bf_prefix.o apps/bf_prefix.c
OpenSSL/1.1.1c@conan/stable: gcc  -I. -Iinclude -m64 -m64 -O3 -s -Wa,--noexecstack -Wall -O3 -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 -DK
ECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/res\"" -DENG
INESDIR="\"/mnt/c/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/package/040a01a894215f08a44b81859276e66540fc0822/lib/engines-1_1\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DNDEBUG -DNDEBUG -IC:/Users/rupires/.conan/data/zlib/1.2.11/conan/stable/pa
ckage/9965605309592d7e617ec929633249a2031e4263/include  -MMD -MF apps/opt.d.tmp -MT apps/opt.o -c -o apps/opt.o apps/opt.c
OpenSSL/1.1.1c@conan/stable: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: unknown option -- noexecstack
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: *** [Makefile:678: apps/app_rand.o] Error 1
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: *** Waiting for unfinished jobs....
OpenSSL/1.1.1c@conan/stable: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: unknown option -- noexecstack
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: *** [Makefile:694: apps/bf_prefix.o] Error 1
OpenSSL/1.1.1c@conan/stable: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: unknown option -- noexecstack
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: *** [Makefile:702: apps/opt.o] Error 1
OpenSSL/1.1.1c@conan/stable: C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: unknown option -- noexecstack
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: *** [Makefile:686: apps/apps.o] Error 1
OpenSSL/1.1.1c@conan/stable: mingw32-make[1]: Leaving directory 'C:/Users/rupires/.conan/data/OpenSSL/1.1.1c/conan/stable/build/040a01a894215f08a44b81859276e66540fc0822/sources'
OpenSSL/1.1.1c@conan/stable: mingw32-make: *** [Makefile:172: all] Error 2
OpenSSL/1.1.1c@conan/stable:
OpenSSL/1.1.1c@conan/stable: ERROR: Package '040a01a894215f08a44b81859276e66540fc0822' build failed
OpenSSL/1.1.1c@conan/stable: WARN: Build folder C:\Users\rupires\.conan\data\OpenSSL\1.1.1c\conan\stable\build\040a01a894215f08a44b81859276e66540fc0822
ERROR: OpenSSL/1.1.1c@conan/stable: Error in build() method, line 552
        self._make()
while calling '_make', line 522
        self._run_make()
while calling '_run_make', line 482
        self.run(" ".join(command), win_bash=self._win_bash)
        ConanException: Error 2 while executing /mnt/c/ProgramData/chocolatey/bin/mingw32-make.exe -j4
@uilianries uilianries added the bug Something isn't working label Sep 24, 2019
@uilianries
Copy link
Member

@SSE4
Copy link
Contributor Author

SSE4 commented Jan 30, 2020

I am closing as we have multiple reports of successful MinGW builds

@SSE4 SSE4 closed this as completed Jan 30, 2020
@temeddix
Copy link

temeddix commented Dec 8, 2021

I'm having the exact same issue. Using Windows 11, gcc 8.1(Mingw64), Conan 1.43.0. It's not fixed yet. Perhaps it WAS fixed, but this error is present. @SSE4

default (profile file)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Console output:

...
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/c/users/username/.conan/data/openssl/1.1.1c/_/_/build/9965605309592d7e617ec929633249a2031e4263/source_subfolder'
make: *** [Makefile:172: all] Error 2
openssl/1.1.1c:
openssl/1.1.1c: ERROR: Package '9965605309592d7e617ec929633249a2031e4263' build failed       
openssl/1.1.1c: WARN: Build folder C:\Users\username\.conan\data\openssl\1.1.1c\_\_\build\9965605309592d7e617ec929633249a2031e4263
ERROR: openssl/1.1.1c: Error in build() method, line 747
        self._make()
while calling '_make', line 683
        self._run_make()
while calling '_run_make', line 638
        self.run(" ".join(command), win_bash=self._win_bash)
        ConanException: Error 2 while executing /c/.conan/71eff4/1/bin/msys64/usr/bin/make.exe -j16```

@SSE4
Copy link
Contributor Author

SSE4 commented Dec 8, 2021

@temeddix please provide a full log, it's hard to say what's the actual error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants