-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
This comment has been minimized.
This comment has been minimized.
My local compilation logs after patch:
Abbreviated logs before patching which error out:
Does this look ok to you @thejohnfreeman? :) |
@RubenRBS yes, I think that's right. |
This comment has been minimized.
This comment has been minimized.
Why can't I see the error? |
@thejohnfreeman That's was an internal error in the CI, but will be restarted asap. Sorry the inconvenient. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️All green in build 5 (
Conan v2 pipeline ✔️
All green in build 7 ( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This patch is still needed, and also needed for newer versions as well. How should we proceed with getting this in and working in general? |
Based on this and keeping its commits, I just opened a new one (#26009). I was not allowed to push the original branch. The new one solves that problem for the rest of the versions. Also, I've removed a few ones to avoid having several patches. |
Closing in favor of the new PR. |
rocksdb/6.29.5
RocksDB has special instructions for compiling on Windows that asks builders to edit the special file
thirdparty.inc
to set variables pointing to all of the optional dependencies they want to enable. The mainCMakeLists.txt
follows the best practice of callingfind_package()
and linking to imported targets, but only for non-MSVC generators.Thus, the latest RocksDB recipe in Conan Center builds with MSVC, but does not correctly link to any optional dependencies that are enabled.
thirdparty.inc
is included with nonsense paths and the build fails when it cannot find third-party headers.The old RocksDB recipe in Conan Center used a CMake subproject model. It had its own
CMakeLists.txt
that first calledconan_basic_setup()
before callingadd_subdirectory()
for the project. I don't know how, but it worked.This patch removes the branch on MSVC that includes
thirdparty.inc
instead of callingfind_package()
, but only for version 6.29.5 (the one I need for now).