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

rocksdb/6.29.5: add patch to ignore thirdparty.inc #23090

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/rocksdb/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ patches:
patch_description: "Fix build with gcc 13 by including cstdint"
patch_type: "portability"
patch_source: "https://github.com/facebook/rocksdb/pull/11118"
- patch_file: "patches/6.29.5-0002-exclude-thirdparty.patch"
patch_description: "Do not include thirdparty.inc"
patch_type: "portability"
"6.27.3":
- patch_file: "patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch"
patch_description: "Fix build with gcc 13 by including cstdint"
Expand Down
16 changes: 16 additions & 0 deletions recipes/rocksdb/all/patches/6.29.5-0002-exclude-thirdparty.patch
Copy link
Contributor

@valgur valgur Mar 24, 2024

Choose a reason for hiding this comment

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

You can get away with a save(self, os.path.join(self.source_folder, "thirdparty.inc", "") in _patch_sources(), which is more stable across versions and easier to maintain.

Regarding WITH_GFLAGS, there's no need to remove it, probably. However, the recipe needs a tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" for the current tc.variables to work correctly for CMake option()-s.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That change won't fix the problem. The branch that calls find_package() for each optional dependency will still be skipped because MSVC is truthy. My patch effectively removes the other branch and sends all builds through the path that calls find_package().

I remove this call to option(WITH_GFLAGS) because it is superceded by a later call.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec59d4491..35577c998 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101 +100,0 @@ if(MSVC)
- option(WITH_GFLAGS "build with GFlags" OFF)
@@ -103,2 +102,2 @@ if(MSVC)
- include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc)
-else()
+endif()
+
@@ -117 +116 @@ else()
- if(MINGW)
+ if(MINGW OR MSVC)
@@ -183 +181,0 @@ else()
-endif()
Loading