Repository: conan-io/conan-center-index

Issue:
[package] openssl/3.x.x: can't compile if tools.build:defines set in profile
### Description

Building openssl with any tools.build:defines set either in profile or on the command line will cause the build to fail. The define will end up on the command line without the preceding `-D`

```
-DNDEBUG _FORTIFY_SOURCE=2
```

This is due to the following line in the recipe, which joins the list of defines together with a space. The configuration for openssl expects this to be a list of values instead.

https://github.com/conan-io/conan-center-index/blob/475660c43d088f989be8953f6e70706f6d1cd678/recipes/openssl/3.x.x/conanfile.py#L450 

This produces `defines => add("NDEBUG _FORTIFY_SOURCE=2"),` in the build folder under src/Configurations/20-conan.conf, when instead it should be `defines => add("NDEBUG", "_FORTIFY_SOURCE=2"),`

I think this line should be changed to `defines = '", "'.join(defines)` to correctly populate that field.

### Package and Environment Details

* Package Name/Version: **openssl/3.2.1**
* Operating System+version: **Linux Ubuntu 16.04**
* Compiler+version: **GCC 13**
* Docker image: **conanio/gcc13-ubuntu16.04**
* Conan version: **conan 2.0.17**
* Python version: **Python 3.7.13**


### Conan profile

[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux


### Steps to reproduce

```
docker run --rm -it conanio/gcc13-ubuntu16.04 bash
conan install --requires=openssl/3.2.1 -b missing -b "openssl/*" -c tools.build:defines=[\"_FORTIFY_SOURCE=2\"]
```

### Logs

<details><summary>Click to expand log</summary>

```

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[conf]
tools.build:defines=['_FORTIFY_SOURCE=2']

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux


======== Computing dependency graph ========
Graph root
    cli
Requirements
    openssl/3.2.1#ff3c0b15c72c3be49969acdf20ee345d - Cache
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Cache
Resolved version ranges
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
openssl/3.2.1: Forced build from source
Requirements
    openssl/3.2.1#ff3c0b15c72c3be49969acdf20ee345d:da09c78107176ccad7950cb4bc67ddbb13e28be1 - Build
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:c81087b06d1a5beef0ad711fc32d45f7a425a8f3 - Build

======== Installing packages ========

-------- Installing package zlib/1.3.1 (1 of 2) --------
zlib/1.3.1: Building from source
zlib/1.3.1: Package zlib/1.3.1:c81087b06d1a5beef0ad711fc32d45f7a425a8f3
zlib/1.3.1: Copying sources to build folder
zlib/1.3.1: Building your package in /home/conan/.conan2/p/b/zlib13a5a740bb99a/b
zlib/1.3.1: Calling generate()
zlib/1.3.1: Generators folder: /home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release/generators
zlib/1.3.1: CMakeToolchain generated: conan_toolchain.cmake
zlib/1.3.1: CMakeToolchain generated: CMakePresets.json
zlib/1.3.1: CMakeToolchain generated: ../../../src/CMakeUserPresets.json
zlib/1.3.1: Generating aggregated env files
zlib/1.3.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
zlib/1.3.1: Calling build()
zlib/1.3.1: Apply patch (conan): separate static/shared builds, disable debug suffix
zlib/1.3.1: Running CMake.configure()
zlib/1.3.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/.conan2/p/b/zlib13a5a740bb99a/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/.conan2/p/b/zlib13a5a740bb99a/b/src"
-- Using Conan toolchain: /home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is GNU 13.1.0
-- Check for working C compiler: /usr/local/bin/cc
-- Check for working C compiler: /usr/local/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Renaming
--     /home/conan/.conan2/p/b/zlib13a5a740bb99a/b/src/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release

zlib/1.3.1: Running CMake.build()
zlib/1.3.1: RUN: cmake --build "/home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release" -- -j8
Scanning dependencies of target zlib
[  6%] Building C object CMakeFiles/zlib.dir/adler32.c.o
[ 12%] Building C object CMakeFiles/zlib.dir/compress.c.o
[ 25%] Building C object CMakeFiles/zlib.dir/deflate.c.o
[ 25%] Building C object CMakeFiles/zlib.dir/crc32.c.o
[ 31%] Building C object CMakeFiles/zlib.dir/gzlib.c.o
[ 43%] Building C object CMakeFiles/zlib.dir/gzclose.c.o
[ 43%] Building C object CMakeFiles/zlib.dir/gzread.c.o
[ 50%] Building C object CMakeFiles/zlib.dir/gzwrite.c.o
[ 56%] Building C object CMakeFiles/zlib.dir/inflate.c.o
[ 62%] Building C object CMakeFiles/zlib.dir/infback.c.o
[ 68%] Building C object CMakeFiles/zlib.dir/inftrees.c.o
[ 75%] Building C object CMakeFiles/zlib.dir/inffast.c.o
[ 81%] Building C object CMakeFiles/zlib.dir/trees.c.o
[ 87%] Building C object CMakeFiles/zlib.dir/uncompr.c.o
[ 93%] Building C object CMakeFiles/zlib.dir/zutil.c.o
[100%] Linking C static library libz.a
[100%] Built target zlib

zlib/1.3.1: Package 'c81087b06d1a5beef0ad711fc32d45f7a425a8f3' built
zlib/1.3.1: Build folder /home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release
zlib/1.3.1: Generating the package
zlib/1.3.1: Packaging in folder /home/conan/.conan2/p/b/zlib13a5a740bb99a/p
zlib/1.3.1: Calling package()
zlib/1.3.1: Running CMake.install()
zlib/1.3.1: RUN: cmake --install "/home/conan/.conan2/p/b/zlib13a5a740bb99a/b/build/Release" --prefix "/home/conan/.conan2/p/b/zlib13a5a740bb99a/p"
-- Install configuration: "Release"
-- Installing: /home/conan/.conan2/p/b/zlib13a5a740bb99a/p/lib/libz.a
-- Installing: /home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include/zconf.h
-- Installing: /home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include/zlib.h

zlib/1.3.1: package(): Packaged 1 '.a' file: libz.a
zlib/1.3.1: package(): Packaged 2 '.h' files: zlib.h, zconf.h
zlib/1.3.1: package(): Packaged 1 file: LICENSE
zlib/1.3.1: Created package revision 19ee2e584deae02bac5df0f6225abc9b
zlib/1.3.1: Package 'c81087b06d1a5beef0ad711fc32d45f7a425a8f3' created
zlib/1.3.1: Full package reference: zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:c81087b06d1a5beef0ad711fc32d45f7a425a8f3#19ee2e584deae02bac5df0f6225abc9b
zlib/1.3.1: Package folder /home/conan/.conan2/p/b/zlib13a5a740bb99a/p
openssl/3.2.1: Sources downloaded from 'conancenter'
openssl/3.2.1: Calling source() in /home/conan/.conan2/p/opens1a81d039f14a8/s/src
openssl/3.2.1: Downloading 17.7MB openssl-3.2.1.tar.gz

-------- Installing package openssl/3.2.1 (2 of 2) --------
openssl/3.2.1: Building from source
openssl/3.2.1: Package openssl/3.2.1:da09c78107176ccad7950cb4bc67ddbb13e28be1
openssl/3.2.1: Copying sources to build folder
openssl/3.2.1: Building your package in /home/conan/.conan2/p/b/opensbd7ef7b64969b/b
openssl/3.2.1: Calling generate()
openssl/3.2.1: Generators folder: /home/conan/.conan2/p/b/opensbd7ef7b64969b/b/build-release/conan
openssl/3.2.1: using target: conan-Release-Linux-x86_64-gcc-13 -> linux-x86_64
openssl/3.2.1: my %targets = (
    "conan-Release-Linux-x86_64-gcc-13" => {
        inherit_from => [ "linux-x86_64" ],
        cflags => add("-m64 -fPIC -O3"),
        cxxflags => add("-m64 -fPIC -O3"),
        defines => add("NDEBUG _FORTIFY_SOURCE=2"),
        lflags => add("-m64"),




    },
);

openssl/3.2.1: Generating aggregated env files
openssl/3.2.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
openssl/3.2.1: Calling build()
openssl/3.2.1: apply_conandata_patches(): No patches defined in conandata
openssl/3.2.1: RUN: perl ./Configure "conan-Release-Linux-x86_64-gcc-13" no-shared --prefix=/ --libdir=lib --openssldir="/etc/ssl" no-unit-test threads PERL=perl no-tests --release -fPIC enable-fips no-md2 -DOPENSSL_TLS_SECURITY_LEVEL=2 zlib --with-zlib-include="/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include" --with-zlib-lib="/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/lib"
Configuring OpenSSL version 3.2.1 for target conan-Release-Linux-x86_64-gcc-13
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile
Created include/openssl/configuration.h

**********************************************************************
***                                                                ***
***   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.md file first)      ***
***                                                                ***
**********************************************************************

openssl/3.2.1: RUN: make -j8
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/internal/param_names.h.in > include/internal/param_names.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1.h.in > include/openssl/asn1.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/asn1t.h.in > include/openssl/asn1t.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/bio.h.in > include/openssl/bio.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cmp.h.in > include/openssl/cmp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/cms.h.in > include/openssl/cms.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/conf.h.in > include/openssl/conf.h
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" include/openssl/core_names.h.in > include/openssl/core_names.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crmf.h.in > include/openssl/crmf.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/crypto.h.in > include/openssl/crypto.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ct.h.in > include/openssl/ct.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/err.h.in > include/openssl/err.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ess.h.in > include/openssl/ess.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/fipskey.h.in > include/openssl/fipskey.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/lhash.h.in > include/openssl/lhash.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ocsp.h.in > include/openssl/ocsp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/opensslv.h.in > include/openssl/opensslv.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs12.h.in > include/openssl/pkcs12.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/pkcs7.h.in > include/openssl/pkcs7.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/safestack.h.in > include/openssl/safestack.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/srp.h.in > include/openssl/srp.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ssl.h.in > include/openssl/ssl.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/ui.h.in > include/openssl/ui.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509.h.in > include/openssl/x509.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509_vfy.h.in > include/openssl/x509_vfy.h
perl "-I." "-Mconfigdata" "util/dofile.pl" "-oMakefile" include/openssl/x509v3.h.in > include/openssl/x509v3.h
make depend && make _build_sw
make[1]: Entering directory '/home/conan/.conan2/p/b/opensbd7ef7b64969b/b/src'
make[1]: Leaving directory '/home/conan/.conan2/p/b/opensbd7ef7b64969b/b/src'
make[1]: Entering directory '/home/conan/.conan2/p/b/opensbd7ef7b64969b/b/src'
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-app_libctx.d.tmp -MT apps/lib/libapps-lib-app_libctx.o -c -o apps/lib/libapps-lib-app_libctx.o apps/lib/app_libctx.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-app_params.d.tmp -MT apps/lib/libapps-lib-app_params.o -c -o apps/lib/libapps-lib-app_params.o apps/lib/app_params.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-app_provider.d.tmp -MT apps/lib/libapps-lib-app_provider.o -c -o apps/lib/libapps-lib-app_provider.o apps/lib/app_provider.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-app_rand.d.tmp -MT apps/lib/libapps-lib-app_rand.o -c -o apps/lib/libapps-lib-app_rand.o apps/lib/app_rand.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-app_x509.d.tmp -MT apps/lib/libapps-lib-app_x509.o -c -o apps/lib/libapps-lib-app_x509.o apps/lib/app_x509.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-apps.d.tmp -MT apps/lib/libapps-lib-apps.o -c -o apps/lib/libapps-lib-apps.o apps/lib/apps.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-apps_opt_printf.d.tmp -MT apps/lib/libapps-lib-apps_opt_printf.o -c -o apps/lib/libapps-lib-apps_opt_printf.o apps/lib/apps_opt_printf.c
gcc  -I. -Iinclude -Iapps/include  -fPIC -pthread -m64 -m64 -fPIC -O3 -Wa,--noexecstack -m64 -fPIC -O3 -fPIC -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG _FORTIFY_SOURCE=2 -DNDEBUG -I/home/conan/.conan2/p/b/zlib13a5a740bb99a/p/include -DOPENSSL_TLS_SECURITY_LEVEL=2  -DNDEBUG -D_FORTIFY_SOURCE=2 -MMD -MF apps/lib/libapps-lib-apps_ui.d.tmp -MT apps/lib/libapps-lib-apps_ui.o -c -o apps/lib/libapps-lib-apps_ui.o apps/lib/apps_ui.c
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4115: recipe for target 'apps/lib/libapps-lib-apps_opt_printf.o' failed
make[1]: *** [apps/lib/libapps-lib-apps_opt_printf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4123: recipe for target 'apps/lib/libapps-lib-apps_ui.o' failed
make[1]: *** [apps/lib/libapps-lib-apps_ui.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4083: recipe for target 'apps/lib/libapps-lib-app_provider.o' failed
make[1]: *** [apps/lib/libapps-lib-app_provider.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4067: recipe for target 'apps/lib/libapps-lib-app_libctx.o' failed
make[1]: *** [apps/lib/libapps-lib-app_libctx.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4091: recipe for target 'apps/lib/libapps-lib-app_rand.o' failed
make[1]: *** [apps/lib/libapps-lib-app_rand.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4075: recipe for target 'apps/lib/libapps-lib-app_params.o' failed
make[1]: *** [apps/lib/libapps-lib-app_params.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4099: recipe for target 'apps/lib/libapps-lib-app_x509.o' failed
make[1]: *** [apps/lib/libapps-lib-app_x509.o] Error 1
gcc: warning: _FORTIFY_SOURCE=2: linker input file unused because linking not done
gcc: error: _FORTIFY_SOURCE=2: linker input file not found: No such file or directory
Makefile:4107: recipe for target 'apps/lib/libapps-lib-apps.o' failed
make[1]: *** [apps/lib/libapps-lib-apps.o] Error 1
make[1]: Leaving directory '/home/conan/.conan2/p/b/opensbd7ef7b64969b/b/src'
Makefile:2524: recipe for target 'build_sw' failed
make: *** [build_sw] Error 2

openssl/3.2.1: ERROR:
Package 'da09c78107176ccad7950cb4bc67ddbb13e28be1' build failed
openssl/3.2.1: WARN: Build folder /home/conan/.conan2/p/b/opensbd7ef7b64969b/b/build-release
ERROR: openssl/3.2.1: Error in build() method, line 529
        self._make()
while calling '_make', line 521
        self._run_make()
while calling '_run_make', line 498
        self.run(" ".join(command), env="conanbuild")
        ConanException: Error 2 while executing
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py
--- a/recipes/openssl/3.x.x/conanfile.py
+++ b/recipes/openssl/3.x.x/conanfile.py
@@ -451,7 +451,7 @@ def _create_targets(self, cflags, cxxflags, defines, ldflags):
         if self._perlasm_scheme:
             perlasm_scheme = 'perlasm_scheme => "%s",' % self._perlasm_scheme
 
-        defines = " ".join(defines)
+        defines = '", "'.join(defines)
         defines = 'defines => add("%s"),' % defines if defines else ""
         targets = "my %targets"
 


Test patch: