conan-io / conan-center-index

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

[bug] gRPC compiler_executables wrong compiler for googleapis #15474

Open fjp opened 1 year ago

fjp commented 1 year ago

Environment details

Steps to reproduce

  1. Use the following profile for host and build context:
 [settings]
 os=Linux
 arch=x86_64
 compiler=clang
 compiler.version=13
 compiler.libcxx=libstdc++11
 build_type=Release

 [buildenv]
 CFLAGS=-DNDEBUG -O3 -ffast-math
 CXXFLAGS=-DNDEBUG -O3 -ffast-math

 [conf]
 tools.build:compiler_executables={"c": "clang-13", "cpp": "clang++-13"}
 tools.env.virtualenv:auto_use=True
  1. conan install grpc/1.50.1@ -pr:h linux-clang13-x86_64-release -pr:b linux-clang13-x86_64-release -b missing at first seems to use the correct compiler from the profile (clang) but for googleapis cmake starts to use the wrong compiler (gcc)
command output ``` conan install grpc/1.50.1@ -pr:h linux-clang13-x86_64-release -pr:b linux-clang13-x86_64-release -b missing Configuration (profile_host): [settings] arch=x86_64 build_type=Release compiler=clang compiler.libcxx=libstdc++11 compiler.version=13 os=Linux [options] [build_requires] [env] [conf] tools.build:compiler_executables={'c': 'clang-13', 'cpp': 'clang++-13'} tools.env.virtualenv:auto_use=True [buildenv] CFLAGS=-DNDEBUG -O3 -ffast-math CXXFLAGS=-DNDEBUG -O3 -ffast-math Configuration (profile_build): [settings] arch=x86_64 build_type=Release compiler=clang compiler.libcxx=libstdc++11 compiler.version=13 os=Linux [options] [build_requires] [env] [conf] tools.build:compiler_executables={'c': 'clang-13', 'cpp': 'clang++-13'} tools.env.virtualenv:auto_use=True [buildenv] CFLAGS=-DNDEBUG -O3 -ffast-math CXXFLAGS=-DNDEBUG -O3 -ffast-math grpc/1.50.1: Not found in local cache, looking in remotes... grpc/1.50.1: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.45k] Downloading conanfile.py completed [19.24k] Downloading conan_export.tgz completed [0.33k] Decompressing conan_export.tgz completed [0.00k] grpc/1.50.1: Downloaded recipe revision e3a398854c3b549b56f7f0997e9d6297 abseil/20220623.0: Not found in local cache, looking in remotes... abseil/20220623.0: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.43k] Downloading conanfile.py completed [11.91k] Downloading conan_export.tgz completed [0.38k] Decompressing conan_export.tgz completed [0.00k] abseil/20220623.0: Downloaded recipe revision 921e1244168e6ecefe7e5ea4c4756489 c-ares/1.18.1: Not found in local cache, looking in remotes... c-ares/1.18.1: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.10k] Downloading conanfile.py completed [4.31k] Downloading conan_export.tgz completed [0.25k] Decompressing conan_export.tgz completed [0.00k] c-ares/1.18.1: Downloaded recipe revision c88bae59343c20f4baaff0301f9205f2 openssl/1.1.1s: Not found in local cache, looking in remotes... openssl/1.1.1s: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.18k] Downloading conanfile.py completed [41.49k] Downloading conan_export.tgz completed [0.33k] Decompressing conan_export.tgz completed [0.00k] openssl/1.1.1s: Downloaded recipe revision 478155e5386d6c71d7807d97a7446190 re2/20220601: Not found in local cache, looking in remotes... re2/20220601: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.10k] Downloading conanfile.py completed [2.32k] Downloading conan_export.tgz completed [0.25k] Decompressing conan_export.tgz completed [0.00k] re2/20220601: Downloaded recipe revision c0520fb891809d7991c95ff01d037712 zlib/1.2.13: Not found in local cache, looking in remotes... zlib/1.2.13: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.28k] Downloading conanfile.py completed [4.04k] Downloading conan_export.tgz completed [0.29k] Decompressing conan_export.tgz completed [0.00k] zlib/1.2.13: Downloaded recipe revision 13c96f538b52e1600c40b88994de240f protobuf/3.21.4: Not found in local cache, looking in remotes... protobuf/3.21.4: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.10k] Downloading conanfile.py completed [12.58k] Downloading conan_export.tgz completed [0.25k] Decompressing conan_export.tgz completed [0.00k] protobuf/3.21.4: Downloaded recipe revision 869978781fd6d02ba782c925f2f454e9 googleapis/cci.20220711: Not found in local cache, looking in remotes... googleapis/cci.20220711: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.31k] Downloading conanfile.py completed [9.82k] Downloading conan_export.tgz completed [2.12k] Decompressing conan_export.tgz completed [0.00k] googleapis/cci.20220711: Downloaded recipe revision b0e9c9550a5aa0657666104aeb7f752e grpc-proto/cci.20220627: Not found in local cache, looking in remotes... grpc-proto/cci.20220627: Trying with 'conan-center'... Downloading conanmanifest.txt completed [0.21k] Downloading conanfile.py completed [4.90k] Downloading conan_export.tgz completed [1.79k] Decompressing conan_export.tgz completed [0.00k] grpc-proto/cci.20220627: Downloaded recipe revision 2fa9c659c7288ca2b4ad16c097679cda Installing package: grpc/1.50.1 Requirements abseil/20220623.0 from 'conan-center' - Downloaded c-ares/1.18.1 from 'conan-center' - Downloaded googleapis/cci.20220711 from 'conan-center' - Downloaded grpc/1.50.1 from 'conan-center' - Downloaded grpc-proto/cci.20220627 from 'conan-center' - Downloaded openssl/1.1.1s from 'conan-center' - Downloaded protobuf/3.21.4 from 'conan-center' - Downloaded re2/20220601 from 'conan-center' - Downloaded zlib/1.2.13 from 'conan-center' - Downloaded Packages abseil/20220623.0:371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95 - Build c-ares/1.18.1:498c9a335184899d46bc81de60b12db38b910e7d - Download googleapis/cci.20220711:3cef7a96c356ec91c8d3c81ee17878f36c160ae0 - Build grpc/1.50.1:be977d2d5fbf42c3c2d6b9a3a34bea8f2914571f - Build grpc-proto/cci.20220627:aea04cb58646ec379e59f33da28e54ad45725d96 - Build openssl/1.1.1s:63c2a85d57849e261f98f935b93ecac31ba71b84 - Download protobuf/3.21.4:2eec4603473925dc232a8f94ae28ad65aa40d2b6 - Build re2/20220601:371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95 - Build zlib/1.2.13:63c2a85d57849e261f98f935b93ecac31ba71b84 - Download Build requirements protobuf/3.21.4 from 'conan-center' - Cache zlib/1.2.13 from 'conan-center' - Cache Build requirements packages protobuf/3.21.4:2eec4603473925dc232a8f94ae28ad65aa40d2b6 - Build zlib/1.2.13:63c2a85d57849e261f98f935b93ecac31ba71b84 - Download Installing (downloading, building) binaries... c-ares/1.18.1: Retrieving package 498c9a335184899d46bc81de60b12db38b910e7d from remote 'conan-center' Downloading conanmanifest.txt completed [0.61k] Downloading conaninfo.txt completed [0.42k] Downloading conan_package.tgz completed [194.87k] Decompressing conan_package.tgz completed [0.00k] c-ares/1.18.1: Package installed 498c9a335184899d46bc81de60b12db38b910e7d c-ares/1.18.1: Downloaded package revision b98d77e63289e0192086704d1067f786 openssl/1.1.1s: Retrieving package 63c2a85d57849e261f98f935b93ecac31ba71b84 from remote 'conan-center' Downloading conanmanifest.txt completed [6.30k] Downloading conaninfo.txt completed [2.35k] Downloading conan_package.tgz completed [3811.80k] Decompressing conan_package.tgz completed [0.00k] openssl/1.1.1s: Package installed 63c2a85d57849e261f98f935b93ecac31ba71b84 openssl/1.1.1s: Downloaded package revision 886755512d64adee9d1a79a9af42881e zlib/1.2.13: Retrieving package 63c2a85d57849e261f98f935b93ecac31ba71b84 from remote 'conan-center' Downloading conanmanifest.txt completed [0.25k] Downloading conaninfo.txt completed [0.39k] Downloading conan_package.tgz completed [88.07k] Decompressing conan_package.tgz completed [0.00k] zlib/1.2.13: Package installed 63c2a85d57849e261f98f935b93ecac31ba71b84 zlib/1.2.13: Downloaded package revision e4988626234b8cdffead3a27f0064aed Downloading conan_sources.tgz completed [1.00k] Decompressing conan_sources.tgz completed [0.00k] abseil/20220623.0: Configuring sources in /home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/source/src Downloading 20220623.0.tar.gz completed [1911.59k] abseil/20220623.0: .0: abseil/20220623.0: abseil/20220623.0: Copying sources to build folder abseil/20220623.0: Building your package in /home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95 abseil/20220623.0: Generator txt created conanbuildinfo.txt abseil/20220623.0: Calling generate() abseil/20220623.0: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release' abseil/20220623.0: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0067=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release' abseil/20220623.0: Aggregating env generators abseil/20220623.0: Calling build() abseil/20220623.0: Apply patch (portability): Workaround bug in GCC 7.2 abseil/20220623.0: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/package/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95" -DCMAKE_POLICY_DEFAULT_CMP0067="NEW" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/src" ----Running------ > . "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conanbuild.sh" && cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/package/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95" -DCMAKE_POLICY_DEFAULT_CMP0067="NEW" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/src" ----------------- -- Using Conan toolchain: /home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conan_toolchain.cmake -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The CXX compiler identification is Clang 13.0.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/clang++-13 - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Performing Test USE_STD_STRING_VIEW -- Performing Test USE_STD_STRING_VIEW - Failed -- Performing Test USE_STD_ANY -- Performing Test USE_STD_ANY - Failed -- Performing Test USE_STD_OPTIONAL -- Performing Test USE_STD_OPTIONAL - Failed -- Performing Test USE_STD_VARIANT -- Performing Test USE_STD_VARIANT - Failed -- Configuring done -- Generating done -- Build files have been written to: /home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release abseil/20220623.0: CMake command: cmake --build "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release" '--' '-j48' ----Running------ > . "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release/generators/conanbuild.sh" && cmake --build "/home/fjp/tmp/grpc/.conan/data/abseil/20220623.0/_/_/build/371d127cbedfb0ded5d4ca0dc426b59ccfaa9c95/build/Release" '--' '-j48' ----------------- ... protobuf/3.21.4 package(): Packaged 2 files: LICENSE, protoc protobuf/3.21.4 package(): Packaged 116 '.h' files protobuf/3.21.4 package(): Packaged 12 '.proto' files protobuf/3.21.4 package(): Packaged 2 '.inc' files: port_def.inc, port_undef.inc protobuf/3.21.4 package(): Packaged 1 '.0' file: protoc-3.21.4.0 protobuf/3.21.4 package(): Packaged 2 '.a' files: libprotoc.a, libprotobuf.a protobuf/3.21.4 package(): Packaged 3 '.cmake' files: protobuf-module.cmake, protobuf-generate.cmake, protobuf-options.cmake protobuf/3.21.4: Package '2eec4603473925dc232a8f94ae28ad65aa40d2b6' created protobuf/3.21.4: Created package revision ab4c1e45ed36ecc9faf873214558ac0e protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin googleapis/cci.20220711: Applying build-requirement: protobuf/3.21.4 googleapis/cci.20220711: Applying build-requirement: zlib/1.2.13 Downloading conan_sources.tgz completed [0.62k] Decompressing conan_sources.tgz completed [0.00k] googleapis/cci.20220711: Configuring sources in /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/source Downloading 220b13e335ea8e0153c84c56a135a19d15384621.zip completed [12143.72k] googleapis/cci.20220711: i.20220711: googleapis/cci.20220711: googleapis/cci.20220711: googleapis/cci.20220711: Unzipping 43.6MB, this can take a while Unzipping 100 % googleapis/cci.20220711: googleapis/cci.20220711: Copying sources to build folder googleapis/cci.20220711: Building your package in /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0 googleapis/cci.20220711: Generator cmake created conanbuildinfo.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created protobuf-config-version.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created protobufTarget-release.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created protobufTargets.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created protobuf-config.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBConfigVersion.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBConfig.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBTargets.cmake googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBTarget-release.cmake googleapis/cci.20220711: Aggregating env generators googleapis/cci.20220711: Calling build() ----Running------ > . "/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0/conanbuild.sh" && cd '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/package/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_PREFIX_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_MODULE_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' ----------------- -- The C compiler identification is GNU 11.3.0 -- The CXX compiler identification is GNU 11.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: called by CMake conan helper -- Conan: called inside local cache -- Conan: Adjusting output directories -- Conan: Using cmake targets configuration -- Library protoc found /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/lib/libprotoc.a -- Library protobuf found /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/lib/libprotobuf.a -- Library z found /home/fjp/tmp/grpc/.conan/data/zlib/1.2.13/_/_/package/63c2a85d57849e261f98f935b93ecac31ba71b84/lib/libz.a -- Conan: Adjusting default RPATHs Conan policies -- Conan: Adjusting language standard -- Conan: Adjusting fPIC flag (ON) CMake Error at conanbuildinfo.cmake:803 (message): Incorrect 'clang', is not the one detected by CMake: 'GNU' Call Stack (most recent call first): conanbuildinfo.cmake:360 (conan_check_compiler) CMakeLists.txt:7 (conan_basic_setup) -- Configuring incomplete, errors occurred! See also "/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0/CMakeFiles/CMakeOutput.log". googleapis/cci.20220711: googleapis/cci.20220711: ERROR: Package '3cef7a96c356ec91c8d3c81ee17878f36c160ae0' build failed googleapis/cci.20220711: WARN: Build folder /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0 ERROR: googleapis/cci.20220711: Error in build() method, line 172 cmake = self._configure_cmake() while calling '_configure_cmake', line 95 cmake.configure() ConanException: Error 1 while executing cd '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/package/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_PREFIX_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_MODULE_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' ```
  1. conan install googleapis/cci.20220711@ -pr:h linux-clang13-x86_64-release -pr:b linux-clang13-x86_64-release -b missing immediately picks up the wrong compiler instead of clang
conan install googleapis/cci.20220711@ -pr:h linux-clang13-x86_64-release -pr:b linux-clang13-x86_64-release -b missing
Configuration (profile_host):
[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[options]
[build_requires]
[env]
[conf]
tools.build:compiler_executables={'c': 'clang-13', 'cpp': 'clang++-13'}
tools.env.virtualenv:auto_use=True
[buildenv]
CFLAGS=-DNDEBUG -O3 -ffast-math
CXXFLAGS=-DNDEBUG -O3 -ffast-math

Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[options]
[build_requires]
[env]
[conf]
tools.build:compiler_executables={'c': 'clang-13', 'cpp': 'clang++-13'}
tools.env.virtualenv:auto_use=True
[buildenv]
CFLAGS=-DNDEBUG -O3 -ffast-math
CXXFLAGS=-DNDEBUG -O3 -ffast-math

googleapis/cci.20220711: WARN: Package binary is corrupted, removing: 3cef7a96c356ec91c8d3c81ee17878f36c160ae0
Installing package: googleapis/cci.20220711
Requirements
    googleapis/cci.20220711 from 'conan-center' - Cache
    protobuf/3.21.4 from 'conan-center' - Cache
    zlib/1.2.13 from 'conan-center' - Cache
Packages
    googleapis/cci.20220711:3cef7a96c356ec91c8d3c81ee17878f36c160ae0 - Build
    protobuf/3.21.4:2eec4603473925dc232a8f94ae28ad65aa40d2b6 - Cache
    zlib/1.2.13:63c2a85d57849e261f98f935b93ecac31ba71b84 - Cache
Build requirements
    protobuf/3.21.4 from 'conan-center' - Cache
    zlib/1.2.13 from 'conan-center' - Cache
Build requirements packages
    protobuf/3.21.4:2eec4603473925dc232a8f94ae28ad65aa40d2b6 - Cache
    zlib/1.2.13:63c2a85d57849e261f98f935b93ecac31ba71b84 - Cache

Installing (downloading, building) binaries...
zlib/1.2.13: Already installed!
protobuf/3.21.4: Already installed!
protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin
protobuf/3.21.4: Appending PATH environment variable: /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/bin
googleapis/cci.20220711: Applying build-requirement: protobuf/3.21.4
googleapis/cci.20220711: Applying build-requirement: zlib/1.2.13
googleapis/cci.20220711: WARN: Build folder is dirty, removing it: /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0
googleapis/cci.20220711: Copying sources to build folder
googleapis/cci.20220711: Building your package in /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0
googleapis/cci.20220711: Generator cmake created conanbuildinfo.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created protobuf-config-version.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created protobufTarget-release.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created protobufTargets.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created protobuf-config.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBConfigVersion.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBConfig.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBTargets.cmake
googleapis/cci.20220711: Generator cmake_find_package_multi created ZLIBTarget-release.cmake
googleapis/cci.20220711: Aggregating env generators
googleapis/cci.20220711: Calling build()

----Running------
> . "/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0/conanbuild.sh" && cd '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/package/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_PREFIX_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_MODULE_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0'
-----------------
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake targets configuration
-- Library protoc found /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/lib/libprotoc.a
-- Library protobuf found /home/fjp/tmp/grpc/.conan/data/protobuf/3.21.4/_/_/package/2eec4603473925dc232a8f94ae28ad65aa40d2b6/lib/libprotobuf.a
-- Library z found /home/fjp/tmp/grpc/.conan/data/zlib/1.2.13/_/_/package/63c2a85d57849e261f98f935b93ecac31ba71b84/lib/libz.a
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Adjusting fPIC flag (ON)
CMake Error at conanbuildinfo.cmake:803 (message):
  Incorrect 'clang', is not the one detected by CMake: 'GNU'
Call Stack (most recent call first):
  conanbuildinfo.cmake:360 (conan_check_compiler)
  CMakeLists.txt:7 (conan_basic_setup)

-- Configuring incomplete, errors occurred!
See also "/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0/CMakeFiles/CMakeOutput.log".
googleapis/cci.20220711:
googleapis/cci.20220711: ERROR: Package '3cef7a96c356ec91c8d3c81ee17878f36c160ae0' build failed
googleapis/cci.20220711: WARN: Build folder /home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0
ERROR: googleapis/cci.20220711: Error in build() method, line 172
        cmake = self._configure_cmake()
while calling '_configure_cmake', line 95
        cmake.configure()
        ConanException: Error 1 while executing cd '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/package/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_PREFIX_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_MODULE_PATH="/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/fjp/tmp/grpc/.conan/data/googleapis/cci.20220711/_/_/build/3cef7a96c356ec91c8d3c81ee17878f36c160ae0'

Why is GNU gcc suddendly used for installing googleapis? Is this an issue with the new compiler_executables feature or an issue in the googleapis/cci.20220711 recipe?

Logs

No response

memsharded commented 1 year ago

Hi @fjp

The grpc recipe in ConanCenter still uses the legacy integration: from conans import CMake. This integration is not expected to follow the new compiler_executables conf, only the new from conan.tools.cmake import CMake will do (and @jcar87 is working on updating the ConanCenter recipe).

So this doesn't sound a Conan issue, but a conan-center-index one, moving it there.

jcar87 commented 1 year ago

Hi @fjp - thanks for reporting this!

Any chance you can test the same pattern with the recipes as they are in these PRs, where they are being updated to the newer CMake integrations.

As @memsharded mentions, the new integrations should honour the new setting :)

fjp commented 1 year ago

Thank you both for the hints.

@jcar87 When I checkout PR-15450 and execute conan install conan-center-index/recipes/googleapis/all/conanfile.py cci.20220711@_/_ -pr:h linux-clang13-x86_64-release -pr:b linux-clang13-x86_64-release -b missing, the packages protobuf and zlib are packaged into my conan cache, but I don't see google-apis after running the install command:

$ conan search
Existing package recipes:

protobuf/3.21.4
zlib/1.2.13

Shouldn't this -b missing command also package google-apis into my conan cache? Or do I need to use conan create explicitly? With conan create it builds fine and I see it in my conan cache, but I was under the impression that -b missing should build and package all missing packages.

I am also wondering because conan install googleapis/cci.20220711@ -pr:h linux-gcc11-x86_64-release -pr:b linux-gcc11-x86_64-release -b missing with the recipe reference (googleapis/cci.20220711@) form conan center index (and another profile that doesn't use the new compiler_executables) leads to google-apis being built and packaged as expected:

$ conan search
Existing package recipes:

googleapis/cci.20220711
protobuf/3.21.4
zlib/1.2.13
fjp commented 1 year ago

@jcar87 I got quite far, but the grpc build fails with an error close to the end:

[ 99%] Building CXX object CMakeFiles/grpc++.dir/src/cpp/util/time_cc.cc.o
[100%] Linking CXX static library libgrpc++.a
[100%] Built target grpc++
[100%] Running gRPC C++ protocol buffer compiler for grpc/channelz/v1/channelz.proto
[100%] Running gRPC C++ protocol buffer compiler for grpc/reflection/v1alpha/reflection.proto
Missing value for flag: -I
Missing value for flag: -I
gmake[2]: *** [CMakeFiles/grpcpp_channelz.dir/build.make:75: gens/grpc/channelz/v1/channelz.grpc.pb.cc] Error 1
gmake[2]: *** [CMakeFiles/grpc++_reflection.dir/build.make:75: gens/grpc/reflection/v1alpha/reflection.grpc.pb.cc] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:523: CMakeFiles/grpcpp_channelz.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:437: CMakeFiles/grpc++_reflection.dir/all] Error 2
[100%] Building CXX object CMakeFiles/grpc++_alts.dir/src/cpp/common/alts_context.cc.o
[100%] Building CXX object CMakeFiles/grpc++_alts.dir/src/cpp/common/alts_util.cc.o
[100%] Building CXX object CMakeFiles/grpc++_error_details.dir/src/cpp/util/error_details.cc.o
[100%] Linking CXX static library libgrpc++_error_details.a
[100%] Built target grpc++_error_details
[100%] Linking CXX static library libgrpc++_alts.a
[100%] Built target grpc++_alts
gmake: *** [Makefile:136: all] Error 2
grpc/1.48.0: 
grpc/1.48.0: ERROR: Package 'd2f19f2e7a0846e6e8c8164ba650fc95189eff89' build failed
grpc/1.48.0: WARN: Build folder /workspaces/grpc/.conan/data/grpc/1.48.0/_/_/build/d2f19f2e7a0846e6e8c8164ba650fc95189eff89/build/Release
ERROR: grpc/1.48.0: Error in build() method, line 209
        cmake.build()
        ConanException: Error 2 while executing cmake --build "/workspaces/grpc/.conan/data/grpc/1.48.0/_/_/build/d2f19f2e7a0846e6e8c8164ba650fc95189eff89/build/Release" '--' '-j48'

Any ideas why this might happen?

Edit: The error above happens for all versions of grpc ("1.50.1", "1.50.0", "1.48.0", "1.47.1", "1.46.3"). For 1.45.2 the build works by setting CC and CXX to clang.