-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Fix typo in CMakeList. #12247
Fix typo in CMakeList. #12247
Conversation
fa1c97f
to
8018508
Compare
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.
I think a small fix is still needed in Findzstd.cmake
.
It might also be worth checking the other files in cmake/modules/
as well?
@@ -166,7 +166,7 @@ else() | |||
if(WITH_ZSTD) | |||
find_package(zstd REQUIRED) | |||
add_definitions(-DZSTD) | |||
include_directories(${ZSTD_INCLUDE_DIR}) | |||
include_directories(${ZSTD_INCLUDE_DIRS}) |
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.
I think this also needs fixing in cmake/modules/Findzstd.cmake
where it seems to be in mixed-case.
8018508
to
0712f3e
Compare
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.
Now LGTM. Thanks @rhubner
@ajkr @pdillinger Can we get this one imported please? |
@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: #12247 imported another typo in cmakelists.txt and findzstd.cmake. cmake report ZSTD_INCLUDE_DIRS not found. Actually it should be https://github.com/facebook/rocksdb/blob/aacf60dda2a138f9d3826c25818a3bcf250859fd/cmake/modules/Findzstd.cmake#L8 Pull Request resolved: #12309 Reviewed By: hx235 Differential Revision: D54070348 Pulled By: ajkr fbshipit-source-id: eaf6e260ea3669b8ea38e4c74a375bb885761b51
This reverts commit 054c00e.
This PR broke nixpkgs build. It looks like their version of zstd does not export ZSTD_INCLUDE_DIRS |
Hello @georgthegreat,
Can you please provide more details? Link to CI/CD, reported issue in nixpkgs, ... Radek |
We have an internal system built atop of nixpkgs.
I have worked it around by adding the following:
I am not quite familiar with cmake internals to debug this. |
@georgthegreat Thanks for quick response, I will look into at the end of the week. It's possible there is still bug which we introduce during refactoring. Radek |
Hello @georgthegreat and sorry for late reply, Unfortunately I don't know nixos, but I can confirm that we recently changed the CMake build script. The refactor follows the pattern which we used to specify include dir for other libraries. Your fix with About CMake. During the build script generation with CMake, you can specify path where you have your libzstd. This allows you to use your version of zstd and not for example system/distribution version. I assume that when you are building nixos, you also build libzstd and then CMake needs to know where it is, if it's not in the default search path. Radek |
I have tried to understand why previous version worked, but I was unable to get to the root of it. I agree that |
Fix #12237