« Close

Datasheets and User Guides

Software & Driver

 

In-depth Build Instructions

In-depth Linux Build Instructions

Modern Linux distributions come with a binary release of libusb-1.0, so building the Exodriver is easier than ever. Install the dependencies with your package manager, checkout the Exodriver source code, and build/install it. Here are the complete steps when using Ubuntu or Debian based distributions, along with a handful of steps at the end that build LabJackPython, which is our Python module that works well with the Exodriver:


$ sudo apt-get install build-essential
$ sudo apt-get install libusb-1.0-0-dev
$ sudo apt-get install git-core
$ git clone git://github.com/labjack/exodriver.git
$ cd exodriver/
$ sudo ./install.sh
$ cd ..
$ git clone git://github.com/labjack/LabJackPython.git
$ cd LabJackPython/
$ sudo python setup.py install
$ python
>>> import u3
>>> d = u3.U3()
>>> d.configU3()
   

For other non-Ubuntu and Debian based distributions, use their package manager and their libusb-1.0 development package name. For example, in Fedora the package manager is "yum" and the libusb-1.0 development package is "libusbx-devel".

It is recommended to use package managers for libusb-1.0 installation for system compatibility. If needed, libusb-1.0 can be built from the source. Download the source from GitHub. Version 1.0.22 is the latest as of March 2018. Build it in the standard way:


$ tar xvfj libusb-1.0.22.tar.bz2 
$ cd libusb-1.0.22/
$ ./autogen.sh
$ make
$ sudo make install
   

Note that in older libusb-1.0 versions, the configuration step is done with "./configure" instead of "./autogen.sh".

In-depth Mac OS X Build Instructions

We provide an installer for the Exodriver which includes prebuilt Exodriver and libusb-1.0 binaries. The Exodriver and libusb-1.0 can also be built and installed from source which this section will go over.

Download Xcode and install it if you don’t have it already.

libusb-1.0 is required by the Exodriver and can be built from the source. Download the source from GitHub. Version 1.0.22 is the latest as of March 2018. Build it in the standard way:

  
$ tar xvfj libusb-1.0.22.tar.bz2 
$ cd libusb-1.0.22/
$ ./autogen.sh
$ make
$ sudo make install
   

Note that in older libusb-1.0 versions, the configuration step is done with "./configure" instead of "./autogen.sh".

After installing libusb-1.0, install the Exodriver as described in the Quickstart.

Optional: Build a combined 32-/64-bit Exodriver on Mac OS X

These steps are generally not needed, but there are circumstances that require a combined 32-bit and 64-bit Exodriver. You need both architectures when you get error messages like the one in this LabJack forum topic

  
dlopen(liblabjackusb.dylib, 6): no suitable image found.  Did find:
    /usr/local/lib/liblabjackusb.dylib: mach-o, but wrong architecture
   

In this case, a 32-bit process tried to load a 64-bit Exodriver. Here’s how it happened: When following the instructions in the Quickstart, the compiler built a copy of the Exodriver for its native architecture. On modern Mac OS X systems, that’s x86_64 (64-bit). Verify this by running:

  
$ file /usr/local/lib/liblabjackusb.dylib 
/usr/local/lib/liblabjackusb.dylib: Mach-O 64-bit dynamically linked shared library x86_64
   

Normally, this is what you want. The programs you will use to call the Exodriver will also be 64-bit. The built-in Python on Mac OS X, for example, is compiled for three architectures, including x86_64:

  
$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 3 architectures
/usr/bin/python (for architecture x86_64):  Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386):    Mach-O executable i386
/usr/bin/python (for architecture ppc7400): Mach-O executable ppc
   

There are some programs on Mac OS X, though, that are not 64-bit (they’re i386 only), and they can’t load a 64-bit Exodriver. The Python download from python.org, for example, is 32-bit at the time of this writing. We recommend using the built-in Python on Mac OS X.

When you must load the Exodriver from a 32-bit process, you must compile libusb-1.0 and the Exodriver to be combined 32-/64-bit libraries. Start with libusb-1.0

  
$ tar xvfj libusb-1.0.19.tar.bz2 
$ cd libusb-1.0.19/
$ export CFLAGS="-arch i386 -arch x86_64"
$ ./configure --disable-dependency-tracking
$ make
$ sudo make install
   

Confirm it worked by running:

  
$ file /usr/local/lib/libusb-1.0.dylib
/usr/local/lib/libusb-1.0.dylib: Mach-O universal binary with 2 architectures
/usr/local/lib/libusb-1.0.dylib (for architecture i386):    Mach-O dynamically linked shared library i386
/usr/local/lib/libusb-1.0.dylib (for architecture x86_64):  Mach-O 64-bit dynamically linked shared library x86_64
   

After libusb-1.0 is installed correctly, move on to the Exodriver. Download the source link on GitHub. Find the Exodriver download directory

  
$ cd path/to/exodriver
$ cd liblabjackusb/
   

Now edit the Makefile in a text editor to comment out (put a # sign in front of) this ARCHFLAGS line:

  
#ARCHFLAGS =
   

and uncomment (remove the # sign from) this ARCHFLAGS line two lines above it:

  
ARCHFLAGS = -arch i386 -arch x86_64
   

Now build and install the software

  
$ cd ..
$ sudo ./install.sh
   

Verify that it worked by running:

  
$ file /usr/local/lib/liblabjackusb.dylib 
/usr/local/lib/liblabjackusb.dylib: Mach-O universal binary with 2 architectures
/usr/local/lib/liblabjackusb.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/usr/local/lib/liblabjackusb.dylib (for architecture x86_64):   Mach-O 64-bit dynamically linked shared library x86_64
   

Because libusb-1.0 and the Exodriver are built for the i386 architecture, 32-bit applications can load them.