Setting the search path environment variable for shared libraries

Steve the Fiddle stevethefiddle at gmail.com
Mon Jun 29 00:55:42 BST 2020


On Sun, 28 Jun 2020 at 22:32, René J.V. Bertin <rjvbertin at gmail.com> wrote:

> On Sunday June 28 2020 20:25:26 Steve the Fiddle wrote:
>
> >wxWidgets is installed at "/opt/wxWidgets/lib/", and this is set in
> >"~/.bashrc" with:
> >"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/wxWidgets/lib/"
>
> A more proper way to work with this kind of install would be to add
> /opt/wxWidgets/lib to Audacity's rpath. Or, if any and all wxWidgets apps
> should use the libraries there you could add the location to ldconfig.
>

The version of wxWidgets required for this app is not available in my
distro (Xubuntu 18.04), so I only want to use this build of wxWidgets for
this project only.

I'd prefer to avoid modifying CMakeLists.txt because it's under version
control (and I'm not yet familiar enough with cmake)


>
> >It appears that kdevelop ignores LD_LIBRARY_PATH
>
> I think it's rather the contrary, i.e. that KDevelop resets that variable.
>
> >How do I tell kdevelop where to find wxWidgets so that I can launch and
> >debug from within kdevelop?
>
> IIRC you can associate an environment profile to your debug configuration,
> and set your variable(s) that way.
>

That's what I'm trying to do, but I can't get it to work, and I've not
found any documentation for how to.

I was guessing that I need to set it in:
"Settings > Configure kdevelop > Environment"
with:
Variable: LD_LIBRARY_PATH
Value: /opt/wxWidgets/lib/

and then select that Environment Profile in:
"Run > Configure Launches"

but that doesn't work.



>
> An alternative approach would be to launch Audacity like you would
> normally (except the debug build), and then attach KDevelop's debugger to
> the running process. This is typically faster if you're not debugging the
> startup phase itself, sometimes a lot faster.
>

Unfortunately that does not work if I launch Audacity from a shell script
(the only way so far that I can get it to launch from within kdevelop).

My thinking is that if I can set the "environment profile" correctly, then
Audacity should launch. Am I misunderstanding the "environment profile"
feature in kdevelop?

Steve


>
> R
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20200629/bf8171a0/attachment.htm>


More information about the KDevelop mailing list