Author Topic: ConsoleRunner and Intel Compiler  (Read 3137 times)

thepat

  • Guest
ConsoleRunner and Intel Compiler
« on: January 13, 2008, 09:48:07 pm »
Hi,

maybe this is kind of interesting for others too. Running a console application from cb in linux will (in my experience) not work when you are using an Intel Compiler. This behaviour was already spotted out there http://forums.codeblocks.org/index.php/topic,2769.0.html with no answer. The problem is that the environment variable LD_LIBRARY_PATH (even if set) is not available in the consoleRunner xterm. The surprise is that all other variables are there. It seems LD_LIBRARY_PATH is "catched" anywhere in the chain of calling the consoleRunner from cb because if you start the consoleRunner manually from another terminal it works perfectly. Since Intel compiled programms need the libs under /opt/intel/cc/xxxxxxx/lib you can't run them without the env-var.

The quick and dirty hack for this is to include the call (you maybe have to change the path)

Code
setenv("LD_LIBRARY_PATH","/opt/intel/cc/10.1.008/lib",1);


into the file $ROOT/trunk/src/tools/ConsoleRunner/main.cpp directly before the int ret=system(cmdline) call in line 108.

But since I believe that you can either set this stuff anywhere in cb and I'm just too stupid or the problem is in the wxExecute call there should be a better way to solve this. Does anyone has a clue?

Cheers
Patrick