Closed ivareri closed 6 years ago
Might be partly solvable by using pkg-config see https://github.com/la1k/flyby/commit/2982b8d55c5cd88ff9d59c345c8268b508d1c6d0. Unfortunately, /usr/local/lib64/pkgconfig is not in the search path of stock pkg-config on Arch Linux (tested with Antergos). Corresponding libpredict related fix for the pkg-config file to work with Archs '/usr/local/lib64' issue can be found in https://github.com/la1k/libpredict/pull/81.
looks like pkg-config is looking for .pc files related to a default path but can be augmented with the PKG_CONFIG_PATH
environment variable:
PKG_CONFIG_PATH A colon-separated (on Windows, semicolon-separated) list of directories to search for .pc files. The default directory will always be searched after searching the path; the default is libdir/pkgconfig:datadir/pkgconfig where libdir is the libdir for pkg-config and datadir is the datadir for pkg-config when it was installed.
so an export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
before you call cmake in your build directory will resolve the problem once https://github.com/la1k/libpredict/issues/82 is fixed in libpredict
.
Mainly an archlinux path problem in that they have removed /usr/local/* from their paths but still let CMAKE_INSTALL_PREFIX
point to /usr/local/. Since https://github.com/la1k/libpredict/issues/82 is closed, and flyby now uses pkgconfig, it should at least be easier now to work around the issue without having to install directly into /usr/.
Would recommend using PKG_CONFIG_PATH=[path to libpredict install dir/pkgconfig] cmake ..
, which will make the PKG_CONFIG_PATH variable local to this specific cmake instance. CMake will then set all relevant paths in CMakeCache.txt
and everything will be fine and dandy.
Pkgconfig also seems to make it link against the library files in a very magic way, so that you don't get linker errors when libpredict.so-files are located in non-standard paths, and don't have to care about LD_PRELOAD-variables. Closing this for now.
ld is unable to find libpredict on archlinux when it is installed to /usr/local/lib. ldconfig is able to find the library.
Can be solved by using
find_library()
in CMakeLists.txt