pmemkv
pmemkv copied to clipboard
examples don't compile if TBB wasn't found using pkg-config
Please provide a reproduction of the bug:
If compile our examples standalone (which require pmemkv and it requires tbb) and tbb package is delivered without pkg-config file (*.pc) it fails to compile. It happened e.g. on OpenSuse Leap build here
How often bug is revealed:
It happens only on OSes which deliver TBB without pkg-config file.
Expected behavior:
Perhaps we could fix tbb dependency somehow, and if not maybe at least we should fix examples' CMake files to find tbb on their own.
confirmed also on Fedora 30
I have the same problem currently (pmemkv 1.4). Since TBB doesn't have a pkg-config file, it should not be listed in the Requires.private
field of pmemkv's pc file. Instead, it should either have 'L<path/to/tbb/lib> -ltbb
in the Libs
field , or not have it referenced at all and document that it is up to the user to add the proper flags for TBB.
Note however that TBB has cmake-config files installed to help find it, so if pmemkv could provide cmake-config files as well (which should be easy enough given that pmemkv is a cmake project) then linking against pmemkv would be much easier, at least for cmake projects.