Author Topic: LD_LIBRARY_PATH  (Read 5889 times)

glimt

  • Community Member
  • Posts: 15
  • Hero Points: 0
LD_LIBRARY_PATH
« on: January 30, 2011, 08:26:52 am »
What's the best way to manage the LD_LIBRARY_PATH inside of Slickedit?

Specifically, I'm trying to "execute" my application, which depends on two libraries that are generated via the build process in separate directories.  I need to add the separate directories so the dynamic libs can be found at runtime.  I tried setting an environment variable via the "Advanced" option in the Project Properties, but it didn't work.  I added it bash style LD_LIBRARY_PATH w/ a value of ${LD_LIBRARY_PATH}:~/dev/my/other/path but this doesn't seem to be picked up by the VS Shell that's used when the application is executed.

I also tried adding it to my .bashrc file (not my preference), but Slickedit didn't pick it up.  I am able to execute my app via a BASH shell this way though.

I'd like to execute the application from withing SlickEdit.  I'm not sure where to go from here though.

Craig
« Last Edit: January 31, 2011, 12:05:12 am by glimt »

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: LD_LIBRARY_PATH
« Reply #1 on: January 30, 2011, 10:24:23 pm »
Hi.

I never knew it could be done that way. I have in the past set the environment in the workspace properties using the form VAR=value. You can then launch an OS shell from with SE (tools menu) to test them.

Cheers,
--
Greg.

DKLind

  • Community Member
  • Posts: 18
  • Hero Points: 0
Re: LD_LIBRARY_PATH
« Reply #2 on: February 03, 2011, 08:45:41 pm »
I have set the LD_LIBARY_PATH in the environment variables under 'Advanced' in the project for 'Execute' option. For the boost libraries for example I set Set LD_LIBRARY_PATH=/opt/thisbox/lib.

The problem I am having is I am trying to debug an executable that requires boost. But then I get the following error.

Quote
VSLICKERRORPATH=/home/dlind/Source/C4Software/trunk/SubAgent/MIBTo
vsdebugio -prog "./mibto"
/bin/bash: vsdebugio: command not found


glimt

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: LD_LIBRARY_PATH
« Reply #3 on: February 03, 2011, 09:10:11 pm »
When I was searching for answers to my LD_LIBRARY_PATH question, I saw 3-4 threads addressing the issue with debugging.


john.dehelian

  • Junior Community Member
  • Posts: 9
  • Hero Points: 1
Re: LD_LIBRARY_PATH
« Reply #4 on: March 07, 2011, 01:48:54 pm »
I'm having what I believe is a similar problem. I'm trying to set a path to perforce. Under bash the path is:
PATH=/home/john/Perforce/bin:/home/john/CodeSourcery/Sourcery_G++_Lite/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

But in the slickedit shell it is:
PATH=/home/john/CodeSourcery/Sourcery_G++_Lite/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

I cannot find a way to make them both the same. I tried using the above method with
set PATH=$PATH:/home/john/Perforce/bin
But then the rest of the original path was squashed and of course nothing worked in the shell any more.

glimt

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: LD_LIBRARY_PATH
« Reply #5 on: March 07, 2011, 05:12:33 pm »
I never received a reply from SE on how to set the path with their shell.  They advised that I use bash as my shell instead (after which my path worked).


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6490
  • Hero Points: 507
Re: LD_LIBRARY_PATH
« Reply #6 on: March 08, 2011, 02:04:31 pm »
The SlickEdit shell is called secsh and uses csh syntax. Sometimes I forget which shell uses which syntax. What I do is go to the SlickEdit command line (not build shell command line) and type "set myvar=some value". This dumps the correct command in the build shell. It also has an additional side effect of modified the editors environment variables which you may or may not want to do.

Setting the environment variable using the Advanced button or project properties should have worked but there's a bug in vsbuild.  The beta version and v16 will have a fix for this.

You need a fix for vsbuild in v15.  http://community.slickedit.com/index.php?topic=6766.0;topicseen