conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
949 stars 1.74k forks source link

[package] openssl/3.0.3: can not be built under Windows 11 (Visual Studio 11) #10755

Open Trafo opened 2 years ago

Trafo commented 2 years ago

Package and Environment Details

Conan profile

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

My description

I opened already a bug ticket in OpenSSL: https://github.com/openssl/openssl/issues/18299

The main problem is, that there is a variable set: RC = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" The quotes are the problem there. Because this leads to the call inside of the build script: ""C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe"" /foapps\openssl-bin-openssl.res "apps\openssl.rc" which leads to the failure: The system cannot find the path specified. OpenSSL developers are claiming that this RC is set by the Conan script. Sadly just looking into the Conan script, I don't see where it is done.

Logs (Include/Attach if Applicable)

Click to expand log Build log: ``` openssl/3.0.3: Applying build-requirement: strawberryperl/5.30.0.1 openssl/3.0.3: Applying build-requirement: nasm/2.15.05 openssl/3.0.3: WARN: Build folder is dirty, removing it: C:\Users\mathiaseggert\.conan\data\openssl\3.0.3\_\_\build\cdb6fd543ab5677fd09e2c988f468d700c5445bc openssl/3.0.3: Copying sources to build folder openssl/3.0.3: Building your package in C:\Users\mathiaseggert\.conan\data\openssl\3.0.3\_\_\build\cdb6fd543ab5677fd09e2c988f468d700c5445bc openssl/3.0.3: Generator txt created conanbuildinfo.txt openssl/3.0.3: Aggregating env generators openssl/3.0.3: Calling build() Conan:vcvars already set openssl/3.0.3: using target: VC-conan-Release-Windows-x86_64-Visual Studio-17 -> VC-WIN64A openssl/3.0.3: my %targets = ( "VC-conan-Release-Windows-x86_64-Visual Studio-17" => { inherit_from => [ "VC-WIN64A" ], cflags => add("-O2 -Ob2 -MD"), cxxflags => add("-O2 -Ob2 -MD"), defines => add("NDEBUG"), includes => add("C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include"), lflags => add(""), cxx => "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe", }, ); WARN: replace_in_file didn't find pattern '/MTd ' in 'Configurations\10-main.conf' file. WARN: replace_in_file didn't find pattern '/MTd"' in 'Configurations\10-main.conf' file. Configuring OpenSSL version 3.0.3 for target VC-conan-Release-Windows-x86_64-Visual Studio-17 Using os-specific seed configuration Creating configdata.pm Running configdata.pm Creating makefile.in Creating makefile ********************************************************************** *** *** *** OpenSSL has been successfully configured *** *** *** *** If you encounter a problem while building, please open an *** *** issue on GitHub *** *** 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.md file first) *** *** *** ********************************************************************** Microsoft (R) Program Maintenance Utility Version 14.31.31107.0 Copyright (C) Microsoft Corporation. All rights reserved. "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\crypto\bn_conf.h.in" > include\crypto\bn_conf.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\crypto\dso_conf.h.in" > include\crypto\dso_conf.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\asn1.h.in" > include\openssl\asn1.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\asn1t.h.in" > include\openssl\asn1t.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\bio.h.in" > include\openssl\bio.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\cmp.h.in" > include\openssl\cmp.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\cms.h.in" > include\openssl\cms.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\conf.h.in" > include\openssl\conf.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\configuration.h.in" > include\openssl\configuration.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\crmf.h.in" > include\openssl\crmf.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\crypto.h.in" > include\openssl\crypto.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\ct.h.in" > include\openssl\ct.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\err.h.in" > include\openssl\err.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\ess.h.in" > include\openssl\ess.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\fipskey.h.in" > include\openssl\fipskey.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\lhash.h.in" > include\openssl\lhash.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\ocsp.h.in" > include\openssl\ocsp.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\opensslv.h.in" > include\openssl\opensslv.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\pkcs12.h.in" > include\openssl\pkcs12.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\pkcs7.h.in" > include\openssl\pkcs7.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\safestack.h.in" > include\openssl\safestack.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\srp.h.in" > include\openssl\srp.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\ssl.h.in" > include\openssl\ssl.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\ui.h.in" > include\openssl\ui.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\x509.h.in" > include\openssl\x509.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\x509_vfy.h.in" > include\openssl\x509_vfy.h "C:\.conan\fcf9d5\1\bin\perl.exe" "-I." -Mconfigdata "util\dofile.pl" "-omakefile" "include\openssl\x509v3.h.in" > include\openssl\x509v3.h "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe" / depend Microsoft (R) Program Maintenance Utility Version 14.31.31107.0 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe" / _build_sw Microsoft (R) Program Maintenance Utility Version 14.31.31107.0 Copyright (C) Microsoft Corporation. All rights reserved. ... BUILD processing ... x509.c cmd /C """cl"" /Zs /showIncludes /Zi /Fdapp.pdb /MD /Gs0 /GF /Gy -O2 -Ob2 -MD /W3 /wd4090 /nologo /O2 -I"apps" -I"." -I"include" -I"apps\include" -D"OPENSSL_BUILDING_OPENSSL" -D"ZLIB" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"NDEBUG" -D"NDEBUG" -I"C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include" -I"C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include" "apps\x509.c" > apps\openssl-bin-x509.d 2>&1" "C:\.conan\fcf9d5\1\bin\perl.exe" util\mkrc.pl openssl > apps\openssl.rc ""C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe"" /foapps\openssl-bin-openssl.res "apps\openssl.rc" The system cannot find the path specified. NMAKE : fatal error U1077: '""C:\Program' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop. openssl/3.0.3: openssl/3.0.3: ERROR: Package 'cdb6fd543ab5677fd09e2c988f468d700c5445bc' build failed ``` OpenSSL Config data: ``` Command line (with current working directory = .): C:\.conan\fcf9d5\1\bin\perl.exe Configure VC-conan-Release-Windows-x86_64-Visual Studio-17 no-shared --prefix=C:\Users\mathiaseggert\.conan\data\openssl\3.0.3\_\_\package\cdb6fd543ab5677fd09e2c988f468d700c5445bc --libdir=lib --openssldir=C:\Users\mathiaseggert\.conan\data\openssl\3.0.3\_\_\package\cdb6fd543ab5677fd09e2c988f468d700c5445bc\res no-unit-test threads PERL=C:\.conan\fcf9d5\1\bin\perl.exe no-tests --release enable-fips zlib --with-zlib-include=C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include --with-zlib-lib=C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/lib/zlib.lib Perl information: C:\.conan\fcf9d5\1\bin\perl.exe 5.30.0 for MSWin32-x64-multi-thread Enabled features: acvp-tests aria asm async autoalginit autoerrinit autoload-config bf blake2 bulk cached-fetch camellia capieng cast chacha cmac cmp cms comp ct deprecated des dgram dh dsa dso dtls ec ec2m ecdh ecdsa engine err filenames fips fips-securitychecks gost idea legacy makedepend md4 mdc2 module multiblock nextprotoneg ocb ocsp padlockeng pic pinshared poly1305 posix-io psk rc2 rc4 rdrand rfc3779 rmd160 scrypt secure-memory seed siphash siv sm2 sm3 sm4 sock srp srtp sse2 ssl ssl-trace static-engine stdio threads tls ts ui-console whirlpool zlib 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 devcryptoeng [default] OPENSSL_NO_DEVCRYPTOENG dynamic-engine [cascade] 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-afl [default] OPENSSL_NO_FUZZ_AFL fuzz-libfuzzer [default] OPENSSL_NO_FUZZ_LIBFUZZER ktls [default] OPENSSL_NO_KTLS loadereng [cascade] OPENSSL_NO_LOADERENG 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 shared [option] tests [option] OPENSSL_NO_TESTS trace [default] OPENSSL_NO_TRACE ubsan [default] OPENSSL_NO_UBSAN unit-test [option] OPENSSL_NO_UNIT_TEST uplink [cascade] OPENSSL_NO_UPLINK weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS zlib-dynamic [default] ssl3 [default] OPENSSL_NO_SSL3 ssl3-method [default] OPENSSL_NO_SSL3_METHOD Config target attributes: AR => "lib", ARFLAGS => "/nologo", AS => "nasm", ASFLAGS => "-g", CC => "cl", CFLAGS => "/W3 /wd4090 /nologo /O2", CPP => "\"\$(CC)\" /EP /C", CXX => "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe", CXXFLAGS => "/W3 /wd4090 /nologo /O2", HASHBANGPERL => "/usr/bin/env perl", LD => "link", LDFLAGS => "/nologo /debug", MT => "mt", MTFLAGS => "-nologo", RANLIB => "CODE(0x27e3140)", RC => "rc", ar_resp_delim => " ", aroutflag => "/out:", asflags => "-Ox -f win64 -DNEAR", asm_arch => "x86_64", asoutflag => "-o ", bin_cflags => "/Zi /Fdapp.pdb /MD", bin_lflags => "setargv.obj /subsystem:console /opt:ref", bn_ops => "SIXTY_FOUR_BIT", build_file => "makefile", build_scheme => [ "unified", "windows", "VC-common" ], cflags => "/Gs0 /GF /Gy -O2 -Ob2 -MD", coutflag => "/Fo", cppflags => "", cxxflags => "-O2 -Ob2 -MD", defines => [ "OPENSSL_BUILDING_OPENSSL", "ZLIB", "OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", "UNICODE", "_UNICODE", "_CRT_SECURE_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS", "NDEBUG" ], disable => [ ], dso_cflags => "/Zi /Fddso.pdb", dso_scheme => "win32", enable => [ ], ex_libs => "C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/lib/zlib.lib ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib", includes => [ "C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include", "C:/Users/mathiaseggert/.conan/data/zlib/1.2.12/_/_/package/5a61a86bb3e07ce4262c80e1510f9c05e9b6d48b/include" ], ld_implib_flag => "/implib:", ld_resp_delim => " ", lddefflag => "/def:", ldoutflag => "/out:", ldpostoutflag => "", ldresflag => " ", lflags => "", lib_cflags => "/Zi /Fdossl_static.pdb /MD /Zl", lib_cppflags => "", lib_defines => [ "L_ENDIAN" ], makedep_scheme => "VC", makedepcmd => "\"\$(CC)\" /Zs /showIncludes", module_cflags => "", module_cxxflags => undef, module_ldflags => "/dll", mtinflag => "-manifest ", mtoutflag => "-outputresource:", multilib => "-x64", perl_platform => "Windows::MSVC", perlasm_scheme => "auto", rcoutflag => "/fo", shared_cflag => "", shared_defflag => "", shared_defines => [ ], shared_ldflag => "/dll", shared_rcflag => "", shared_target => "win-shared", sys_id => "WIN64A", thread_defines => [ ], thread_scheme => "winthreads", unistd => "", uplink_arch => "x86_64", Recorded environment: AR = ARFLAGS = AS = ASFLAGS = BUILDFILE = CC = CFLAGS = CPP = CPPDEFINES = CPPFLAGS = CPPINCLUDES = CROSS_COMPILE = CXX = C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe CXXFLAGS = HASHBANGPERL = LD = LDFLAGS = LDLIBS = MT = MTFLAGS = OPENSSL_LOCAL_CONFIG_DIR = PERL = C:\.conan\fcf9d5\1\bin\perl.exe RANLIB = RC = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" RCFLAGS = RM = __CNF_CFLAGS = __CNF_CPPDEFINES = __CNF_CPPFLAGS = __CNF_CPPINCLUDES = __CNF_CXXFLAGS = __CNF_LDFLAGS = __CNF_LDLIBS = Makevars: AR = lib ARFLAGS = /nologo AS = nasm ASFLAGS = -g CC = cl CFLAGS = /W3 /wd4090 /nologo /O2 CPP = "$(CC)" /EP /C CPPDEFINES = CPPFLAGS = CPPINCLUDES = CXX = C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe CXXFLAGS = /W3 /wd4090 /nologo /O2 HASHBANGPERL = C:\.conan\fcf9d5\1\bin\perl.exe LD = link LDFLAGS = /nologo /debug LDLIBS = MT = mt MTFLAGS = -nologo PERL = C:\.conan\fcf9d5\1\bin\perl.exe RC = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\rc.exe" 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\windows-makefile.tmpl ```
SpaceIm commented 2 years ago

OpenSSL developers are claiming that this RC is set by the Conan script. Sadly just looking into the Conan script, I don't see where it is done.

Maybe from https://github.com/conan-io/conan-center-index/blob/b0cacc29d3e7ff9cfac2b1807f4e11ea985a1859/recipes/openssl/3.x.x/conanfile.py#L588-L600

It has been added in openssl 1.1.1x branch by https://github.com/conan-io/conan-center-index/pull/5441, then kept when 3.x.x branch was created.

jahnf commented 1 year ago

@Trafo Did you happen to get a successful build? I ran into the same issue with Visual Studio 2022 on Windows 11 with OpenSSL 3.0.7 recently. Is there a workaround?