Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm working on a piece of software that needs to compile against a very modern version of glib, but also needs to run on Ubuntu 11.10 (which doesn't come with that version). My first thought was to just backport and replace glib, since the versions are theoretically compatible, but it causes some problems (most noticably with Unity not working right).

I know that the obvious solution is to use Ubuntu 12.04, but I don't have that option right now (working on it though).

Is there any sane way to handle this? Right now I'm looking at just compiling glib, taring it, and then manually setting C_INCLUDE_PATH and LD_LIBRARY_PATH. Unfortunately, I don't think I can't even package the compiled library because glib isn't very specific about its version (it's just glib-2.0.so).

Is the tar method the best I can do in this situation?

share|improve this question
    
Have a look at this discussion about rpath –  Ulrich Dangel Aug 9 '12 at 21:07

1 Answer 1

up vote 1 down vote accepted

I would suggest installing the new version of glib under /usr/local/lib or /usr/local/lib64 and then utilizing the LD_LIBRARY_PATH environment variable, like you mentioned above.

In fact that appears to be the default location. From the output of ./configure --help in glib-2.33.8:

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

See this Ubuntu Forum thread for more details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.