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

[libprotobuf-mutator] Compatible with Conan 2.x #24163

Merged
merged 10 commits into from
May 30, 2024

Conversation

uilianries
Copy link
Member

Specify library name and version: libprotobuf-mutator/1.3

The libprotobuf-mutator has now official tags, which means we can drop the old custom version in CCI.

This PR is a follow-up of PR #24159. Between 1.1 and 1.3 some things changed and required more attention, including:

  • Requires Protobuf release 25. The latest release 26 is incompatible, failed to build locally.
  • It requires C++14, and it's enforced to C++14 only by set(CMAKE_CXX_STANDARD ...
  • It gets a ride from Protobuf dependency and consumes abseil::StrCat method (fragile)
  • Requires CMake 3.24 as minimal

Notes about this PR in concrete:

  • I preferred using a CMake wrapper to fix protobuf and abseil link, because it's less invasive and I'll send a PR to the upstream, so we don't keep different patches. Abseil is used, but not directly linked by the project, it uses from Protobuf transitive dependency.
  • Dropped Conan 1.x test package to validate cmake_find_package and so on
  • Dropped custom cci version because was too old and current tags follow last commits in upstream
  • Added shared and fPIC options. Both working on Linux (tested locally)
  • Added components to follow same CMake targets provided by the upstream

TODO: Send a PR to the upstream fixing not only abseil usage, but cxx standard too.


Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

The upstream uses EXCLUDE_FROM_ALL CMake feature to avoid building
examples by default, however, CMake still parses the example cmake
file and requires more external dependencies like expat.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot

This comment has been minimized.

@uilianries
Copy link
Member Author

The project does not expose symbols in .lib when building Windows + shared=True. Dropped shared option when building with MSVC. I'll send a PR to upstream trying to fix it.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 4 (c46ecf95773e72636429b453e14225f02e4b4e19):

  • libprotobuf-mutator/1.3:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 4 (c46ecf95773e72636429b453e14225f02e4b4e19):

  • libprotobuf-mutator/1.3:
    All packages built successfully! (All logs)

@uilianries uilianries self-assigned this May 30, 2024
@uilianries uilianries marked this pull request as ready for review May 30, 2024 13:37
Copy link
Contributor

@valgur valgur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting the fixes upstream as well!

@conan-center-bot conan-center-bot merged commit f1aa3df into conan-io:master May 30, 2024
13 checks passed
phbasler pushed a commit to phbasler/conan-center-index that referenced this pull request Jun 3, 2024
* Protobug mutator compatible with Conan 2.x

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add version 1.3

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Enforce protobuf link

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* update abseil usage

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* consume all libs in tests

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* define cxx language in cmakelists

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* static-library on Windows

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Exclude examples from CMakeLists.txt

The upstream uses EXCLUDE_FROM_ALL CMake feature to avoid building
examples by default, however, CMake still parses the example cmake
file and requires more external dependencies like expat.

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Do not build shared on Windows

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
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