undefined symbol: DigitalIO | LabJack undefined symbol: DigitalIO

4 posts / 0 new
Last post
llarose's picture undefined symbol: DigitalIO

I got an installation and library issue.

I followed these installation steps for an installation on ubuntu 16.04.

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

$ 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/", line 2506, in digitalIO
    def getFirmwareVersion(self, idNum=None):
  File "/usr/lib/python2.7/ctypes/", line 375, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python2.7/ctypes/", line 380, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/ 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 | grep DigitalIO
00000000000091a9 T DigitalIO

This shows that the lib was generated correctly.

How come loads the since it does not have the DigitalIO function declaration and implementation ?
(see line 348) . Should the function _loadLinuxSo() load instead of !?

It this a bug ?

Does anyone have encounter this ?

LabJack Support
LabJack Support's picture
U12 support in the

U12 support in the LabJackPython u12 module was implemented before ljacklm was available, and currently only uses labjackusb (Exodriver). Functions from ljacklm, such as DigitalIO, are unavailable in the u12 module on MacOS and Linux. Use the raw version, rawDIO, instead. The U12 module description discusses UW, "e", and low-level (raw) functions.

llarose's picture


Thank for your great answer. 

We choose labjack for its python support since it a easy portable language between OS (Window, Ubuntu, etc)
This issues can be mark as a bug that you guys needs to fix to follow the principle of portable library in python. 

Your proposal is a workaround that breaks our internal tool portability. 

We have open an thread about this in stack overflow :

And I've opened a issue in your github project :

LabJack Support
LabJack Support's picture
If you need an immediate

If you need an immediate solution, you may want to do something like this:

if sys.platform.startswith("win32"):
    #Use DigitalIO
    #Use rawDIO

There is no timeline on when I can look into updating the u12 module, but maybe soon.