2

On my development machine (Linux) I have not set LD_LIBRARY_PATH at all, as the libraries I'm using are either in default directories or I've added them to ld.conf.

But when I'm using Eclipse, my LD_LIBRARY_PATH is set to:

"/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:
/usr/lib/jvm/java-6-openjdk/jre/lib/i386:
/usr/lib/xulrunner-1.9.2.17:
/usr/lib/xulrunner-1.9.2.17"

(added line breaks for readability).

I don't mind xulrunner ones, but the OpenJDK causes my apps to load

/usr/lib/jvm/java-6-openjdk/jre/lib/i386/libjpeg.so

instead of

/usr/lib/libjpeg.so

Which lead to subsequent fail, as the one from OpenJDK is 6b, while I'm using libjpeg 8.

I know I can override LD_LIBRARY_PATH while compiling C++, but it fails as soon as I try to execute Python code linking the shared libraries I've just compiled.

How can I change this global LD_LIBRARY_PATH?

vartec
  • 131,205
  • 36
  • 218
  • 244

2 Answers2

1

Two methods come to mind:

  1. Remove libjpeg6b from the system and hope that OpenJDK will be happy with libjpeg8
  2. Recompile OpenJDK against libjpeg8
n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243
  • +1 for 1. suggestion, although not yet accepting that as an answer, because first, I'm not sure it it'll not break something else, secondly it isn't really an answer to the question, although helps with my problem. – vartec May 31 '11 at 21:55
1

Are you launching the Python from eclipse? You can set the LD_LIBRARY_PATH in the Run Configurations>Environment tab, so it overrides whatever you see as the default one.

Paul Webster
  • 10,614
  • 1
  • 25
  • 32
  • +1, as it's also valid suggestion. Problem with it, is that it's not global. Have to repeat this for each configuration. – vartec Jun 03 '11 at 08:58