Skip to content

liblabjackusb.so: undefined symbol: DigitalIO #100

Open

Description

@llarose

I got an installation and library issue.

I followed these installation steps for an installation on ubuntu 16.04.
https://labjack.com/support/software/installers/exodriver/mac-and-linux/...

The following code brings me to an undefined symbol for DigitalIO in the liblabjackusb.so

$ python
>>> import u12
>>> d =u12.U12()
>>> d.digitalIO(idNum=-1, demo=0, trisD=3, trisIO=0, stateD=0, stateIO=0, updateDigital=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/u12.py", line 2506, in digitalIO
    def getFirmwareVersion(self, idNum=None):
  File "/usr/lib/python2.7/ctypes/__init__.py", line 375, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 380, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/liblabjackusb.so: undefined symbol: DigitalIO

I was looking around for the DigitalIO implementation and i found it in ljacklm.h and ljacklm.c.

$cd ljacklm/libljacklm
$ nm ljacklm.o | grep DigitalIO
0000000000007489 T DigitalIO
$ nm libljacklm.so.1.20.2 | grep DigitalIO
00000000000091a9 T DigitalIO

u12.py loads the liblabjackusb.so but it should load the ljacklm.so.1.20.2 (see u12.py line 348) .

There is forum discussion on labjack about this issue:
https://labjack.com/forums/u12/liblabjackusbso-undefined-symbol-digitalio#comment-form

There is also a stackoverflow question about it :
https://stackoverflow.com/questions/46206357/liblabjackusb-so-undefined-symbol-digitalio#46220124

Activity

  1. davelopez01 commented on Sep 15, 2017

    @davelopez01
    Collaborator

    Take a look at the LabJack Forum discussion you linked to for my original response to this and a workaround to try for now. To add to that, you could make a single digital I/O function that uses the workaround.

    Current functionality is that some functions are cross-platform as mentioned in the u12.py module doc, but not ljacklm/ljackuw functions like digitalIO since u12.py was implemented before they were available on Linux/MacOS.

    I will put ljacklm function support in u12.py on my todo list, but note that U12 development is low priority so there is no timeline on when this will be fully implemented. I did some coding today, and this is not a simple fix without breaking existing raw functions. If you need a quick u12.py fix where only ljacklm functions are working but not raw functions, email me at support@labjack.com .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions