Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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 '12 at 23:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.