`FindTBB.cmake` cannot find correct TBB library.
gnaggnoyil opened this issue · comments
Expected Behavior
After enabling HPX_WITH_EXAMPLES_TBB
option at configuration time, the test tbb_homogeneous_timed_task_spawn
specified in tests/performance/local/CMakeLists.txt
should be built and be tested when invoking CTest
.
Actual Behavior
The test tbb_homogeneous_timed_task_spawn
is not invoked during CTest
Steps to Reproduce the Problem
mkdir -p <hpx_source_dir>/build && cd <hpx_source_dir>/build
cmake -DHPX_WITH_EXAMPLES_TBB=ON ..
In this step the following warning message appears:-- Nice threadlevel is disabled. -- Stack traces are enabled. CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (TBBmalloc) does not match the name of the calling package (TBB). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): cmake/FindTBB.cmake:44 (find_package_handle_standard_args) CMakeLists.txt:1365 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Could NOT find TBBmalloc (missing: Tbb_LIBRARY) -- Compiling with the native toolset -- Performing Test HPX_WITH_CXX11_ATOMIC - Success
cmake --build .
ctest | grep tbb_homogeneous_timed_task_spawn
Nothing to output from stdout.
Specifications
- HPX Version: current master (5898e7e)
- Platform (compiler, OS): Archlinux, with the following packages installed from Arch offical repo:
pacman -Qs | grep -E '(/gcc )|(/onetbb )|(/cmake )' local/cmake 3.29.5-2 local/gcc 14.1.1+r58+gfc9fb69ad62-1 local/onetbb 2021.12.0-2
- The contents of file
/usr/lib/pkgconfig/tbb.pc
from packageonetbb
is:# Copyright (c) 2021-2023 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. prefix=/usr libdir=${prefix}/lib includedir=${prefix}/include Name: oneAPI Threading Building Blocks (oneTBB) Description: C++ library for parallel programming on multi-core processors. URL: https://github.com/oneapi-src/oneTBB Version: 2021.12.0 Libs: -L${libdir} -ltbb Cflags: -I${includedir}
We should probably remove this example and the (optional) dependency on TBB. This code has not been looked at in over 10 years, IIRC.