rgleason / celestial_navigation_pi

celestial navigation plugin for opencpn
GNU General Public License v3.0
10 stars 6 forks source link

Flatpak: unresolved symbols, plugin does not load. #8

Closed leamas closed 3 years ago

leamas commented 3 years ago

Trying to use the current builds at cloudsmith.io I get the following in the logfile:

17:38:05.322 MESSAGE pluginmanager.cpp:1167 Found 2 candidates
17:38:05.322 MESSAGE pluginmanager.cpp:1174 Checking plugin candidate: /home/mk/.var/app/org.opencpn.OpenCPN/lib/opencpn/libcelestial_navigation_pi.so
17:38:05.322 MESSAGE pluginmanager.cpp:2124 Plugin is compatible by elf library scan: true
17:38:05.322 MESSAGE pluginmanager.cpp:2232 PlugInManager: Loading PlugIn: /home/mk/.var/app/org.opencpn.OpenCPN/lib/opencpn/libcelestial_navigation_pi.so
17:38:05.323   ERROR dlunix.cpp:162 /home/mk/.var/app/org.opencpn.OpenCPN/lib/opencpn/libcelestial_navigation_pi.so: undefined symbol: _ZTV13TiXmlDocument
17:38:05.323 MESSAGE pluginmanager.cpp:2291    PlugInManager: Cannot load library: /home/mk/.var/app/org.opencpn.OpenCPN/lib/opencpn/libcelestial_navigation_pi.so

Practical result is that plugin does not load and is unusable.

leamas commented 3 years ago

This could probably be fixed by following patch, which bundles tinyxml on all platforms:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c0ebbe..1b4454e 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,13 +185,11 @@ set(LIBHDRS
        )

-IF(WIN32)
 SET(SRC_TINYXML
             src/tinyxml/tinyxml.cpp
             src/tinyxml/tinyxmlparser.cpp
             src/tinyxml/tinyxmlerror.cpp
 )
-ENDIF(WIN32)

 set(EXTINCLUDE extinclude/nlohmann/json.hpp extinclude/ODAPI.h)
leamas commented 3 years ago

I find it hard to work with the testplugin setup. Hopefully , someone skilled could test this patch.

leamas commented 3 years ago

Fixed in #9. Closing.