Conversation
Currently both shared and static libraries are built via duplicate calls to add_library, set_target_properties, target_link_libraries, etc. Typically only one of these is desired, and CMake provides a variable to control it: https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html This commit removes the explicit static libraries, and then removes the explicit "SHARED" from the remaining add_library(). The end result is that one type of library is installed, and it is controlled by the BUILD_SHARED_LIBS flag. Gentoo-bug: https://bugs.gentoo.org/982096
|
Please investigate and correct the build failures so this can be considered or withdraw it back to draft status until you can do so. |
|
The two linux failures look like missing It looks like the build script is pulling argtable3 directly from git... I'm going to revert the change and force-push to see if this has anything to do with this PR. |
|
More digging: the pkg-config file installed by argtable3 includes... which will get used when |
When the bundled argtable3 is used, the -lm flag from its pkg-config file is not picked up by the build system, and this can lead to link failures. Here we add it manually when BLISP_USE_SYSTEM_LIBRARIES is disabled.
8c2738f to
16e42af
Compare
|
The last push tries adding |
Add --verbose to each "cmake --build" command.
|
Same error somehow. I added |
|
When built with the bundled libs, the very last step should be to link blisp with an (it's easy to miss, but the -lm is there) |
|
It's including the Since the bundled |
Currently both shared and static libraries are built via duplicate calls to
add_library(),set_target_properties(),target_link_libraries(), etc. Typically only one of these is desired, and CMake provides a BUILD_SHARED_LIBS variable to control it.We noticed this on Gentoo where
BUILD_SHARED_LIBS=ONis passed by default, but static libraries were still installed.This commit removes the explicit static libraries, and then removes the explicit "SHARED" from the remaining
add_library(). The end result is that one type of library is installed, and it is controlled by theBUILD_SHARED_LIBSflag.To build static libraries rather than shared ones, you would now use
cmake -DBUILD_SHARED_LIBS=OFF .... A little more annoying if you want static libs, but it is the standard way of doing it.