Open fjp opened 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.
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 :)
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
@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.
Environment details
Steps to reproduce
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: 'cmakeconan 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 clangWhy 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