Closed sthiele closed 11 months ago
You can fix the error by installing further libraries. See the following patch:
diff --git a/libclingo/CMakeLists.txt b/libclingo/CMakeLists.txt
index 1d70ba56..61bda5f1 100644
--- a/libclingo/CMakeLists.txt
+++ b/libclingo/CMakeLists.txt
@@ -67,7 +67,7 @@ if ((CLINGO_BUILD_SHARED OR CLINGO_INSTALL_LIB) AND NOT CLINGO_BUILD_WITH_PYTHON
if (CLINGO_BUILD_SHARED)
set_target_properties(libclingo PROPERTIES SOVERSION 4 VERSION 4.0)
else()
- list(APPEND clingo_targets libgringo libreify)
+ list(APPEND clingo_targets libgringo libreify ordered_map hopscotch_map sparse_map optional variant)
endif()
install(TARGETS ${clingo_targets}
The following command line for building clingo for static linking (paths may differ) used to work for older clingo versions.
cd "build" && CMAKE_PREFIX_PATH="" "cmake" "-Wdev" "--debug-output" "/home/sthiele/Projects/clingo-sys/clingo" "-DCLINGO_BUILD_SHARED=OFF" "-DCLINGO_BUILD_STATIC=ON" "-DCLINGO_MANAGE_RPATH=OFF" "-DCLINGO_BUILD_WITH_PYTHON=OFF" "-DCLINGO_BUILD_WITH_LUA=OFF" "-DCLINGO_INSTALL_LIB=ON" "-DCLINGO_BUILD_APPS=OFF" "-DCLASP_BUILD_APP=OFF" "-DCMAKE_INSTALL_PREFIX=/home/sthiele/Projects/clingo-sys/target/debug/build/clingo-sys-f58becaeaad2395c/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" "-Wno-dev"
But with clingo 5.6.2 I get the following error message.
To reproduce you can also run (you need the clingo build dependencies + rustc/cargo ect. installed)
The cmake relevant part in the build.rs is here: https://github.com/potassco/clingo-sys/blob/3b1c2619e96bc26b3ea8838b720f8f0f437d7884/build.rs#L48-L59