Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Rebuild for protobuf423 while accounting for change in versioning scheme #188

Merged
merged 9 commits into from
Jun 28, 2023

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jun 24, 2023

Starting with the v20.x protoc release, the versioning of C++ and Java libraries of protobuf changed, and while the minor.patch is ensured to be the same value, the major version are not related anymore, see https://protobuf.dev/support/version-support/ . So we need to manually handle the protobuf-java major version.

Fortunatly, for both libprotobuf 3.21 ad 4.23.2 the corresponding protobuf-java major version is the same (3), so we do not need specific logic to select the protobuf-java major version.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@traversaro
Copy link
Contributor Author

@conda-forge-admin, please rerender

@github-actions
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/bazel-feedstock/actions/runs/5363916604.

@traversaro
Copy link
Contributor Author

For libprotobuf=4.23.2 builds now the error is:


ERROR: /home/conda/feedstock_root/build_artifacts/bazel_1687603270831/work/src/main/cpp/BUILD:90:10: Linking src/main/cpp/client failed: (Exit 1): x86_64-conda-linux-gnu-gcc failed: error executing command (from target //src/main/cpp:client) 
  (cd /tmp/bazel_KhmOeLgG/out/execroot/io_bazel && \
  exec env - \
    PATH=/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin:/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin:/opt/conda/condabin:/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin:/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin:/opt/conda/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/conda/bin \
    PWD=/proc/self/cwd \
  /home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/x86_64-conda-linux-gnu-gcc -o bazel-out/k8-opt/bin/src/main/cpp/client bazel-out/k8-opt/bin/src/main/cpp/_objs/client/blaze.o bazel-out/k8-opt/bin/src/main/cpp/_objs/client/server_process_info.o bazel-out/k8-opt/bin/src/main/cpp/_objs/client/main.o bazel-out/k8-opt/bin/src/main/cpp/libarchive_utils.a bazel-out/k8-opt/bin/src/main/cpp/libbazel_startup_options.a bazel-out/k8-opt/bin/src/main/cpp/liboption_processor.a bazel-out/k8-opt/bin/src/main/cpp/librc_file.a bazel-out/k8-opt/bin/src/main/cpp/libstartup_options.a bazel-out/k8-opt/bin/src/main/cpp/libworkspace_layout.a bazel-out/k8-opt/bin/src/main/cpp/libblaze_util.a bazel-out/k8-opt/bin/src/main/cpp/util/libmd5.a bazel-out/k8-opt/bin/src/main/cpp/util/libnumbers.a bazel-out/k8-opt/bin/src/main/cpp/util/libbazel_log_handler.a bazel-out/k8-opt/bin/src/main/protobuf/libcommand_server_cc_grpc.a bazel-out/k8-opt/bin/src/main/protobuf/libcommand_server_proto.a bazel-out/k8-opt/bin/src/main/protobuf/libfailure_details_proto.a bazel-out/k8-opt/bin/third_party/ijar/libzip.a bazel-out/k8-opt/bin/third_party/ijar/libplatform_utils.a bazel-out/k8-opt/bin/src/main/cpp/util/libfilesystem.a bazel-out/k8-opt/bin/src/main/cpp/util/liberrors.a bazel-out/k8-opt/bin/src/main/cpp/util/libport.a bazel-out/k8-opt/bin/src/main/cpp/util/liblogging.a bazel-out/k8-opt/bin/src/main/cpp/util/libstrings.a bazel-out/k8-opt/bin/third_party/ijar/libzlib_client.a bazel-out/k8-opt/bin/third_party/zlib/libzlib_checked_in.a -lrt -ldl -lrt -lgrpc++_unsecure -lgrpc_unsecure -lgpr -lprotobuf -lstdc++ -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib -Wl,-rpath-link,/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib -L/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib -lpthread -labsl_synchronization)
# Configuration: 3c3349c668f8e111d2c90458d742cf7feafa06c388a5eb95c0ed70fc3d087d6e
# Execution platform: //:default_host_platform
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: bazel-out/k8-opt/bin/src/main/cpp/_objs/client/blaze.o: in function `absl::lts_20230125::Cord absl::lts_20230125::MakeCordFromExternal<grpc::ProtoBufferReader::MakeCordFromSlice(grpc_slice)::{lambda(std::basic_string_view<char, std::char_traits<char> >)#1}>(std::basic_string_view<char, std::char_traits<char> >, grpc::ProtoBufferReader::MakeCordFromSlice(grpc_slice)::{lambda(std::basic_string_view<char, std::char_traits<char> >)#1}&&)':
blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0x7c): undefined reference to `absl::lts_20230125::cord_internal::InitializeCordRepExternal(std::basic_string_view<char, std::char_traits<char> >, absl::lts_20230125::cord_internal::CordRepExternal*)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0xa1): undefined reference to `absl::lts_20230125::cord_internal::cordz_next_sample'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0xc9): undefined reference to `absl::lts_20230125::cord_internal::cordz_next_sample'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0xdc): undefined reference to `absl::lts_20230125::cord_internal::cordz_next_sample'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0x142): undefined reference to `absl::lts_20230125::cord_internal::cordz_should_profile_slow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0x154): undefined reference to `absl::lts_20230125::cord_internal::CordzInfo::TrackCord(absl::lts_20230125::cord_internal::InlineData&, absl::lts_20230125::cord_internal::CordzUpdateTracker::MethodIdentifier)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_[_ZN4absl12lts_2023012520MakeCordFromExternalIZN4grpc17ProtoBufferReader17MakeCordFromSliceE10grpc_sliceEUlSt17basic_string_viewIcSt11char_traitsIcEEE_EENS0_4CordES8_OT_]+0x16e): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: bazel-out/k8-opt/bin/src/main/cpp/_objs/client/blaze.o: in function `grpc::ProtoBufferReader::ReadCord(absl::lts_20230125::Cord*, int)':
blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x19d): undefined reference to `absl::lts_20230125::Cord::Append(absl::lts_20230125::Cord&&)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x339): undefined reference to `absl::lts_20230125::Cord::Append(absl::lts_20230125::Cord&&)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x353): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x42f): undefined reference to `absl::lts_20230125::Cord::Append(absl::lts_20230125::Cord&&)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x4ee): undefined reference to `absl::lts_20230125::Cord::Append(absl::lts_20230125::Cord&&)'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x505): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x515): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x575): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x5d5): undefined reference to `absl::lts_20230125::Cord::DestroyCordSlow()'
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: bazel-out/k8-opt/bin/src/main/cpp/_objs/client/blaze.o:blaze.cc:(.text._ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi[_ZN4grpc17ProtoBufferReader8ReadCordEPN4absl12lts_202301254CordEi]+0x603): more undefined references to `absl::lts_20230125::Cord::DestroyCordSlow()' follow
/home/conda/feedstock_root/build_artifacts/bazel_1687603270831/_build_env/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: bazel-out/k8-opt/bin/src/main/protobuf/libcommand_server_cc_grpc.a(command_server.grpc.pb.o): in function `grpc::ProtoBufferWriter::WriteCord(absl::lts_20230125::Cord const&)':
command_server.grpc.pb.cc:(.text._ZN4grpc17ProtoBufferWriter9WriteCordERKN4absl12lts_202301254CordE[_ZN4grpc17ProtoBufferWriter9WriteCordERKN4absl12lts_202301254CordE]+0xf0): undefined reference to `absl::lts_20230125::Cord::Subcord(unsigned long, unsigned long) const'
collect2: error: ld returned 1 exit status

This seems a classical error due to the fact that abseil is now a public dependency of libprotobuf and is not linked for this target.

@traversaro
Copy link
Contributor Author

Linux is building. Remaining problems:

@traversaro
Copy link
Contributor Author

@conda-forge/bazel the PR is ready for review.

@h-vetinari
Copy link
Member

h-vetinari commented Jun 24, 2023

@conda-forge/bazel the PR is ready for review.

Thanks a lot for this! I cleaned up the patch churn a bit1 and added some more context for the backported patch, but basically this LGTM. 👍

Would still like @xhochy to have a look if possible. :)

Footnotes

  1. The resulting changes are whitespace-only

@traversaro
Copy link
Contributor Author

Thanks for the cleanup!

@xhochy
Copy link
Member

xhochy commented Jun 28, 2023

Let's get this forward!

@xhochy xhochy merged commit bf603c7 into conda-forge:main Jun 28, 2023
h-vetinari pushed a commit to regro-cf-autotick-bot/bazel-feedstock that referenced this pull request Jul 2, 2023
* parametrize versions correctly between protobuf for C++ & Java

* Add abseil linkage for protobuf

* Add C++17 to BAZEL_BUILD_OPTS

Co-Authored-By: Silvio Traversaro <[email protected]>
h-vetinari added a commit to regro-cf-autotick-bot/bazel-feedstock that referenced this pull request Jul 2, 2023
* parametrize versions correctly between protobuf for C++ & Java

* Add abseil linkage for protobuf

* Add C++17 to BAZEL_BUILD_OPTS

Co-Authored-By: Silvio Traversaro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants