How to install two versions of libftd2xx

As it was published before 64-bit libftd2xx.so libraries version 1.0.0 and above are not compatible with earlier ones. There are no problems with 32-bit libraries.
It is necessary to install old libftd2xx package for 64-bit avreal/Linux. The package can be downloaded from here.
AVReAl beginning from 1.28r6 loads the library by name libftd2xx.so.0 but not libftd2xx.so. That allows to install both library versions.
Let review installation process.

Installation:
1. unzip and untar the file given to a suitable directory
tar -xzvf libftd2xx0.4.16.tar.gz

2. As root user copy the following files to /usr/local/lib
cp libftd2xx.so.0.4.16 /usr/local/lib

3. Change directory to /usr/local/lib
cd /usr/local/lib

4. make symbolic links to these files using the following commands:
ln -s libftd2xx.so.0.4.16 libftd2xx.so
ln -s libftd2xx.so.0.4.16 libftd2xx.so.0

5. Change directory to /usr/lib
cd /usr/lib

6. make symbolic links to these files using the following commands:
ln -s /usr/local/lib/libftd2xx.so.0.4.16 libftd2xx.so

Library file name contains version number: libftd2xx.so.0.4.16. Symbolic links with short names are created in steps 4 and 6. Short name libftd2xx.so is used for library loading by all programs. Changing the links anybody can switch programs from one library version to another.
Additional symbolic link with major version number can be created: libftd2xx.so.0. Using the link some program can load older version like 0.4.16 or 0.4.12.
So, installation process for version 0.4.16 is quoted above and the process for version 1.0.4 is quoted below. Operations to be added in both processes are typed in green. Operations to be done for one of libraries are typed in red. This one will be treated as “main” and all programs will use it.

Installation:
1. unzip and untar the file given to a suitable directory
tar -xzvf libftd2xx1.0.4.tar.gz

2. Change directory to the required architecture subdirectory, build/i386 for 32-bit or build/x86_64 for 64-bit.

3. As root user copy the following files to /usr/local/lib
cp libftd2xx.so.1.0.4 /usr/local/lib

3. Change directory to /usr/local/lib
cd /usr/local/lib

4. make symbolic links to these files using the following commands:
ln -s libftd2xx.so.1.0.4 libftd2xx.so
ln -s libftd2xx.so.1.0.4 libftd2xx.so.1

5. Change directory to /usr/lib
cd /usr/lib

6. make symbolic links to these files using the following commands:
ln -s /usr/local/lib/libftd2xx.so.1.0.4 libftd2xx.so

Thus, libftd2xx files on my PC are:

real@real:/usr/local/lib$ ls -l libftd2*
lrwxrwxrwx 1 root root     18 2011-03-22 20:04 libftd2xx.so -> libftd2xx.so.1.0.4
lrwxrwxrwx 1 root root     19 2010-03-21 09:03 libftd2xx.so.0 -> libftd2xx.so.0.4.16
-rwxr-xr-x 1 root root 339873 2010-03-14 18:31 libftd2xx.so.0.4.16
lrwxrwxrwx 1 root root     18 2010-12-27 22:19 libftd2xx.so.1 -> libftd2xx.so.1.0.4
-rwxr-xr-x 1 root root 429158 2010-12-27 21:52 libftd2xx.so.1.0.0
-rwxr-xr-x 1 root root 449896 2011-03-22 20:04 libftd2xx.so.1.0.4
real@real:/usr/local/lib$ cd /usr/lib
real@real:/usr/lib$ ls -l libftd2*
lrwxrwxrwx 1 root root 33 2011-03-22 20:09 libftd2xx.so -> /usr/local/lib/libftd2xx.so.1.0.4
real@real:/usr/lib$

avreal64-1.28r6 (and newer) uses libftd2xx.so.0.4.16 by name libftd2xx.so.0. All other programs, for example, samples from FTDI, use libftd2xx.so.1.0.4 by name libftd2xx.so.

Leave a Reply

[flagcounter image]