Skip to content
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

Invocation of find_package_handle_standard_args with a different package name warns with CMake 3.17 #47

Closed
tfoote opened this issue May 14, 2020 · 4 comments · Fixed by #48
Assignees

Comments

@tfoote
Copy link

tfoote commented May 14, 2020

All builds are causing multiple instances of the following warning:

From: https://ci.ros2.org/job/ci_osx/8744/consoleFull

14:02:52 CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
14:02:52   The package name passed to `find_package_handle_standard_args` (libdw) does
14:02:52   not match the name of the calling package (Backward).  This can lead to
14:02:52   problems in calling code that expects `find_package` result variables
14:02:52   (e.g., `_FOUND`) to follow a certain pattern.
14:02:52 Call Stack (most recent call first):
14:02:52   src/memory_tools/vendor/bombela/backward-cpp/BackwardConfig.cmake:61 (find_package_handle_standard_args)
14:02:52   src/memory_tools/CMakeLists.txt:7 (find_package)
14:02:52 This warning is for project developers.  Use -Wno-dev to suppress it.

There are 3 instances

Full error messages:

--- stderr: osrf_testing_tools_cpp
14:02:52 CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
14:02:52   The package name passed to `find_package_handle_standard_args` (libdw) does
14:02:52   not match the name of the calling package (Backward).  This can lead to
14:02:52   problems in calling code that expects `find_package` result variables
14:02:52   (e.g., `_FOUND`) to follow a certain pattern.
14:02:52 Call Stack (most recent call first):
14:02:52   src/memory_tools/vendor/bombela/backward-cpp/BackwardConfig.cmake:61 (find_package_handle_standard_args)
14:02:52   src/memory_tools/CMakeLists.txt:7 (find_package)
14:02:52 This warning is for project developers.  Use -Wno-dev to suppress it.
14:02:52 
14:02:52 CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
14:02:52   The package name passed to `find_package_handle_standard_args` (libbfd)
14:02:52   does not match the name of the calling package (Backward).  This can lead
14:02:52   to problems in calling code that expects `find_package` result variables
14:02:52   (e.g., `_FOUND`) to follow a certain pattern.
14:02:52 Call Stack (most recent call first):
14:02:52   src/memory_tools/vendor/bombela/backward-cpp/BackwardConfig.cmake:72 (find_package_handle_standard_args)
14:02:52   src/memory_tools/CMakeLists.txt:7 (find_package)
14:02:52 This warning is for project developers.  Use -Wno-dev to suppress it.
14:02:52 
14:02:52 CMake Warning (dev) at /usr/local/Cellar/cmake/3.17.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
14:02:52   The package name passed to `find_package_handle_standard_args` (libdwarf)
14:02:52   does not match the name of the calling package (Backward).  This can lead
14:02:52   to problems in calling code that expects `find_package` result variables
14:02:52   (e.g., `_FOUND`) to follow a certain pattern.
14:02:52 Call Stack (most recent call first):
14:02:52   src/memory_tools/vendor/bombela/backward-cpp/BackwardConfig.cmake:87 (find_package_handle_standard_args)
14:02:52   src/memory_tools/CMakeLists.txt:7 (find_package)
14:02:52 This warning is for project developers.  Use -Wno-dev to suppress it.
14:02:52 
14:02:52 ---
14:02:52 Finished <<< osrf_testing_tools_cpp [32.9s]
@wjwwood
Copy link
Member

wjwwood commented May 15, 2020

I'll look into it. I feel like I addressed this or something like it when I upgraded backward, but maybe I missed something, I did run CI on this change:

#45 (comment)

And it did not show up there:

https://ci.ros2.org/job/ci_osx/8402/

The only thing that I did to that CI was reduce to Fast-RTPS which I feel like should not have caused an issue.

@wjwwood
Copy link
Member

wjwwood commented May 15, 2020

Could it be a difference in the CI machines? This warning would be produced if certain libraries needed to produce stack traces were not installed. See:

https://github.com/bombela/backward-cpp#libraries-to-read-the-debug-info

So, I feel like these warnings are desired perhaps? I don't know if we have any explicit instructions for installing these dependencies or if they are in the package.xml or not. I'll look. Maybe we'd prefer to suppress the warning in this case.

@klintan
Copy link

klintan commented May 18, 2020

Not sure it is related but I couldn't build the latest master. Tag 1.3.0 works fine however. On MacOSX Mojave.
I get ld: library not found for -liberty for this package related to backward-cpp when trying to build from source on the latest Ros2 master.
Trying to build the latest master of backward-cpp I get the same issue.

Unfortunately I couldn't for my life figure out how to install libiberty on Mac, so created this: https://stackoverflow.com/questions/61863018/how-do-you-install-library-iberty-for-macos

But I might just go with 1.3.0 of this library, might be something locally since this is working on the CI ?

@dirk-thomas dirk-thomas changed the title Invocation of find_package_handle_standard_args with a different package name warns on macOS Invocation of find_package_handle_standard_args with a different package name warns with CMake 3.17 May 18, 2020
@dirk-thomas
Copy link
Contributor

The problem likely happens on all platforms as of CMake 3.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants