conan-io / conan-center-index

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

protobuf: fix static build of protobuf-lite after v22 using utf8_range #26001

Closed kletoz closed 1 week ago

kletoz commented 1 week ago

Summary

Changes to recipe: protobuf/22 (and newer)

Motivation

Fix the build of static protobuf in LITE mode. Since the version 22 protobuf requires utf8_range for static builds. The PR https://github.com/conan-io/conan-center-index/pull/24154 exposed the utf8 lib for libprotobuf but not for libprotobuf-lite.

The error is like:

Undefined symbols for architecture arm64:
  "utf8_range::IsStructurallyValid(std::__1::basic_string_view<char, std::__1::char_traits<char>>)", referenced from:
      google::protobuf::internal::TcParser::FastUS1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o)

The issue was not caught in the test because the test is always linking against the libprotobuf. In this PR I'm also proposing a change in the test which would catch the problem.

Log before the fix:

conan create all/conanfile.py --version 4.25.3 --options "*/*:shared=False" --options "protobuf/*:lite=True" ``` conan create all/conanfile.py --version 4.25.3 --options "*/*:shared=False" --options "protobuf/*:lite=True" ======== Exporting recipe to the cache ======== protobuf/4.25.3: Exporting package recipe: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/conanfile.py protobuf/4.25.3: exports: File 'conandata.yml' found. Exporting it... protobuf/4.25.3: Calling export_sources() protobuf/4.25.3: Copied 1 '.py' file: conanfile.py protobuf/4.25.3: Copied 1 '.yml' file: conandata.yml protobuf/4.25.3: Copied 1 '.cmake' file: protobuf-conan-protoc-target.cmake protobuf/4.25.3: Exported to cache folder: /Users/kleto.zan/.conan2/p/protofabab82e7de5a/e protobuf/4.25.3: Exported: protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c (2024-11-21 19:55:00 UTC) ======== Input profiles ======== Profile host: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=15 os=Macos [options] */*:shared=False protobuf/*:lite=True Profile build: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=15 os=Macos ======== Computing dependency graph ======== Graph root cli Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache Resolved version ranges zlib/[>=1.2.11 <2]: zlib/1.3 ======== Computing necessary packages ======== protobuf/4.25.3: Forced build from source Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:39f48664f195e0847f59889d8a4cdfc6bca84bf1#306c4454ae23d31b423eab08f355dd4a - Cache protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d - Build zlib/1.3#06023034579559bb64357db3a53f88a4:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#5acd49402d3dbc830c8e20b104bf175a - Cache ======== Installing packages ======== abseil/20240116.2: Already installed! (1 of 3) zlib/1.3: Already installed! (2 of 3) protobuf/4.25.3: Calling source() in /Users/kleto.zan/.conan2/p/protofabab82e7de5a/s/src -------- Installing package protobuf/4.25.3 (3 of 3) -------- protobuf/4.25.3: Building from source protobuf/4.25.3: Package protobuf/4.25.3:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d protobuf/4.25.3: Copying sources to build folder protobuf/4.25.3: Building your package in /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b protobuf/4.25.3: Calling generate() protobuf/4.25.3: Generators folder: /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release/generators protobuf/4.25.3: CMakeToolchain generated: conan_toolchain.cmake protobuf/4.25.3: CMakeToolchain generated: CMakePresets.json protobuf/4.25.3: CMakeToolchain generated: ../../../src/CMakeUserPresets.json protobuf/4.25.3: CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(ZLIB) find_package(absl) target_link_libraries(... ZLIB::ZLIB abseil::abseil) protobuf/4.25.3: Generating aggregated env files protobuf/4.25.3: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] protobuf/4.25.3: Calling build() protobuf/4.25.3: Running CMake.configure() protobuf/4.25.3: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p" -DCMAKE_INSTALL_CMAKEDIR="lib/cmake/protobuf" -Dprotobuf_WITH_ZLIB="ON" -Dprotobuf_BUILD_TESTS="OFF" -Dprotobuf_BUILD_PROTOC_BINARIES="ON" -Dprotobuf_BUILD_LIBPROTOC="ON" -Dprotobuf_DISABLE_RTTI="OFF" -Dprotobuf_BUILD_LIBUPB="None" -Dprotobuf_ABSL_PROVIDER="package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/src" -- Using Conan toolchain: /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release/generators/conan_toolchain.cmake -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: C++ Standard 17 with extensions ON -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The C compiler identification is AppleClang 16.0.0.16000026 -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- -- 25.3.0 -- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT -- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Failed -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Conan: Target declared 'ZLIB::ZLIB' -- Performing Test protobuf_HAVE_BUILTIN_ATOMICS -- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success -- Conan: Component target declared 'absl::config' ... LINES REMOVED ... -- Conan: Target declared 'abseil::abseil' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/absei0882cd5e427ba/p/lib/cmake/conan_trick/cxx_std.cmake' CMake Deprecation Warning at third_party/utf8_range/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done (1.4s) -- Generating done (0.1s) CMake Warning: Manually-specified variables were not used by the project: protobuf_BUILD_LIBUPB -- Build files have been written to: /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release protobuf/4.25.3: Running CMake.build() protobuf/4.25.3: RUN: cmake --build "/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release" -- -j10 [ 0%] Building CXX object third_party/utf8_range/CMakeFiles/utf8_validity.dir/utf8_validity.cc.o ... LINES REMOVED ... [ 99%] Building CXX object CMakeFiles/protoc.dir/src/google/protobuf/compiler/main.cc.o [100%] Linking CXX executable protoc [100%] Built target protoc protobuf/4.25.3: Package 'de10d95a4f0d64825a6ec6937d00b3d3d99aba5d' built protobuf/4.25.3: Build folder /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release protobuf/4.25.3: Generating the package protobuf/4.25.3: Packaging in folder /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p protobuf/4.25.3: Calling package() protobuf/4.25.3: Running CMake.install() protobuf/4.25.3: RUN: cmake --install "/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/b/build/Release" --prefix "/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p" -- Install configuration: "Release" -- Installing: /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/utf8_range/utf8_range-targets.cmake ... LINES REMOVED ...-- Installing: /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/protobuf/protobuf-config-version.cmake protobuf/4.25.3: package(): Packaged 2 files: protoc, LICENSE protobuf/4.25.3: package(): Packaged 1 '.0' file: protoc-25.3.0 protobuf/4.25.3: package(): Packaged 220 '.h' files protobuf/4.25.3: package(): Packaged 14 '.proto' files protobuf/4.25.3: package(): Packaged 2 '.inc' files: port_undef.inc, port_def.inc protobuf/4.25.3: package(): Packaged 5 '.a' files protobuf/4.25.3: package(): Packaged 4 '.cmake' files: protobuf-module.cmake, protobuf-generate.cmake, protobuf-conan-protoc-target.cmake, protobuf-options.cmake protobuf/4.25.3: Created package revision 8dab69a7e4dc7f5b853718b6e03fb46a protobuf/4.25.3: Package 'de10d95a4f0d64825a6ec6937d00b3d3d99aba5d' created protobuf/4.25.3: Full package reference: protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d#8dab69a7e4dc7f5b853718b6e03fb46a protobuf/4.25.3: Package folder /Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X: WARN: deprecated: 'cpp_info.names' used in: protobuf/4.25.3, zlib/1.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.build_modules' used in: protobuf/4.25.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.filenames' used in: protobuf/4.25.3 WARN: deprecated: 'env_info' used in: protobuf/4.25.3 ======== Launching test_package ======== ======== Computing dependency graph ======== Graph root protobuf/4.25.3 (test package): /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/conanfile.py Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache ======== Computing necessary packages ======== Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:39f48664f195e0847f59889d8a4cdfc6bca84bf1#306c4454ae23d31b423eab08f355dd4a - Cache protobuf/4.25.3#caa6f3bfbf987d54707169facdd4684c:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d#8dab69a7e4dc7f5b853718b6e03fb46a - Cache zlib/1.3#06023034579559bb64357db3a53f88a4:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#5acd49402d3dbc830c8e20b104bf175a - Cache ======== Installing packages ======== abseil/20240116.2: Already installed! (1 of 3) zlib/1.3: Already installed! (2 of 3) protobuf/4.25.3: Already installed! (3 of 3) WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X: WARN: deprecated: 'cpp_info.names' used in: protobuf/4.25.3, zlib/1.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.build_modules' used in: protobuf/4.25.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.filenames' used in: protobuf/4.25.3 WARN: deprecated: 'env_info' used in: protobuf/4.25.3 ======== Testing the package ======== Removing previously existing 'test_package' build folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Test package build: build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Test package build folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Writing generators to /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators protobuf/4.25.3 (test package): Generator 'VirtualBuildEnv' calling 'generate()' protobuf/4.25.3 (test package): Generator 'CMakeDeps' calling 'generate()' protobuf/4.25.3 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(protobuf) target_link_libraries(... protobuf::protobuf) protobuf/4.25.3 (test package): Generator 'VirtualRunEnv' calling 'generate()' protobuf/4.25.3 (test package): Calling generate() protobuf/4.25.3 (test package): Generators folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators protobuf/4.25.3 (test package): CMakeToolchain generated: conan_toolchain.cmake protobuf/4.25.3 (test package): CMakeToolchain generated: CMakePresets.json protobuf/4.25.3 (test package): CMakeToolchain generated: ../../../CMakeUserPresets.json protobuf/4.25.3 (test package): Generating aggregated env files protobuf/4.25.3 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] ======== Testing the package: Building ======== protobuf/4.25.3 (test package): Calling build() protobuf/4.25.3 (test package): Running CMake.configure() protobuf/4.25.3 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package" -Dprotobuf_LITE="ON" -DCONAN_TEST_USE_CXXSTD_14="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package" -- Using Conan toolchain: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators/conan_toolchain.cmake -- Conan toolchain: C++ Standard 17 with extensions ON -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Component target declared 'utf8_range::utf8_range' -- Conan: Component target declared 'absl::die_if_null' ... LINES REMOVED ... -- Conan: Target declared 'abseil::abseil' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/absei0882cd5e427ba/p/lib/cmake/conan_trick/cxx_std.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/protobuf/protobuf-generate.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/protobuf/protobuf-module.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/protobuf/protobuf-options.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/proto4136bc2a12e62/p/lib/cmake/protobuf/protobuf-conan-protoc-target.cmake' -- Configuring done (0.5s) -- Generating done (0.0s) -- Build files have been written to: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Running CMake.build() protobuf/4.25.3 (test package): RUN: cmake --build "/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release" -- -j10 [ 25%] Running cpp protocol buffer compiler on addressbook-lite.proto, plugin-options: lite [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [ 75%] Building CXX object CMakeFiles/test_package.dir/addressbook-lite.pb.cc.o [100%] Linking CXX executable test_package Undefined symbols for architecture arm64: "utf8_range::IsStructurallyValid(std::__1::basic_string_view>)", referenced from: google::protobuf::internal::TcParser::FastUS1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUS1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUS2(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUS2(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUR1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUR1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) google::protobuf::internal::TcParser::FastUR1(google::protobuf::MessageLite*, char const*, google::protobuf::internal::ParseContext*, google::protobuf::internal::TcFieldData, google::protobuf::internal::TcParseTableBase const*, unsigned long long) in libprotobuf-lite.a[9](generated_message_tctable_lite.cc.o) ... ld: symbol(s) not found for architecture arm64 c++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [test_package] Error 1 make[1]: *** [CMakeFiles/test_package.dir/all] Error 2 make: *** [all] Error 2 ERROR: protobuf/4.25.3 (test package): Error in build() method, line 30 cmake.build() ConanException: Error 2 while executing ```

Log after the fix:

conan create all/conanfile.py --version 4.25.3 --options "*/*:shared=False" --options "protobuf/*:lite=True" ``` conan create all/conanfile.py --version 4.25.3 --options "*/*:shared=False" --options "protobuf/*:lite=True" ======== Exporting recipe to the cache ======== protobuf/4.25.3: Exporting package recipe: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/conanfile.py protobuf/4.25.3: exports: File 'conandata.yml' found. Exporting it... protobuf/4.25.3: Calling export_sources() protobuf/4.25.3: Copied 1 '.py' file: conanfile.py protobuf/4.25.3: Copied 1 '.yml' file: conandata.yml protobuf/4.25.3: Copied 1 '.cmake' file: protobuf-conan-protoc-target.cmake protobuf/4.25.3: Exported to cache folder: /Users/kleto.zan/.conan2/p/proto98a57bc173041/e protobuf/4.25.3: Exported: protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd (2024-11-21 19:59:32 UTC) ======== Input profiles ======== Profile host: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=15 os=Macos [options] */*:shared=False protobuf/*:lite=True Profile build: [settings] arch=armv8 build_type=Release compiler=apple-clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=15 os=Macos ======== Computing dependency graph ======== Graph root cli Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache Resolved version ranges zlib/[>=1.2.11 <2]: zlib/1.3 ======== Computing necessary packages ======== protobuf/4.25.3: Forced build from source Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:39f48664f195e0847f59889d8a4cdfc6bca84bf1#306c4454ae23d31b423eab08f355dd4a - Cache protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d - Build zlib/1.3#06023034579559bb64357db3a53f88a4:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#5acd49402d3dbc830c8e20b104bf175a - Cache ======== Installing packages ======== abseil/20240116.2: Already installed! (1 of 3) zlib/1.3: Already installed! (2 of 3) protobuf/4.25.3: Calling source() in /Users/kleto.zan/.conan2/p/proto98a57bc173041/s/src -------- Installing package protobuf/4.25.3 (3 of 3) -------- protobuf/4.25.3: Building from source protobuf/4.25.3: Package protobuf/4.25.3:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d protobuf/4.25.3: Copying sources to build folder protobuf/4.25.3: Building your package in /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b protobuf/4.25.3: Calling generate() protobuf/4.25.3: Generators folder: /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release/generators protobuf/4.25.3: CMakeToolchain generated: conan_toolchain.cmake protobuf/4.25.3: CMakeToolchain generated: CMakePresets.json protobuf/4.25.3: CMakeToolchain generated: ../../../src/CMakeUserPresets.json protobuf/4.25.3: CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(ZLIB) find_package(absl) target_link_libraries(... ZLIB::ZLIB abseil::abseil) protobuf/4.25.3: Generating aggregated env files protobuf/4.25.3: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] protobuf/4.25.3: Calling build() protobuf/4.25.3: Running CMake.configure() protobuf/4.25.3: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p" -DCMAKE_INSTALL_CMAKEDIR="lib/cmake/protobuf" -Dprotobuf_WITH_ZLIB="ON" -Dprotobuf_BUILD_TESTS="OFF" -Dprotobuf_BUILD_PROTOC_BINARIES="ON" -Dprotobuf_BUILD_LIBPROTOC="ON" -Dprotobuf_DISABLE_RTTI="OFF" -Dprotobuf_BUILD_LIBUPB="None" -Dprotobuf_ABSL_PROVIDER="package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/src" -- Using Conan toolchain: /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release/generators/conan_toolchain.cmake -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: C++ Standard 17 with extensions ON -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The C compiler identification is AppleClang 16.0.0.16000026 -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- -- 25.3.0 -- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT -- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Failed -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Conan: Target declared 'ZLIB::ZLIB' -- Performing Test protobuf_HAVE_BUILTIN_ATOMICS -- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success -- Conan: Component target declared 'absl::config' -- Conan: Component target declared 'absl::dynamic_annotations' -- Conan: Component target declared 'absl::core_headers' -- Conan: Component target declared 'absl::pretty_function' -- Conan: Component target declared 'absl::fast_type_id' -- Conan: Component target declared 'absl::prefetch' -- Conan: Component target declared 'absl::algorithm' -- Conan: Component target declared 'absl::hashtable_debug_hooks' -- Conan: Component target declared 'absl::node_slot_policy' -- Conan: Component target declared 'absl::non_temporal_arm_intrinsics' -- Conan: Component target declared 'absl::non_temporal_memcpy' -- Conan: Component target declared 'absl::leak_check' -- Conan: Component target declared 'absl::flags_commandlineflag_internal' -- Conan: Component target declared 'absl::log_internal_config' -- Conan: Component target declared 'absl::log_internal_nullguard' -- Conan: Component target declared 'absl::log_internal_voidify' -- Conan: Component target declared 'absl::type_traits' -- Conan: Component target declared 'absl::meta' -- Conan: Component target declared 'absl::bits' -- Conan: Component target declared 'absl::int128' -- Conan: Component target declared 'absl::numeric' -- Conan: Component target declared 'absl::numeric_representation' -- Conan: Component target declared 'absl::exponential_biased' -- Conan: Component target declared 'absl::periodic_sampler' -- Conan: Component target declared 'absl::random_seed_gen_exception' -- Conan: Component target declared 'absl::random_internal_traits' -- Conan: Component target declared 'absl::random_internal_fast_uniform_bits' -- Conan: Component target declared 'absl::random_internal_iostream_state_saver' -- Conan: Component target declared 'absl::random_internal_wide_multiply' -- Conan: Component target declared 'absl::random_internal_fastmath' -- Conan: Component target declared 'absl::random_internal_pcg_engine' -- Conan: Component target declared 'absl::random_internal_platform' -- Conan: Component target declared 'absl::random_internal_randen_slow' -- Conan: Component target declared 'absl::random_internal_randen_hwaes_impl' -- Conan: Component target declared 'absl::random_internal_uniform_helper' -- Conan: Component target declared 'absl::has_ostream_operator' -- Conan: Component target declared 'absl::cordz_update_tracker' -- Conan: Component target declared 'absl::civil_time' -- Conan: Component target declared 'absl::time_zone' -- Conan: Component target declared 'absl::compare' -- Conan: Component target declared 'absl::if_constexpr' -- Conan: Component target declared 'absl::atomic_hook' -- Conan: Component target declared 'absl::errno_saver' -- Conan: Component target declared 'absl::log_severity' -- Conan: Component target declared 'absl::no_destructor' -- Conan: Component target declared 'absl::nullability' -- Conan: Component target declared 'absl::raw_logging_internal' -- Conan: Component target declared 'absl::base_internal' -- Conan: Component target declared 'absl::throw_delegate' -- Conan: Component target declared 'absl::scoped_set_env' -- Conan: Component target declared 'absl::strerror' -- Conan: Component target declared 'absl::algorithm_container' -- Conan: Component target declared 'absl::common_policy_traits' -- Conan: Component target declared 'absl::hashtable_debug' -- Conan: Component target declared 'absl::container_common' -- Conan: Component target declared 'absl::debugging_internal' -- Conan: Component target declared 'absl::overload' -- Conan: Component target declared 'absl::memory' -- Conan: Component target declared 'absl::random_internal_generate_real' -- Conan: Component target declared 'absl::random_internal_randen_hwaes' -- Conan: Component target declared 'absl::cordz_functions' -- Conan: Component target declared 'absl::bad_any_cast_impl' -- Conan: Component target declared 'absl::span' -- Conan: Component target declared 'absl::bad_optional_access' -- Conan: Component target declared 'absl::bad_variant_access' -- Conan: Component target declared 'absl::utility' -- Conan: Component target declared 'absl::spinlock_wait' -- Conan: Component target declared 'absl::base' -- Conan: Component target declared 'absl::endian' -- Conan: Component target declared 'absl::cleanup_internal' -- Conan: Component target declared 'absl::cleanup' -- Conan: Component target declared 'absl::compressed_tuple' -- Conan: Component target declared 'absl::fixed_array' -- Conan: Component target declared 'absl::inlined_vector_internal' -- Conan: Component target declared 'absl::inlined_vector' -- Conan: Component target declared 'absl::container_memory' -- Conan: Component target declared 'absl::hash_policy_traits' -- Conan: Component target declared 'absl::crc_cpu_detect' -- Conan: Component target declared 'absl::crc_internal' -- Conan: Component target declared 'absl::stacktrace' -- Conan: Component target declared 'absl::demangle_internal' -- Conan: Component target declared 'absl::debugging' -- Conan: Component target declared 'absl::any_invocable' -- Conan: Component target declared 'absl::bind_front' -- Conan: Component target declared 'absl::function_ref' -- Conan: Component target declared 'absl::city' -- Conan: Component target declared 'absl::low_level_hash' -- Conan: Component target declared 'absl::log_internal_conditions' -- Conan: Component target declared 'absl::random_internal_distribution_caller' -- Conan: Component target declared 'absl::random_internal_randen' -- Conan: Component target declared 'absl::string_view' -- Conan: Component target declared 'absl::charset' -- Conan: Component target declared 'absl::strings_internal' -- Conan: Component target declared 'absl::bad_any_cast' -- Conan: Component target declared 'absl::optional' -- Conan: Component target declared 'absl::variant' -- Conan: Component target declared 'absl::malloc_internal' -- Conan: Component target declared 'absl::random_bit_gen_ref' -- Conan: Component target declared 'absl::random_internal_mock_helpers' -- Conan: Component target declared 'absl::random_internal_randen_engine' -- Conan: Component target declared 'absl::strings' -- Conan: Component target declared 'absl::str_format_internal' -- Conan: Component target declared 'absl::graphcycles_internal' -- Conan: Component target declared 'absl::time' -- Conan: Component target declared 'absl::any' -- Conan: Component target declared 'absl::layout' -- Conan: Component target declared 'absl::symbolize' -- Conan: Component target declared 'absl::examine_stack' -- Conan: Component target declared 'absl::failure_signal_handler' -- Conan: Component target declared 'absl::flags_path_util' -- Conan: Component target declared 'absl::flags_commandlineflag' -- Conan: Component target declared 'absl::flags_private_handle_accessor' -- Conan: Component target declared 'absl::hash' -- Conan: Component target declared 'absl::log_internal_globals' -- Conan: Component target declared 'absl::log_internal_proto' -- Conan: Component target declared 'absl::log_internal_nullstream' -- Conan: Component target declared 'absl::log_internal_append_truncated' -- Conan: Component target declared 'absl::log_entry' -- Conan: Component target declared 'absl::log_sink' -- Conan: Component target declared 'absl::log_internal_fnmatch' -- Conan: Component target declared 'absl::random_distributions' -- Conan: Component target declared 'absl::random_internal_seed_material' -- Conan: Component target declared 'absl::random_internal_pool_urbg' -- Conan: Component target declared 'absl::random_internal_salted_seed_seq' -- Conan: Component target declared 'absl::random_internal_nonsecure_base' -- Conan: Component target declared 'absl::str_format' -- Conan: Component target declared 'absl::kernel_timeout_internal' -- Conan: Component target declared 'absl::synchronization' -- Conan: Component target declared 'absl::crc32c' -- Conan: Component target declared 'absl::crc_cord_state' -- Conan: Component target declared 'absl::flags_program_name' -- Conan: Component target declared 'absl::flags_config' -- Conan: Component target declared 'absl::flags_marshalling' -- Conan: Component target declared 'absl::flags_internal' -- Conan: Component target declared 'absl::log_internal_format' -- Conan: Component target declared 'absl::vlog_config_internal' -- Conan: Component target declared 'absl::absl_vlog_is_on' -- Conan: Component target declared 'absl::vlog_is_on' -- Conan: Component target declared 'absl::sample_recorder' -- Conan: Component target declared 'absl::random_seed_sequences' -- Conan: Component target declared 'absl::random_internal_distribution_test_util' -- Conan: Component target declared 'absl::cord_internal' -- Conan: Component target declared 'absl::cordz_statistics' -- Conan: Component target declared 'absl::cordz_handle' -- Conan: Component target declared 'absl::cordz_info' -- Conan: Component target declared 'absl::cordz_sample_token' -- Conan: Component target declared 'absl::cordz_update_scope' -- Conan: Component target declared 'absl::cord' -- Conan: Component target declared 'absl::btree' -- Conan: Component target declared 'absl::hash_function_defaults' -- Conan: Component target declared 'absl::hashtablez_sampler' -- Conan: Component target declared 'absl::raw_hash_set' -- Conan: Component target declared 'absl::log_globals' -- Conan: Component target declared 'absl::log_initialize' -- Conan: Component target declared 'absl::random_random' -- Conan: Component target declared 'absl::status' -- Conan: Component target declared 'absl::statusor' -- Conan: Component target declared 'absl::flat_hash_set' -- Conan: Component target declared 'absl::node_hash_set' -- Conan: Component target declared 'absl::raw_hash_map' -- Conan: Component target declared 'absl::log_internal_log_sink_set' -- Conan: Component target declared 'absl::log_sink_registry' -- Conan: Component target declared 'absl::flat_hash_map' -- Conan: Component target declared 'absl::node_hash_map' -- Conan: Component target declared 'absl::flags_reflection' -- Conan: Component target declared 'absl::flags' -- Conan: Component target declared 'absl::flags_usage_internal' -- Conan: Component target declared 'absl::flags_usage' -- Conan: Component target declared 'absl::flags_parse' -- Conan: Component target declared 'absl::log_internal_flags' -- Conan: Component target declared 'absl::log_internal_message' -- Conan: Component target declared 'absl::log_internal_strip' -- Conan: Component target declared 'absl::log_flags' -- Conan: Component target declared 'absl::log_internal_structured' -- Conan: Component target declared 'absl::log_structured' -- Conan: Component target declared 'absl::log_internal_check_op' -- Conan: Component target declared 'absl::log_internal_log_impl' -- Conan: Component target declared 'absl::absl_log' -- Conan: Component target declared 'absl::log' -- Conan: Component target declared 'absl::log_streamer' -- Conan: Component target declared 'absl::log_internal_check_impl' -- Conan: Component target declared 'absl::absl_check' -- Conan: Component target declared 'absl::check' -- Conan: Component target declared 'absl::die_if_null' -- Conan: Target declared 'abseil::abseil' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/absei0882cd5e427ba/p/lib/cmake/conan_trick/cxx_std.cmake' CMake Deprecation Warning at third_party/utf8_range/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done (1.4s) -- Generating done (0.1s) CMake Warning: Manually-specified variables were not used by the project: protobuf_BUILD_LIBUPB -- Build files have been written to: /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release protobuf/4.25.3: Running CMake.build() protobuf/4.25.3: RUN: cmake --build "/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release" -- -j10 [ 0%] Building CXX object third_party/utf8_range/CMakeFiles/utf8_validity.dir/utf8_validity.cc.o ... LINES REMOVED ... [ 99%] Building CXX object CMakeFiles/protoc.dir/src/google/protobuf/compiler/main.cc.o [100%] Linking CXX executable protoc [100%] Built target protoc protobuf/4.25.3: Package 'de10d95a4f0d64825a6ec6937d00b3d3d99aba5d' built protobuf/4.25.3: Build folder /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release protobuf/4.25.3: Generating the package protobuf/4.25.3: Packaging in folder /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p protobuf/4.25.3: Calling package() protobuf/4.25.3: Running CMake.install() protobuf/4.25.3: RUN: cmake --install "/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/b/build/Release" --prefix "/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p" -- Install configuration: "Release" -- Installing: /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/utf8_range/utf8_range-targets.cmake ... LINES REMOVED ... -- Installing: /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/protobuf/protobuf-config-version.cmake protobuf/4.25.3: package(): Packaged 2 files: protoc, LICENSE protobuf/4.25.3: package(): Packaged 1 '.0' file: protoc-25.3.0 protobuf/4.25.3: package(): Packaged 220 '.h' files protobuf/4.25.3: package(): Packaged 14 '.proto' files protobuf/4.25.3: package(): Packaged 2 '.inc' files: port_undef.inc, port_def.inc protobuf/4.25.3: package(): Packaged 5 '.a' files protobuf/4.25.3: package(): Packaged 4 '.cmake' files: protobuf-module.cmake, protobuf-generate.cmake, protobuf-conan-protoc-target.cmake, protobuf-options.cmake protobuf/4.25.3: Created package revision f9d2f78db5b16240b276f71a69c14fd5 protobuf/4.25.3: Package 'de10d95a4f0d64825a6ec6937d00b3d3d99aba5d' created protobuf/4.25.3: Full package reference: protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d#f9d2f78db5b16240b276f71a69c14fd5 protobuf/4.25.3: Package folder /Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X: WARN: deprecated: 'cpp_info.names' used in: protobuf/4.25.3, abseil/20240116.2, zlib/1.3 WARN: deprecated: 'cpp_info.build_modules' used in: protobuf/4.25.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.filenames' used in: protobuf/4.25.3 WARN: deprecated: 'env_info' used in: protobuf/4.25.3 ======== Launching test_package ======== ======== Computing dependency graph ======== Graph root protobuf/4.25.3 (test package): /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/conanfile.py Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2 - Cache protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd - Cache zlib/1.3#06023034579559bb64357db3a53f88a4 - Cache ======== Computing necessary packages ======== Requirements abseil/20240116.2#54f81a20ccd26a6558e18d57059847e2:39f48664f195e0847f59889d8a4cdfc6bca84bf1#306c4454ae23d31b423eab08f355dd4a - Cache protobuf/4.25.3#ba689ce6b6b060093e9875ef55580ffd:de10d95a4f0d64825a6ec6937d00b3d3d99aba5d#f9d2f78db5b16240b276f71a69c14fd5 - Cache zlib/1.3#06023034579559bb64357db3a53f88a4:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#5acd49402d3dbc830c8e20b104bf175a - Cache ======== Installing packages ======== abseil/20240116.2: Already installed! (1 of 3) zlib/1.3: Already installed! (2 of 3) protobuf/4.25.3: Already installed! (3 of 3) WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X: WARN: deprecated: 'cpp_info.names' used in: protobuf/4.25.3, abseil/20240116.2, zlib/1.3 WARN: deprecated: 'cpp_info.build_modules' used in: protobuf/4.25.3, abseil/20240116.2 WARN: deprecated: 'cpp_info.filenames' used in: protobuf/4.25.3 WARN: deprecated: 'env_info' used in: protobuf/4.25.3 ======== Testing the package ======== Removing previously existing 'test_package' build folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Test package build: build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Test package build folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Writing generators to /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators protobuf/4.25.3 (test package): Generator 'VirtualBuildEnv' calling 'generate()' protobuf/4.25.3 (test package): Generator 'CMakeDeps' calling 'generate()' protobuf/4.25.3 (test package): CMakeDeps necessary find_package() and targets for your CMakeLists.txt find_package(protobuf) target_link_libraries(... protobuf::protobuf) protobuf/4.25.3 (test package): Generator 'VirtualRunEnv' calling 'generate()' protobuf/4.25.3 (test package): Calling generate() protobuf/4.25.3 (test package): Generators folder: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators protobuf/4.25.3 (test package): CMakeToolchain generated: conan_toolchain.cmake protobuf/4.25.3 (test package): CMakeToolchain generated: CMakePresets.json protobuf/4.25.3 (test package): CMakeToolchain generated: ../../../CMakeUserPresets.json protobuf/4.25.3 (test package): Generating aggregated env files protobuf/4.25.3 (test package): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] ======== Testing the package: Building ======== protobuf/4.25.3 (test package): Calling build() protobuf/4.25.3 (test package): Running CMake.configure() protobuf/4.25.3 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package" -Dprotobuf_LITE="ON" -DCONAN_TEST_USE_CXXSTD_14="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package" -- Using Conan toolchain: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release/generators/conan_toolchain.cmake -- Conan toolchain: C++ Standard 17 with extensions ON -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Component target declared 'utf8_range::utf8_range' -- Conan: Component target declared 'utf8_range::utf8_validity' -- Conan: Component target declared 'protobuf::libprotobuf' -- Conan: Component target declared 'protobuf::libprotoc' -- Conan: Component target declared 'protobuf::libprotobuf-lite' -- Conan: Target declared 'protobuf::protobuf' -- Conan: Target declared 'ZLIB::ZLIB' -- Conan: Component target declared 'absl::config' -- Conan: Component target declared 'absl::dynamic_annotations' -- Conan: Component target declared 'absl::core_headers' -- Conan: Component target declared 'absl::pretty_function' -- Conan: Component target declared 'absl::fast_type_id' -- Conan: Component target declared 'absl::prefetch' -- Conan: Component target declared 'absl::algorithm' -- Conan: Component target declared 'absl::hashtable_debug_hooks' -- Conan: Component target declared 'absl::node_slot_policy' -- Conan: Component target declared 'absl::non_temporal_arm_intrinsics' -- Conan: Component target declared 'absl::non_temporal_memcpy' -- Conan: Component target declared 'absl::leak_check' -- Conan: Component target declared 'absl::flags_commandlineflag_internal' -- Conan: Component target declared 'absl::log_internal_config' -- Conan: Component target declared 'absl::log_internal_nullguard' -- Conan: Component target declared 'absl::log_internal_voidify' -- Conan: Component target declared 'absl::type_traits' -- Conan: Component target declared 'absl::meta' -- Conan: Component target declared 'absl::bits' -- Conan: Component target declared 'absl::int128' -- Conan: Component target declared 'absl::numeric' -- Conan: Component target declared 'absl::numeric_representation' -- Conan: Component target declared 'absl::exponential_biased' -- Conan: Component target declared 'absl::periodic_sampler' -- Conan: Component target declared 'absl::random_seed_gen_exception' -- Conan: Component target declared 'absl::random_internal_traits' -- Conan: Component target declared 'absl::random_internal_fast_uniform_bits' -- Conan: Component target declared 'absl::random_internal_iostream_state_saver' -- Conan: Component target declared 'absl::random_internal_wide_multiply' -- Conan: Component target declared 'absl::random_internal_fastmath' -- Conan: Component target declared 'absl::random_internal_pcg_engine' -- Conan: Component target declared 'absl::random_internal_platform' -- Conan: Component target declared 'absl::random_internal_randen_slow' -- Conan: Component target declared 'absl::random_internal_randen_hwaes_impl' -- Conan: Component target declared 'absl::random_internal_uniform_helper' -- Conan: Component target declared 'absl::has_ostream_operator' -- Conan: Component target declared 'absl::cordz_update_tracker' -- Conan: Component target declared 'absl::civil_time' -- Conan: Component target declared 'absl::time_zone' -- Conan: Component target declared 'absl::compare' -- Conan: Component target declared 'absl::if_constexpr' -- Conan: Component target declared 'absl::atomic_hook' -- Conan: Component target declared 'absl::errno_saver' -- Conan: Component target declared 'absl::log_severity' -- Conan: Component target declared 'absl::no_destructor' -- Conan: Component target declared 'absl::nullability' -- Conan: Component target declared 'absl::raw_logging_internal' -- Conan: Component target declared 'absl::base_internal' -- Conan: Component target declared 'absl::throw_delegate' -- Conan: Component target declared 'absl::scoped_set_env' -- Conan: Component target declared 'absl::strerror' -- Conan: Component target declared 'absl::algorithm_container' -- Conan: Component target declared 'absl::common_policy_traits' -- Conan: Component target declared 'absl::hashtable_debug' -- Conan: Component target declared 'absl::container_common' -- Conan: Component target declared 'absl::debugging_internal' -- Conan: Component target declared 'absl::overload' -- Conan: Component target declared 'absl::memory' -- Conan: Component target declared 'absl::random_internal_generate_real' -- Conan: Component target declared 'absl::random_internal_randen_hwaes' -- Conan: Component target declared 'absl::cordz_functions' -- Conan: Component target declared 'absl::bad_any_cast_impl' -- Conan: Component target declared 'absl::span' -- Conan: Component target declared 'absl::bad_optional_access' -- Conan: Component target declared 'absl::bad_variant_access' -- Conan: Component target declared 'absl::utility' -- Conan: Component target declared 'absl::spinlock_wait' -- Conan: Component target declared 'absl::base' -- Conan: Component target declared 'absl::endian' -- Conan: Component target declared 'absl::cleanup_internal' -- Conan: Component target declared 'absl::cleanup' -- Conan: Component target declared 'absl::compressed_tuple' -- Conan: Component target declared 'absl::fixed_array' -- Conan: Component target declared 'absl::inlined_vector_internal' -- Conan: Component target declared 'absl::inlined_vector' -- Conan: Component target declared 'absl::container_memory' -- Conan: Component target declared 'absl::hash_policy_traits' -- Conan: Component target declared 'absl::crc_cpu_detect' -- Conan: Component target declared 'absl::crc_internal' -- Conan: Component target declared 'absl::stacktrace' -- Conan: Component target declared 'absl::demangle_internal' -- Conan: Component target declared 'absl::debugging' -- Conan: Component target declared 'absl::any_invocable' -- Conan: Component target declared 'absl::bind_front' -- Conan: Component target declared 'absl::function_ref' -- Conan: Component target declared 'absl::city' -- Conan: Component target declared 'absl::low_level_hash' -- Conan: Component target declared 'absl::log_internal_conditions' -- Conan: Component target declared 'absl::random_internal_distribution_caller' -- Conan: Component target declared 'absl::random_internal_randen' -- Conan: Component target declared 'absl::string_view' -- Conan: Component target declared 'absl::charset' -- Conan: Component target declared 'absl::strings_internal' -- Conan: Component target declared 'absl::bad_any_cast' -- Conan: Component target declared 'absl::optional' -- Conan: Component target declared 'absl::variant' -- Conan: Component target declared 'absl::malloc_internal' -- Conan: Component target declared 'absl::random_bit_gen_ref' -- Conan: Component target declared 'absl::random_internal_mock_helpers' -- Conan: Component target declared 'absl::random_internal_randen_engine' -- Conan: Component target declared 'absl::strings' -- Conan: Component target declared 'absl::str_format_internal' -- Conan: Component target declared 'absl::graphcycles_internal' -- Conan: Component target declared 'absl::time' -- Conan: Component target declared 'absl::any' -- Conan: Component target declared 'absl::layout' -- Conan: Component target declared 'absl::symbolize' -- Conan: Component target declared 'absl::examine_stack' -- Conan: Component target declared 'absl::failure_signal_handler' -- Conan: Component target declared 'absl::flags_path_util' -- Conan: Component target declared 'absl::flags_commandlineflag' -- Conan: Component target declared 'absl::flags_private_handle_accessor' -- Conan: Component target declared 'absl::hash' -- Conan: Component target declared 'absl::log_internal_globals' -- Conan: Component target declared 'absl::log_internal_proto' -- Conan: Component target declared 'absl::log_internal_nullstream' -- Conan: Component target declared 'absl::log_internal_append_truncated' -- Conan: Component target declared 'absl::log_entry' -- Conan: Component target declared 'absl::log_sink' -- Conan: Component target declared 'absl::log_internal_fnmatch' -- Conan: Component target declared 'absl::random_distributions' -- Conan: Component target declared 'absl::random_internal_seed_material' -- Conan: Component target declared 'absl::random_internal_pool_urbg' -- Conan: Component target declared 'absl::random_internal_salted_seed_seq' -- Conan: Component target declared 'absl::random_internal_nonsecure_base' -- Conan: Component target declared 'absl::str_format' -- Conan: Component target declared 'absl::kernel_timeout_internal' -- Conan: Component target declared 'absl::synchronization' -- Conan: Component target declared 'absl::crc32c' -- Conan: Component target declared 'absl::crc_cord_state' -- Conan: Component target declared 'absl::flags_program_name' -- Conan: Component target declared 'absl::flags_config' -- Conan: Component target declared 'absl::flags_marshalling' -- Conan: Component target declared 'absl::flags_internal' -- Conan: Component target declared 'absl::log_internal_format' -- Conan: Component target declared 'absl::vlog_config_internal' -- Conan: Component target declared 'absl::absl_vlog_is_on' -- Conan: Component target declared 'absl::vlog_is_on' -- Conan: Component target declared 'absl::sample_recorder' -- Conan: Component target declared 'absl::random_seed_sequences' -- Conan: Component target declared 'absl::random_internal_distribution_test_util' -- Conan: Component target declared 'absl::cord_internal' -- Conan: Component target declared 'absl::cordz_statistics' -- Conan: Component target declared 'absl::cordz_handle' -- Conan: Component target declared 'absl::cordz_info' -- Conan: Component target declared 'absl::cordz_sample_token' -- Conan: Component target declared 'absl::cordz_update_scope' -- Conan: Component target declared 'absl::cord' -- Conan: Component target declared 'absl::btree' -- Conan: Component target declared 'absl::hash_function_defaults' -- Conan: Component target declared 'absl::hashtablez_sampler' -- Conan: Component target declared 'absl::raw_hash_set' -- Conan: Component target declared 'absl::log_globals' -- Conan: Component target declared 'absl::log_initialize' -- Conan: Component target declared 'absl::random_random' -- Conan: Component target declared 'absl::status' -- Conan: Component target declared 'absl::statusor' -- Conan: Component target declared 'absl::flat_hash_set' -- Conan: Component target declared 'absl::node_hash_set' -- Conan: Component target declared 'absl::raw_hash_map' -- Conan: Component target declared 'absl::log_internal_log_sink_set' -- Conan: Component target declared 'absl::log_sink_registry' -- Conan: Component target declared 'absl::flat_hash_map' -- Conan: Component target declared 'absl::node_hash_map' -- Conan: Component target declared 'absl::flags_reflection' -- Conan: Component target declared 'absl::flags' -- Conan: Component target declared 'absl::flags_usage_internal' -- Conan: Component target declared 'absl::flags_usage' -- Conan: Component target declared 'absl::flags_parse' -- Conan: Component target declared 'absl::log_internal_flags' -- Conan: Component target declared 'absl::log_internal_message' -- Conan: Component target declared 'absl::log_internal_strip' -- Conan: Component target declared 'absl::log_flags' -- Conan: Component target declared 'absl::log_internal_structured' -- Conan: Component target declared 'absl::log_structured' -- Conan: Component target declared 'absl::log_internal_check_op' -- Conan: Component target declared 'absl::log_internal_log_impl' -- Conan: Component target declared 'absl::absl_log' -- Conan: Component target declared 'absl::log' -- Conan: Component target declared 'absl::log_streamer' -- Conan: Component target declared 'absl::log_internal_check_impl' -- Conan: Component target declared 'absl::absl_check' -- Conan: Component target declared 'absl::check' -- Conan: Component target declared 'absl::die_if_null' -- Conan: Target declared 'abseil::abseil' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/absei0882cd5e427ba/p/lib/cmake/conan_trick/cxx_std.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/protobuf/protobuf-generate.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/protobuf/protobuf-module.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/protobuf/protobuf-options.cmake' -- Conan: Including build module from '/Users/kleto.zan/.conan2/p/b/protof9e93a2d3f2ca/p/lib/cmake/protobuf/protobuf-conan-protoc-target.cmake' -- Configuring done (0.4s) -- Generating done (0.0s) -- Build files have been written to: /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release protobuf/4.25.3 (test package): Running CMake.build() protobuf/4.25.3 (test package): RUN: cmake --build "/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release" -- -j10 [ 25%] Running cpp protocol buffer compiler on addressbook-lite.proto, plugin-options: lite [ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o [ 75%] Building CXX object CMakeFiles/test_package.dir/addressbook-lite.pb.cc.o [100%] Linking CXX executable test_package [100%] Built target test_package ======== Testing the package: Executing test ======== protobuf/4.25.3 (test package): Running test() protobuf/4.25.3 (test package): RUN: ./test_package protobuf/4.25.3 (test package): RUN: protoc --proto_path=/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package --cpp_out=/Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-15-armv8-gnu17-release /Users/kleto.zan/repos/kletoz/conan-center-index/recipes/protobuf/all/test_package/addressbook.proto ```

Details

The recipe change is reproduce the same already configured to libprotobuf to libprotobuf-lite.

For the test, I added a new proto file without Well-Know types, like Timestamp, because they are not supported by LITE mode. Also, I changed the CMakeLists.txt to make sure that the build with protobuf/*:lite=True is not linking against libprotobuf, only against libprotobuf-lite. In the test_package.cpp I added some lines to manipulate the message from proto file.


jcar87 commented 1 week ago

Hi @kletoz - thanks for your PR and for fixing this issue.

Please bear in mind that our CI will only catch regressions for default options, and since this affects a non-default path - it would not be caught anyway, although it will for users using conan create . locally with the overridden option values.

I've amended the test package with a very minimal code path that would have highlighted this issue - simply by ensuring we call a function from the protobuf-library. Indeed libprotoc should not have been linked unconditionally, as it was masking the problem. Since the last refactor I believe that line is completely unnecessary.

kletoz commented 1 week ago

Thanks for cleaning the test, @jcar87!

However, with this change, it seems it's not catching the issue fixed in this PR. I tested locally with your changes, but removing the fix in the recipe and don't see it failing. The issue is only highlighted when a generated C++ file is included in the build. The library itself libprotobuf-lite will not miss objects from utf8 when it's not called, and it's only called from the generated *.pb.cc file.

On the other side, I totally understand the principle of adding a very minimal code path in the test and agree that it's not easy to catch regressions for all non-default options.

jcar87 commented 1 week ago

Thanks for cleaning the test, @jcar87!

However, with this change, it seems it's not catching the issue fixed in this PR. I tested locally with your changes, but removing the fix in the recipe and don't see it failing. The issue is only highlighted when a generated C++ file is included in the build. The library itself libprotobuf-lite will not miss objects from utf8 when it's not called, and it's only called from the generated *.pb.cc file.

On the other side, I totally understand the principle of adding a very minimal code path in the test and agree that it's not easy to catch regressions for all non-default options.

Thanks for testing it! Let me double check - locally, without the fix but with the new test, running

conan create . --version=5.27.0 -o "protobuf/*:lite=True"

Gives me this:

protobuf/5.27.0 (test package): RUN: cmake --build "/conan-center-index/recipes/protobuf/all/test_package/build/apple-clang-13-armv8-gnu17-release" -- -j10
[ 50%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
[100%] Linking CXX executable test_package
Undefined symbols for architecture arm64:
  "utf8_range::IsStructurallyValid(std::__1::basic_string_view<char, std::__1::char_traits<char>>)", referenced from:
      google::protobuf::internal::VerifyUTF8(std::__1::basic_string_view<char, std::__1::char_traits<char>>, char const*) in libprotobuf-lite.a(parse_context.cc.o)
      google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*, int, google::protobuf::internal::WireFormatLite::Operation, char const*) in libprotobuf-lite.a(wire_format_lite.cc.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [test_package] Error 1
make[1]: *** [CMakeFiles/test_package.dir/all] Error 2
make: *** [all] Error 2

With your fix in the recipe, this no longer happens. Let's get to the bottom of this! Which platform are you testing on? :D

kletoz commented 1 week ago

You are right! Sorry, my bad. I was using a command line from the terminal history with --options "*/*:shared=True", and no error in this case, as expected. When I removed the shared option, getting the default shared=False, it failed!

Thanks again for reviewing and simplifying the test.

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
[options]
protobuf/*:lite=True

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
jcar87 commented 1 week ago

You are right! Sorry, my bad. I was using a command line from the terminal history with --options "*/*:shared=True", and no error in this case, as expected. When I removed the shared option, getting the default shared=False, it failed!

Thanks again for reviewing and simplifying the test.

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
[options]
protobuf/*:lite=True

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos

Awesome, thanks for double checking and for fixing the bug!