Project

General

Profile

Actions

Bug #19853

closed

cmake modules should set proper package name

Added by Shengjing Zhu almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
build
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

Actions #1

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

Actions #2

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.

Actions #3

Updated by Nathan Cutler almost 7 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Nathan Cutler
Actions #4

Updated by Nathan Cutler almost 7 years ago

@Shengjing Zhu: Thanks for the explanation. Opened a PR with a fix - please review.

Actions #5

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

Actions #6

Updated by Kefu Chai almost 7 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF