0

I'm having a problem with a program (quartus) running on my ubuntu machine. I'm getting the following error.

quartus: symbol lookup error: /usr/lib/i386-linux-gnu/libXi.so: undefined symbol: XESetWireToEventCookie

I have the correct libXi.so.6.0.0 file but no matter where I put it, the OS won't use it unless I apt-get remove libxi-dev, but a lot of software uses this libXi. What I want to do is add some sort of exception to the dynamic linker so that quartus uses the libXi.so that it needs and everything else still uses the one in /usr/lib/i386-linux-gnu.

Thanks!

1 Answer 1

2

You should be able to create a shell script wrapper, as detailed in this article, and make use of the LD_LIBRARY_PATH trick, so that you can launch your program and make sure that it is the only program to use the different shared library. Do not put it in your .bashrc, as you only want it to temporarily set the environmental variable. Launching your program with this shell script wrapper is probably the easiest way to deal with these sorts of issues to do with conflicting shared libraries.

#!/bin/bash
export LD_LIBRARY_PATH="/path/to/lib/:$LD_LIBRARY_PATH"
/path/to/my/program

The second line of the script sets the library and the last line launches the program.

As noted here, you can first run the above export line in terminal, and then run

ldd /path/to/my/program 

to check that it is loading the correct libraries.

1
  • 1
    Ah yes, this makes sense and it would work except that the ldd tool doesn't recognize this as a dynamic executable. I'm guessing here, but I think that somehow, the executable is using absolute pathing (or at the very least it isn't using LD_LIBRARY_PATH) because no matter what I set my LD_LIBRARY_PATH to it always tries to use the shared object down in /home/local/i386-linux-gnu/libXi.so . So what I did is write a horible script that replaces the symbolic link to libXi.so with a link to the correct library, runs the program, then replaces the link with the original again.
    – Josh
    Oct 12, 2012 at 23:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .