| Branan Riley I did some digging through the CMakeLists files of Facter, Leatherman and Cpp-Hocon. It seems like the lib install directory for Faster is set here: https://github.com/puppetlabs/facter/blob/master/lib/CMakeLists.txt#L263 ^ What is interesting is that in 3.6.x and 3.9.x, that same line is https://github.com/puppetlabs/facter/blob/3.6.x/lib/CMakeLists.txt#L255 so will the changes required in FACT-1772 only apply to the “master” branch of Facter? The LIB_SUFFIX thing comes from Leatherman, which is used in the “leatherman_install” macro: https://github.com/puppetlabs/leatherman/blob/master/cmake/leatherman.cmake.in#L81-L91 (and here is where Facter uses it): https://github.com/puppetlabs/facter/blob/master/lib/CMakeLists.txt#L356 (for libfacter) https://github.com/puppetlabs/facter/blob/master/exe/CMakeLists.txt#L39 (for executable, dunno if this matters) The changes to specify a LIB_SUFFIX were made in this commit: https://github.com/puppetlabs/leatherman/commit/448dc6c71df95a84893407a4792efcd6ae52eab1 which go all the way back to Leatherman 0.12.x. From that commit, It seems like LIB_SUFFIX, as it is currently done, needs to be manually set in CMakeCache.txt. When I set LIB_SUFFIX to “64” there, things seem to work OK — libfacter is installed to lib64 (both libfacter.so and libfacter.so.3.9.5). This is also true for the other CPP components like Leatherman and Cpp-Hocon (their libraries are also installed to lib64). It looks like there are a set of sensible defaults we can use — https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html has them. CMAKE_INSTALL_LIBDIR gives us what we want (it is set to "lib64" on a Fedora 26 VM). If we switch to specifying our lib directory as CMAKE_INSTALL_LIBDIR, it would require quite a bit of changes. I think a sensible solution would be to strip out the "lib" part in CMAKE_INSTALL_LIBDIR and use that as the LIB_SUFFIX. Both solutions would require an extra parameter passed into cmake so that when we build the puppet-agent, things install to the /lib directory because that is where the agent expects to find everything. Of course, better solutions are welcome. |