Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liblabjackusb.so: undefined symbol: DigitalIO #100

Open
llarose opened this issue Sep 14, 2017 · 1 comment
Open

liblabjackusb.so: undefined symbol: DigitalIO #100

llarose opened this issue Sep 14, 2017 · 1 comment

Comments

@llarose
Copy link

llarose commented Sep 14, 2017

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

@davelopez01
Copy link
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 [email protected] .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants