You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the option BENCHMARK_ENABLE_LIBPFM=On is used, the installed CMAKE files provide the necessary test to find libpfm when other software using cmake is being built with benchmark as a dependency.
However no requirement to include libpfm as a library is added to the pkgconfig benchmark.pc file is added.
So unless one manually appends -lpfm to the benchmark.pc line for Libs
when building software which uses benchmark via pkg-config eg movit (high-performance, high-quality video filters) the following error for undefined references to pfm_get_os_event and pfm_initialize occurs when linking
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: /var/tmp/root/BUILD/BUILD_movit_20250117_195233/ccAqTAKg.ltrans3.ltrans.o: in function `benchmark::internal::PerfCounters::Create(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
<artificial>:(.text+0x8445): undefined reference to `pfm_get_os_event_encoding'
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: <artificial>:(.text+0x894c): undefined reference to `pfm_initialize'
At first I tried appending -lpfm on the Libs.private line but that did not work but next test with it on the Libs line did work.
The text was updated successfully, but these errors were encountered:
When the option BENCHMARK_ENABLE_LIBPFM=On is used, the installed CMAKE files provide the necessary test to find libpfm when other software using cmake is being built with benchmark as a dependency.
However no requirement to include libpfm as a library is added to the pkgconfig benchmark.pc file is added.
So unless one manually appends -lpfm to the benchmark.pc line for Libs
when building software which uses benchmark via pkg-config eg movit (high-performance, high-quality video filters) the following error for undefined references to pfm_get_os_event and pfm_initialize occurs when linking
At first I tried appending -lpfm on the Libs.private line but that did not work but next test with it on the Libs line did work.
The text was updated successfully, but these errors were encountered: