Cmake on centos/rhel system installs to .../lib64 while on ubuntu it installs to .../lib

232 views Asked by At

I'm trying to compile triton inference server on centos/rhel instead of ubuntu. One problem I encounter is that I'll get the following error for some packages (e.g. protobuf, prometheus-cpp):

  Could not find a package configuration file provided by "Protobuf" with any
  of the following names:

    ProtobufConfig.cmake
    protobuf-config.cmake

  Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
  "Protobuf_DIR" to a directory containing one of the above files.  If
  "Protobuf" provides a separate development package or SDK, be sure it has
  been installed.

I already figured out that on ubuntu many packages get installed under .../lib/cmake/.../*config.cmake while on centos/rhel they get installed to .../lib64/cmake../*config.cmake.

I'm wondering if there is an easy way to tell cmake to install everything under lib/cmake also on centos.

I've also tried to "go the other way around" and set search paths for specific packages to lib64 (e.g. I changed this and this line of code from .../lib/cmake/... to .../lib64/cmake/...) but when third party modules from other repositories are cloned I face the same issue.

So ideally, I'd like an easy way to tell cmake in the "main" CMakeLists.txt (there are multiple CMakeLists.txt and some get generated through make later in the build process) that everything should be installed to lib.

Thanks!

0

There are 0 answers