cmake build: Linking problem when building usenet-utils tests
Pan version: 0.157
When using cmake and enabling gnutls
, building the tests in usenet-utils leads to linker errors indicating missing symbols from gnutls
and pan-cc-gui
that are fixed by the following patch (note that pan-cc-gui
needs to be linked against irrespective of whether gnutls
is enabled):
Index: pan-v0.157/pan/usenet-utils/CMakeLists.txt
===================================================================
--- pan-v0.157.orig/pan/usenet-utils/CMakeLists.txt
+++ pan-v0.157/pan/usenet-utils/CMakeLists.txt
@@ -22,6 +22,10 @@ set(test-programs gnksa-test numbers-tes
foreach(test ${test-programs})
add_executable(${test} ${test}.cc)
- target_link_libraries(${test} usenet-utils generalutils ${GMIME_LIBRARIES} ${GLIB_LIBRARIES})
+if(HAVE_GNUTLS)
+ target_link_libraries(${test} usenet-utils generalutils pan-cc-gui ${GMIME_LIBRARIES} ${GLIB_LIBRARIES} ${GNUTLS_LIBRARIES})
+else()
+ target_link_libraries(${test} usenet-utils generalutils pan-cc-gui ${GMIME_LIBRARIES} ${GLIB_LIBRARIES})
+endif()
add_test(NAME ${test}-test COMMAND ${test})
endforeach()
These tests are not built when using the autotools build, I understand, so no such issues show up.
There are a few other issues we noticed when trying to switch over our openSUSE RPM package for pan from autotools to cmake based builds (we reverted back to autotools for now):
- Help and man files are not installed (done when using autotools)
- Translations not installed as
pan.mo
(the equivalent of autotools doingmsgfmt
, followed by "installing am.gmo as /usr/share/locale/am/LC_MESSAGES/pan.mo")
Thanks for the very useful app.