Skip to content

[package] openssl/1.1.1w: tools.build:compiler_executables breaks build (spaces?) #21167

@Nekto89

Description

@Nekto89

Description

cmake-conan adds tools.build:compiler_executables to host profile. I've noticed that it breaks build of OpenSSL for some reason. Maybe it's caused by spaces in path to compiler? I'm not used to makefiles but it seems that it doesn't have double quotes around $(CC).

Broken build has this makefile

##### User defined commands and flags ################################

CC=C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe

Working one from profile without tools.build:compiler_executables

##### User defined commands and flags ################################

CC=cl

Package and Environment Details

  • Package Name/Version: openssl/1.1.1w
  • Operating System+version: Windows 10
  • Compiler+version: VS2019
  • Docker image: -
  • Conan version: conan 2.0.14
  • Python version: Python 3.11.5

Conan profile

[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.update=9
compiler.version=192
os=Windows
[tool_requires]
[conf]
tools.cmake.cmaketoolchain:generator=Visual Studio 16 2019
tools.build:compiler_executables={'c': 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe', 'cpp': 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe'}

Steps to reproduce

conan install --requires openssl/1.1.1w --build=missing --profile:build=build_profile --profile:host=host_profile

Logs

Click to expand log
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.update=9
compiler.version=192
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Visual Studio 16 2019
tools.build:compiler_executables={'c': 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe', 'cpp': 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe'}

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.update=9
compiler.version=192
os=Windows
[conf]



======== Computing dependency graph ========
Graph root
    cli
Requirements
    openssl/1.1.1w#ed8eb428db825b7ac4ac2b467bf5b001 - Cache
Build requirements
    nasm/2.15.05#ca1c14c2060af0ec151048b54ced9262 - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache

======== Computing necessary packages ========
Requirements
    openssl/1.1.1w#ed8eb428db825b7ac4ac2b467bf5b001:f0a411efd8cf5d5a48a4c6986ad8a702a78f79f8 - Build
Build requirements
    nasm/2.15.05#ca1c14c2060af0ec151048b54ced9262:723257509aee8a72faf021920c2874abc738e029#88d82c8b5a0298a070ca691f347e6c05 - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47:522dcea5982a3f8a5b624c16477e47195da2f84f#a365b3810f698e2f0a00fbeece022903 - Cache

======== Installing packages ========
strawberryperl/5.32.1.1: Already installed! (1 of 3)
nasm/2.15.05: Already installed! (2 of 3)

-------- Installing package openssl/1.1.1w (3 of 3) --------
openssl/1.1.1w: Building from source
openssl/1.1.1w: Package openssl/1.1.1w:f0a411efd8cf5d5a48a4c6986ad8a702a78f79f8
openssl/1.1.1w: Copying sources to build folder
openssl/1.1.1w: Building your package in D:\conan2s\b\opens1a27d2f743a4c\b
openssl/1.1.1w: Calling generate()
openssl/1.1.1w: Generators folder: D:\conan2s\b\opens1a27d2f743a4c\b\build-debug\conan
openssl/1.1.1w: Generating aggregated env files
openssl/1.1.1w: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
openssl/1.1.1w: Calling build()
openssl/1.1.1w: Apply patch (portability): TVOS and WatchOS don't like fork()
openssl/1.1.1w: gen_info = {'CFLAGS': ['-MDd', '-Zi', '-Ob0', '-Od'], 'CXXFLAGS': ['-MDd', '-Zi', '-Ob0', '-Od'], 'DEFINES': [], 'LDFLAGS': ['-debug']}
openssl/1.1.1w: using target: VC-conan-Debug-Windows-x86_64-msvc-192 -> VC-WIN64A
openssl/1.1.1w: my %targets = (
    "VC-conan-Debug-Windows-x86_64-msvc-192" => {
        inherit_from => [ "VC-WIN64A" ],
        cflags => add("-MDd -Zi -Ob0 -Od"),
        cxxflags => add("-MDd -Zi -Ob0 -Od"),

        includes => add(),
        lflags => add("-debug"),








    },
);

openssl/1.1.1w: ['"VC-conan-Debug-Windows-x86_64-msvc-192"', 'no-shared', '--prefix=/', '--openssldir="res"', 'no-unit-test', 'threads', 'PERL=D:/conan2s/straw4602bdba38fca/p/bin/perl.exe', 'no-tests', '--debug', '--libdir=lib', 'no-md2']
openssl/1.1.1w: WARN: replace_in_file didn't find pattern '/MTd ' in 'Configurations\10-main.conf' file.
openssl/1.1.1w: WARN: replace_in_file didn't find pattern '/MTd"' in 'Configurations\10-main.conf' file.
openssl/1.1.1w: RUN: D:/conan2s/straw4602bdba38fca/p/bin/perl.exe ./Configure "VC-conan-Debug-Windows-x86_64-msvc-192" no-shared --prefix=/ --openssldir="res" no-unit-test threads PERL=D:/conan2s/straw4602bdba38fca/p/bin/perl.exe no-tests --debug --libdir=lib no-md2
conanvcvars.bat: Activating environment Visual Studio 16 - amd64 - vcvars_ver=14.2
[vcvarsall.bat] Environment initialized for: 'x64'
Configuring OpenSSL version 1.1.1w (0x1010117fL) for VC-conan-Debug-Windows-x86_64-msvc-192
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)         ***
***                                                                ***
**********************************************************************

openssl/1.1.1w: RUN: nmake /F Makefile
conanvcvars.bat: Activating environment Visual Studio 16 - amd64 - vcvars_ver=14.2
[vcvarsall.bat] Environment initialized for: 'x64'

Microsoft (R) Program Maintenance Utility Version 14.29.30152.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "D:/conan2s/straw4602bdba38fca/p/bin/perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "include\crypto\bn_conf.h.in" > include\crypto\bn_conf.h
        "D:/conan2s/straw4602bdba38fca/p/bin/perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "include\crypto\dso_conf.h.in" > include\crypto\dso_conf.h
        "D:/conan2s/straw4602bdba38fca/p/bin/perl.exe" "-I." -Mconfigdata "util\dofile.pl"  "-omakefile" "include\openssl\opensslconf.h.in" > include\openssl\opensslconf.h
        "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe" /                   depend && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe" /                   _all

Microsoft (R) Program Maintenance Utility Version 14.29.30152.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Microsoft (R) Program Maintenance Utility Version 14.29.30152.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe  /Zi /Fdossl_static.pdb /MDd /Zl /Gs0 /GF /Gy -MDd -Zi -Ob0 -Od -MDd -Zi -Ob0 -Od /I "." /I "include" -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=\"\\res\"" -D"ENGINESDIR=\"\\lib\\engines-1_1\"" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"DEBUG" -D"_DEBUG"  -c /Foapps\app_rand.obj "apps\app_rand.c"
        C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe  /Zi /Fdossl_static.pdb /MDd /Zl /Gs0 /GF /Gy -MDd -Zi -Ob0 -Od -MDd -Zi -Ob0 -Od /I "." /I "include" -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=\"\\res\"" -D"ENGINESDIR=\"\\lib\\engines-1_1\"" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"DEBUG" -D"_DEBUG"  /Zs /showIncludes "apps\app_rand.c" 2>&1 > apps\app_rand.d
NMAKE : fatal error U1073: don't know how to make '"apps\apps.c"'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

openssl/1.1.1w: ERROR:
Package 'f0a411efd8cf5d5a48a4c6986ad8a702a78f79f8' build failed
openssl/1.1.1w: WARN: Build folder D:\conan2s\b\opens1a27d2f743a4c\b\build-debug
*********************************************************
Recipe 'openssl/1.1.1w' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: openssl/1.1.1w: Error in build() method, line 517
        self.run("nmake /F Makefile")
        ConanException: Error 2 while executing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions