Project

General

Profile

Bug #19853

cmake modules should set proper package name

Added by Shengjing Zhu about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
build
Target version:
-
Start date:
05/04/2017
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
master
Needs Doc:
No

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.

History

#1 Updated by Nathan Cutler about 2 months 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

#2 Updated by Shengjing Zhu about 2 months 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.

#3 Updated by Nathan Cutler about 2 months ago

  • Status changed from New to Need Review
  • Assignee set to Nathan Cutler

#4 Updated by Nathan Cutler about 2 months ago

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

#5 Updated by Shengjing Zhu about 2 months 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

#6 Updated by Kefu Chai about 2 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF