BBN-Q/libaps

Older Linux versions (Centos 6) support

Opened this issue · 0 comments

The driver uses recent C++11 (threading in particular) feature and needs a recent compiler (gcc >= 4.7) to support that. Older more stable distributions of Linux might not support that out of the box. There appears to be no good solution.

Issues

  • some dependencies can be statically linked in (although cmake doesn't seem to like to make a shared library with static linking). More can be linked in using -static-libstdc++ -static-libgcc. However this doesn't capture the libc dependency
  • there was a breaking change in memcpy in glibc at 2.14 (see this post for details).
  • the most recent version of the ftd2xx drivers for Linux (1.1.12) were built against glibc 2.15. The old version (0.4.16) works with the older glibc
  • using r-paths (see this SO answer) is a nice solution be again only works for libstdc++ because so much else (Python e.g.) has already loaded the system libc

Solution Attempts

  • get a more recent gcc on the computer. Anaconda provides a good solution using the conda package manager
conda install gcc
conda install libgcc
conda install cmake
  • get HDF5 with C++ bindings installed; the default Anaconda ones are not but luckily there are some up-to-date ones on binstar
conda remove hdf5
conda install -c https://conda.binstar.org/osgeo hdf5
  • build with the Anaconda provided gcc
CC=gcc CXX=g++ cmake ../src
  • install the old FTDI ftdxx driver in /usr/local/lib
  • add everything to the LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/path/to/anaconda/lib/:/usr/local/lib

This gets reasonable far but fails because the FTDI seems to have swapped the SerialNumber and Description field. Further investigation is pending...