conan-io / conan-center-index

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

[package] botan/2.19.3 Unknown -fPIC flag #15133

Closed knzivid closed 7 months ago

knzivid commented 1 year ago

Description

Build botan with MSVC. I am using Visual Studio 2017 x64 toolchain. The build log warns about an unknown -fPIC.

cl   /EHs /GR /D_WIN32_WINNT=0x0600 /MD /bigobj   /O2 /Oi -fPIC -DBOTAN_IS_BEING_BUILT /W4 /wd4250 /wd4251 /wd4275 /wd4127  /Ibuild\include /Ibuild\include\external /nologo /c botan_all.cpp /Fobuild\obj\lib\botan_all.obj
cl : Command line warning D9002 : ignoring unknown option '-fPIC'

Package and Environment Details

Conan profile

[settings] arch=x86_64 arch_build=x86_64 build_type=MinSizeRel compiler=Visual Studio compiler.runtime=MD compiler.toolset=v141 compiler.version=15 os=Windows os_build=Windows [options] [build_requires] [env]

Steps to reproduce

Just conan install on a conanfile.py containing botan

Logs

Click to expand log ``` botan/2.19.3: Copying sources to build folder botan/2.19.3: Building your package in C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\build\e7993c7f0c660b49f544baf0c45805ef3bdd797d botan/2.19.3: Generator txt created conanbuildinfo.txt botan/2.19.3: Aggregating env generators botan/2.19.3: Calling build() INFO: ./configure.py invoked with options "--build-targets=static --distribution-info=Conan --without-documentation --cc-abi-flags= --extra-cxxflags=-fPIC --cc=msvc --cpu=x86_64 --prefix=C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\package\e7993c7f0c660b49f544baf0c45805ef3bdd797d --os=windows --amalgamation --msvc-runtime=MD --without-pkg-config" INFO: Configuring to build Botan 2.19.3 (revision unknown) INFO: Running under 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] INFO: Autodetected platform information: OS="Windows" machine="AMD64" proc="Intel64 Family 6 Model 158 Stepping 13, GenuineIntel" INFO: Auto-detected compiler version 19.16 INFO: Auto-detected compiler arch x86_64 INFO: Target is msvc:19.16-windows-x86_64 INFO: Assuming target x86_64 is little endian INFO: Skipping (dependency failure): asio certstor_sqlite3 sessions_sqlite3 INFO: Skipping (incompatible CPU): aes_armv8 aes_power8 sha1_armv8 sha2_32_armv8 sm4_armv8 INFO: Skipping (incompatible OS): certstor_system_macos commoncrypto dev_random fd_unix getentropy proc_walk INFO: Skipping (incompatible compiler): argon2_ssse3 serpent_avx2 sha2_32_bmi2 sha2_64_bmi2 sha3_bmi2 INFO: Skipping (no enabled compression schemes): compression INFO: Skipping (requires external dependency): boost bzip2 lzma sqlite3 tpm zlib INFO: Loading modules: adler32 aead aes aes_ni aes_vperm aont argon2 aria asn1 auto_rng base base32 base58 base64 bcrypt bcrypt_pbkdf bigint blake2 block blowfish camellia cascade cast128 cast256 cbc cbc_mac ccm cecpq1 certstor_flatfile certstor_sql certstor_system certstor_system_windows cfb chacha chacha20poly1305 chacha_avx2 chacha_rng chacha_simd32 checksum cmac comb4p cpuid crc24 crc32 cryptobox ctr curve25519 des dh dl_algo dl_group dlies dsa dyn_load eax ec_group ecc_key ecdh ecdsa ecgdsa ecies eckcdsa ed25519 elgamal eme_oaep eme_pkcs1 eme_raw emsa1 emsa_pkcs1 emsa_pssr emsa_raw emsa_x931 entropy ffi filters fpe_fe1 gcm ghash ghash_cpu ghash_vperm gmac gost_28147 gost_3410 gost_3411 hash hash_id hex hkdf hmac hmac_drbg hotp http_util idea idea_sse2 iso9796 kasumi kdf kdf1 kdf1_iso18033 kdf2 keccak keypair lion locking_allocator mac mce mceies md4 md5 mdx_hash mem_pool mgf1 misty1 mode_pad modes mp newhope nist_keywrap noekeon noekeon_simd numbertheory ocb ofb par_hash passhash9 pbes2 pbkdf pbkdf1 pbkdf2 pem pgp_s2k pk_pad pkcs11 poly1305 poly_dbl prf_tls prf_x942 processor_rng psk_db pubkey rc4 rdrand_rng rdseed rfc3394 rfc6979 rmd160 rng roughtime rsa salsa20 scrypt seed serpent serpent_simd sessions_sql sha1 sha1_sse2 sha1_x86 sha2_32 sha2_32_x86 sha2_64 sha3 shacal2 shacal2_avx2 shacal2_simd shacal2_x86 shake shake_cipher simd simd_avx2 siphash siv skein sm2 sm3 sm4 socket sodium sp800_108 sp800_56a sp800_56c srp6 stateful_rng stream streebog system_rng thread_utils threefish_512 threefish_512_avx2 tiger tls tls_10 tls_cbc tss twofish utils uuid whirlpool win32_stats x509 x919_mac xmss xtea xts zfec zfec_sse2 zfec_vperm INFO: Using hardlink to link files into build dir (use --link-method to change) INFO: Writing amalgamation header to botan_all.h INFO: Writing amalgamation source to botan_all.cpp INFO: Botan 2.19.3 (revision unknown) (unreleased undated) build setup is complete Conan:vcvars already set Microsoft (R) Program Maintenance Utility Version 14.16.27048.0 Copyright (C) Microsoft Corporation. All rights reserved. cl /EHs /GR /D_WIN32_WINNT=0x0600 /MD /bigobj /O2 /Oi -fPIC -DBOTAN_IS_BEING_BUILT /W4 /wd4250 /wd4251 /wd4275 /wd4127 /Ibuild\include /Ibuild\include\external /nologo /c botan_all.cpp /Fobuild\obj\lib\botan_all.obj cl : Command line warning D9002 : ignoring unknown option '-fPIC' botan_all.cpp botan_all.cpp(100497): warning C4101: 'ex': unreferenced local variable lib /nologo /OUT:./botan.lib build\obj\lib\botan_all.obj botan/2.19.3: Package 'e7993c7f0c660b49f544baf0c45805ef3bdd797d' built botan/2.19.3: Build folder C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\build\e7993c7f0c660b49f544baf0c45805ef3bdd797d botan/2.19.3: Generated conaninfo.txt botan/2.19.3: Generated conanbuildinfo.txt botan/2.19.3: Generating the package botan/2.19.3: Package folder C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\package\e7993c7f0c660b49f544baf0c45805ef3bdd797d botan/2.19.3: Calling package() Conan:vcvars already set Microsoft (R) Program Maintenance Utility Version 14.16.27048.0 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Python\Python310\python.exe" "src/scripts/install.py" --prefix="C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\package\e7993c7f0c660b49f544baf0c45805ef3bdd797d" --build-dir="build" --bindir="C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\package\e7993c7f0c660b49f544baf0c45805ef3bdd797d\bin" --libdir="C:\Source\conan-pkgs\.conan\data\botan\2.19.3\_\_\package\e7993c7f0c660b49f544baf0c45805ef3bdd797d\lib" --docdir="docs" --includedir="include" INFO: Botan 2.19.3 installation complete botan/2.19.3 package(): Packaged 308 '.h' files botan/2.19.3 package(): Packaged 1 '.lib' file: botan.lib botan/2.19.3 package(): Packaged 1 '.txt' file: license.txt botan/2.19.3: Package 'e7993c7f0c660b49f544baf0c45805ef3bdd797d' created botan/2.19.3: Created package revision 5241133ec1aef36217537ff75224b4a6 ```
lieser commented 1 year ago

The fix see seems to be pretty small (https://github.com/lieser/conan-center-index/commit/3f2cea0882fb73b4d51f933c119792a9dfb6ae41), will probably be resolved as part of #17364.