There is a tutorial listed on the front page titled 'Time lapse astrophotography with INDI & Python' where Marcus Degenkolbe describes how to install and use the Python wrapper for INDI. I exactly followed the instructions to download, compile and install the wrappers and I get the following error message when starting the client:
indi@indi-VirtualBox:~/swig-indi-python$ python test-indiclient.py
Traceback (most recent call last):
File "test-indiclient.py", line 13, in <module>
import PyIndi
File "/usr/lib/python2.7/dist-packages/PyIndi.py", line 28, in <module>
_PyIndi = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/PyIndi.py", line 24, in swig_import_helper
_mod = imp.load_module('_PyIndi', fp, pathname, description)
ImportError: /usr/lib/python2.7/dist-packages/_PyIndi.so: undefined symbol: _ZN4INDI10BaseDevice11lastMessageB5cxx11Ev
It seems that the BaseDevice class doesn't have the method lastMessage() defined.
Any idea someone?
I run the Ekos VM 1.3 with all software updates applied.
I don't run the Ekos VM but normally the libindiclient.a should have been included in the module at link time. So if BaseDevice::lastMessage is in basedevice.h, it has been added by swig in the module, and it should be defined in /usr/lib/libindiclient.a. Could you try to check with
$ nm /usr/lib/libindiclient.a | grep lastMessage
0000000000003e78 T _ZN4INDI10BaseDevice11lastMessageEv
$ nm _PyIndi.so | grep lastMessage
000000000006b9c2 t _wrap_BaseDevice_lastMessage
0000000000083260 T _ZN4INDI10BaseDevice11lastMessageEv
This is what I get with fresh compilation of the module and indi from svn.
Well, that would have been strange if the library was included without this symbol.
But there is a difference here, if we de-mangle the symbol with c++filt. In your case the C++11 ABI is required:
So maybe you compile the python module with a C++11 strict compiler, or have a default option to do so (in the Ekos VM), and the indi library have been compiled with the old ABI. I use Fedora 22 and they keep the old ABI compatibility in gcc 5 as stated
here
. For the moment this is the only reason I see, but Swig is complex and I am not an expert with it.