jsonnet
jsonnet copied to clipboard
Shared libjsonnet++ not linked against libjosnnet
If you have a stricter linker, who does not like unresolved symbols in a shared library (which is always a bad idea), the build will fail when generating libjsonnet++.so.0.15.0.
Possible fix:
--- cpp/CMakeLists.txt
+++ cpp/CMakeLists.txt 2020/03/06 11:50:35
@@ -38,6 +38,9 @@
add_library(libjsonnet++_for_binaries ALIAS libjsonnet++_static)
endif()
+add_dependencies(libjsonnet++ jsonnet)
+target_link_libraries(libjsonnet++ libjsonnet)
+
# Tests
function(add_test_executablepp test_name)
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${test_name}.cpp)
Thanks for reporting. We should do something about it.
Hi, just a note that adding target_link_libraries(libjsonnet++ libjsonnet)
(the other was already present) as mentioned in the OP fixed a linking error for me on aarch64-darwin.
See https://github.com/NixOS/nixpkgs/issues/239912
Thanks for reporting this! It looks like the necessary target_link_libraries
command was added with PR #1113 (November 2023). I'll close this as complete.