×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Time lapse astrophotography with INDI/Python issue

  • Posts: 5
  • Thank you received: 0
Hi,

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.

Thanks!

- Edouard
8 years 7 months ago #4723

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88
Hi,

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.
8 years 7 months ago #4729

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
Thanks for your answer geehalel.

I get the exact same result as you with nm.

I'm not sure what to think besides dumping the Ekos VM and starting from scratch and install everything...

- Edouard
8 years 7 months ago #4746

Please Log in or Create an account to join the conversation.

  • Posts: 226
  • Thank you received: 88
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:
$ c++filt _ZN4INDI10BaseDevice11lastMessageB5cxx11Ev
INDI::BaseDevice::lastMessage[abi:cxx11]()
Not in my case:
$ c++filt _ZN4INDI10BaseDevice11lastMessageEv
INDI::BaseDevice::lastMessage()
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.
The following user(s) said Thank You: Jasem Mutlaq, Edouard Boily
8 years 7 months ago #4754

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
Makes sense.

I'll get Fedora (probably 20 because of IRAF) and I'll reinstall INDI. I'll see where it goes from there.

Thanks a lot for your help!
8 years 7 months ago #4832

Please Log in or Create an account to join the conversation.

Time to create page: 0.714 seconds