Bug #19853
closedcmake modules should set proper package name
0%
Description
in ceph/cmake/modules/Findcryptopp.cmake, it uses
FIND_PACKAGE_HANDLE_STANDARD_ARGS (CryptoPP REQUIRED_VARS CRYPTOPP_ROOT_DIR
the package name here is CryptoPP, not cryptopp, which all letters are lower-case。
the file name is also lower-case.
And in ceph/CMakeLists.txt, it uses `find_package(cryptopp REQUIRED)`, which is lower-case.
The result is that, during cmake, it only outputs `Could NOT find CryptoPP` without any fault, but it should abort the whole cmake process.
You can produce this by removing cryptopp library from your system and run cmake with -DWITH_NSS=OFF so that cryptopp can be used.
Besides, I think there are others files in ceph/cmake/modules using the wrong package name.
Updated by Nathan Cutler almost 7 years ago
the package name here is CryptoPP, not cryptopp, which all letters are lower-case
The package name is CryptoPP in which distribution? In openSUSE, for example, the package name appears to be libcryptopp.
https://build.opensuse.org/package/view_file/openSUSE:Factory/libcryptopp/libcryptopp.spec?expand=1
Updated by Shengjing Zhu almost 7 years ago
Nathan Cutler wrote:
the package name here is CryptoPP, not cryptopp, which all letters are lower-case
The package name is CryptoPP in which distribution? In openSUSE, for example, the package name appears to be libcryptopp.
https://build.opensuse.org/package/view_file/openSUSE:Factory/libcryptopp/libcryptopp.spec?expand=1
Hi, it's no matter how the system name the library. Actually the file Findcryptopp.cmake is to find the library in different distributions.
The problem here is how to name it in cmake file. If you use CryptoPP in FIND_PACKAGE_HANDLE_STANDARD_ARGS(cmake func), then you should name the module file with FindCryptoPP.cmake, and use CryptoPP in find_package(cmake func). Or use lower-case all the places.
Updated by Nathan Cutler almost 7 years ago
- Status changed from New to Fix Under Review
- Assignee set to Nathan Cutler
Updated by Nathan Cutler almost 7 years ago
@Shengjing Zhu: Thanks for the explanation. Opened a PR with a fix - please review.
Updated by Shengjing Zhu almost 7 years ago
Nathan Cutler wrote:
@Shengjing Zhu: Thanks for the explanation. Opened a PR with a fix - please review.
Thanks for your fix, after a quick look and grep locally,
in cmake/modules/Findrdma.cmake, it uses a different library name
./Findrdma.cmake:find_package_handle_standard_args(ibverbs DEFAULT_MSG RDMA_LIBRARIES RDMA_INCLUDE_DIR)
Maybe it's also a mistake
Updated by Kefu Chai almost 7 years ago
- Status changed from Fix Under Review to Resolved