conan-center-index
conan-center-index copied to clipboard
[package] openssl/3.2.1: local Compile falied!
Description
I ran into this problem when compiling openssl on Windows using Conan. Through searching, I found the cause of the problem, but I can't solve it with Conan. On Windows, there is no ipi_spec_dst in struct in_pktinfo. https://sourceforge.net/p/netcat/bugs/50/ It's a patch for Netcat that seems to solve this problem.
Package and Environment Details
- Package Name/Version: openssl/3.2.1
- Operating System+version: Windows11
- Compiler+version: GCC 13.1
- Conan version: conan 2.1.0
Conan profile
[settings] arch=x86_64 build_type=Release compiler=gcc compiler.version=13.1 os=Windows
Steps to reproduce
conan install .. --build missing
Logs
Click to expand log
PS D:\work\code\CTutorials\cmake-build-debug> conan install .. --build missing
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=13.1
os=Windows
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=13.1
os=Windows
======== Computing dependency graph ========
Graph root
conanfile.txt: D:\work\code\CTutorials\conanfile.txt
Requirements
openssl/3.2.1#00ea0b8246cb6a0d086d8817ac9ac048 - Cache
zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache
Build requirements
msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c - Cache
nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568 - Cache
strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache
Resolved version ranges
zlib/[>=1.2.11 <2]: zlib/1.3.1
======== Computing necessary packages ========
Requirements
openssl/3.2.1#00ea0b8246cb6a0d086d8817ac9ac048:a064940e48743649c6fd611165465c35988d7b60 - Build
zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:f8a46f395ffcd3089a1e8f725f80a502bf9374c6#b5d7518b39f69721f7764f70ab8a283c - Cache
Build requirements
msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#c99a611f14016fba4a51b85204f62fa3 - Cache
nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568:723257509aee8a72faf021920c2874abc738e029#d8ed631ad7024475859e1b94de1f123c - Cache
Skipped binaries
strawberryperl/5.32.1.1
======== Installing packages ========
msys2/cci.latest: Already installed! (1 of 4)
zlib/1.3.1: Already installed! (2 of 4)
nasm/2.15.05: Already installed! (3 of 4)
-------- Installing package openssl/3.2.1 (4 of 4) --------
openssl/3.2.1: Building from source
openssl/3.2.1: Package openssl/3.2.1:a064940e48743649c6fd611165465c35988d7b60
openssl/3.2.1: Copying sources to build folder
openssl/3.2.1: Building your package in C:\Users\ccfuncy\.conan2\p\b\opens128229b23c3c0\b
openssl/3.2.1: Calling generate()
openssl/3.2.1: Generators folder: C:\Users\ccfuncy\.conan2\p\b\opens128229b23c3c0\b\build-release\conan
openssl/3.2.1: using target: mingw-conan-Release-Windows-x86_64-gcc-13.1 -> mingw64
openssl/3.2.1: my %targets = (
"mingw-conan-Release-Windows-x86_64-gcc-13.1" => {
inherit_from => [ "mingw64" ],
cflags => add("-m64 -O3"),
cxxflags => add("-m64 -O3"),
defines => add("NDEBUG"),
lflags => add("-m64"),
},
);
openssl/3.2.1: Generating aggregated env files
openssl/3.2.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.bat']
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 "mingw-conan-Release-Windows-x86_64-gcc-13.1" no-shared --prefix=/ --libdir=lib --openssldir="/c/users/ccfuncy/.conan2/p/b/opens128229b23c3c0/p/res" no-unit-test threads PERL=perl no-tests --release enable-fips no-md2 zlib --with-zlib-include="/c/users/ccfuncy/.conan2/p/b/zlib9cd65f20211c6/p/include" --with-zlib-lib="/c/users/ccfuncy/.conan2/p/b/zlib9cd65f20211c6/p/lib"
mkdir: cannot create directory '/dev/shm': Read-only file system
Creating /dev/shm directory failed.
POSIX semaphores and POSIX shared memory will not work
mkdir: cannot create directory '/dev/mqueue': Read-only file system
Creating /dev/mqueue directory failed.
POSIX message queues will not work
Configuring OpenSSL version 3.2.1 for target mingw-conan-Release-Windows-x86_64-gcc-13.1
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
mkdir: cannot create directory '/dev/shm': Read-only file system
Creating /dev/shm directory failed.
POSIX semaphores and POSIX shared memory will not work
mkdir: cannot create directory '/dev/mqueue': Read-only file system
Creating /dev/mqueue directory failed.
POSIX message queues will not work
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
...
gcc -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include -DAES_ASM -DBSAES_ASM -DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DPADLOCK_ASM -DPOLY1305_ASM -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -m64 -m64 -O3 -m64 -O3 -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/c/users/ccfuncy/.conan2/p/b/opens128229b23c3c0/p/res\"" -DENGINESDIR="\"//lib/engines-3\"" -DMODULESDIR="\"//lib/ossl-modules\"" -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -D_MT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -DNDEBUG -I/c/users/ccfuncy/.conan2/p/b/zlib9cd65f20211c6/p/include -DNDEBUG -MMD -MF crypto/bio/libcrypto-lib-bss_fd.d.tmp -MT crypto/bio/libcrypto-lib-bss_fd.obj -c -o crypto/bio/libcrypto-lib-bss_fd.obj crypto/bio/bss_fd.c
crypto/bio/bss_dgram.c: In function 'pack_local':
crypto/bio/bss_dgram.c:1178:13: error: 'struct in_pktinfo' has no member named 'ipi_spec_dst'
1178 | info->ipi_spec_dst = local->s_in.sin_addr;
| ^~
make[1]: *** [Makefile:6024: crypto/bio/libcrypto-lib-bss_dgram.obj] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/c/Users/ccfuncy/.conan2/p/b/opens128229b23c3c0/b/src'
make: *** [Makefile:2517:build_sw] 错误 2
openssl/3.2.1: ERROR:
Package 'a064940e48743649c6fd611165465c35988d7b60' build failed
openssl/3.2.1: WARN: Build folder C:\Users\ccfuncy\.conan2\p\b\opens128229b23c3c0\b\build-release
ERROR: openssl/3.2.1: Error in build() method, line 533
self._make()
while calling '_make', line 525
self._run_make()
while calling '_run_make', line 502
self.run(" ".join(command), env="conanbuild")
ConanException: Error 2 while executing