After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567597 - Build program of Anjuta should unset LD_LIBRARY_PATH
Build program of Anjuta should unset LD_LIBRARY_PATH
Status: RESOLVED DUPLICATE of bug 566704
Product: anjuta
Classification: Applications
Component: plugins: build-basic-autotools
unspecified
Other Linux
: Normal minor
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-13 13:19 UTC by Philip Van Hoof
Modified: 2011-09-11 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Van Hoof 2009-01-13 13:19:10 UTC
I noticed this as I had to install a new gtk to build and run Anjuta today.

What I did was install a gtk+glib in /opt/gtk. So I had to set LD_LIBRARY_PATH so that the gtk+ install would use glib in /opt/gtk/lib. Then I compiled an anjuta in /opt/anjuta. Yeh, I'm an /opt whore.

However, I was a bit surprised when I instructed my Anjuta to build my project, that it had taken over that LD_LIBRARY_PATH.

Of course that LD_LIBRARY_PATH is to get Anjuta up and running correctly, not for the projects that I build and run within Anjuta.

Presumably the build runs in a vte widget/environment which just took the environment variables from the program that runs it (Anjuta, in this case).

This will usually be okayish, but not always. Like in this case: it's hard for me now to get Anjuta to unset the LD_LIBRARY_PATH, and frankly, it's just confusing.

It's a development environment, so these things should be easy to access, modify and know by the developer.

I know it's a bit of whining but it does make the feature "Build project" and "configure project" again unusable for me. Meaning that I have to leave my IDE and retreat to my gnome-terminal again. Removing a lot of integration features like the build-warnings tat Anjuta offers me from my IDE-experience.

Please suck me into the IDE and help me with not ever having to use a gnome-terminal anymore. It makes me more productive and focused ;-). Hence this bug report.
Comment 1 Johannes Schmid 2009-01-13 20:32:07 UTC
Hmm, that's a quite tricky special case ;)

Actually, anjuta uses g_spawn_async_with_pipes() to start build processes. I assume we could somehow force it to use a default env, probably by passing "" instead of NULL for env but I am not so much an expert with UNIX env variables.
Comment 2 Sébastien Granjoux 2009-01-22 21:45:02 UTC
It shouldn't be very difficult to do.

I would like to keep the build plugin quite simple and avoid too many options. So I'm a bit annoyed to add an option to define environment variables in the build settings. On the other hand, allow to set only LD_LIBRARY_PATH seems too limited.
A third solution could be to create a new plugin allowing you to change environment variables, but it seems a bit complex for just a small feature.

What do you think ?
Comment 3 Sébastien Granjoux 2011-09-11 13:27:54 UTC
Due to the fix for the bug #566704, it is now possible to set environment variables in the configure step. You should be able to remove this LD_LIBRARY_PATH variable in your build environment and I think it fixes this issue.

*** This bug has been marked as a duplicate of bug 566704 ***