Closed bobpaw closed 1 week ago
Looks good. Thank you.
What is the issue with relinking and
$ORIGIN
? Is that for capstone?
Yes. Capstone builds SCOREC/core and provides the shared libraries with capstone. That capstone library can be linked again to SCOREC (which will be especially necessary if the plugin is provided by default), but the issue I was having was that ld would find the shared libraries (ma.so, mds.so, gmi.so) in the capstone folder instead of the ones I had installed and built (with cmake --install
). Using the build tree was easy, but trying to use the install tree was having this lib64
issue due to relinking.
I see a handful of locations in bob.cmake where
lib
is used explicitly. I'm guessing those should also be changed.
I believe those are only CMake targets. I don't know the convention, but the Capstone package includes those in lib
.
Thank you. I think I get the gist of the capstone problem.
It looks like the Professional CMake book (19th edition) suggests having a consistent directory for the libraries, \<packageName>Config.cmake, and target files.
The install destination of that file (\<packageName>Config.cmake) should use the variables defined by the GNUInstallDirs, which simplifies customization by Linux distributions and other packaging systems. [pg 541]
I didn't find a direct quote for the target files, but all the examples I could find (see pg 524) use the GNUInstallDirs variables.
I can help with these modifications and testing if needed.
Ok, that makes sense. I will update the remaining lib
to be CMAKE_INSTALL_LIBDIR
. I will also update bin
per the same guideline.
Thank you. I'm going to add a CI test to check that downstream packages can use our cmake package successfully.
@bobpaw Can you rebase on develop? It now has a CI test for a user build using the installed cmake config file?
Thank you. The new test ran without issues.
https://github.com/SCOREC/core/actions/runs/10755354998/job/29826921049?pr=451#step:7:1
Set bob install dir to CMAKE_INSTALL_LIBDIR