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

Version 3.7.22 does not build with latest Protobuf (22.x) and c++20 #472

Open
jan-busa opened this issue May 16, 2023 · 2 comments
Open
Assignees
Milestone

Comments

@jan-busa
Copy link

I am not sure, my fixes are in line with plans for DDS build therefore I just write problems I have encountered during build and how I fixed them.

Missing support for c++20

This has been solved by #466, just needs to be pushed to master

Missing support for Protobuf (22.x)

Starting from 22.0 Protobuf has added as dependency Abseil (absl and utf8_range). Therefore these need to be added with proper find_package and linking calls. Namely, in file CMakeLists.txt after line

find_package(Protobuf 3.15 REQUIRED)

lines

find_package(absl REQUIRED)
find_package(utf8_range REQUIRED)

need to be added. Same in file proto/CMakeLists.txt during linking in target_link_libraries
after line

  ${Protobuf_LIBRARIES}

one needs to add lines

  absl::flat_hash_set
  absl::log_internal_check_op
  utf8_range::utf8_validity

Missing paths in PREREQ_DIRS

This produces just warnings during install step of build. Two paths are missing in PREREQ_DIRS variable. To fix this, in file
CMakeLists.txt in set(PREREQ_DIRS .... one needs to add two more targets

$<TARGET_FILE_DIR:dds_tools_lib>
$<TARGET_FILE_DIR:dds_proto_lib>
@AnarManafov
Copy link
Contributor

@jan-busa , thank you!

I will review and push. I am working on a new build environment atm. Therefore it might take a bit of time.

@AnarManafov AnarManafov self-assigned this May 16, 2023
@AnarManafov AnarManafov added this to the 3.8 milestone May 16, 2023
@jan-busa
Copy link
Author

Seems that in new abseil (20230802.0) were made some updates. Now, apart to the aforementioned modifications, also following libraries need to be added during linking.
Files dds-commander/CMakeLists.txt and dds-submit-slurm/CMakeLists.txt:

absl::status
absl::statusor
absl::log_internal_conditions

They have to be added after dds_ libraries (e.g., right before Boost::boost) in order to be loaded before dds. Otherwise protobuf will complain about undefined functions.

@AnarManafov AnarManafov modified the milestones: 3.8, 3.9 Jan 12, 2024
@AnarManafov AnarManafov modified the milestones: 3.9, 3.10, 3.11 Apr 23, 2024
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

No branches or pull requests

2 participants