Operating System - HP-UX
1830906 Members
2655 Online
110017 Solutions
New Discussion

glib is installed in different location than package assimes

 
Igor I. Shulz
Frequent Advisor

glib is installed in different location than package assimes

I've installed glib from glib-1.2.10-sd-11.00.depot in its default location (in /usr/local/). But some software (for instance mc-4.5.54-sd-11.00.depot) assumes that glib must be installed into /opt/glib?? As result I had complains like:

checking for glib-config... /opt/glib/bin/glib-config
checking for GLIB - version >= 1.2.0... ./configure[3591]: /opt/glib/bin/glib-config: not found.

/usr/lib/dld.sl: Can't open shared library: /opt/glib/lib/libglib.sl
/usr/lib/dld.sl: No such file or directory

What's wrong? What can I do?

PS: /usr/local/bin exists in my PATH and glib-config can be run without path.
Thanx
4 REPLIES 4
T G Manikandan
Honored Contributor

Re: glib is installed in different location than package assimes

you can create a link to /opt/glib like

#ln -s /usr/local/glib /opt/glib

which should make things fine

Thanks
Igor I. Shulz
Frequent Advisor

Re: glib is installed in different location than package assimes

There's no such target /usr/local/glib !

glib is installed into /usr/local. That means that glib-config is in /usr/local/bin. glib libraries are in /usr/local/lib. Well, I think it's possible to create link /opt/glib -> /usr/local, but maybe there's more correct decision?
T G Manikandan
Honored Contributor

Re: glib is installed in different location than package assimes

Then you can like just those binaries and library files.

Like
#mkdir -p /opt/glib/bin
#ln -s /usr/local/bin/glib-config /opt/glib/bin/
Similarly
#mkdir -p /opt/glib/lib
#ln -s /usr/local/lib/libglib.sl /opt/glib/lib/

Either you can link the entire bin and lib dir to /opt/glib
or just link the library and binary files of glib there.


Thanks
rick jones
Honored Contributor

Re: glib is installed in different location than package assimes

As suggested, setting-up symlinks with ln -s may suffice.

Another possibility (not quite as elegant) would be to use LD_PRELOAD to preload glib from the install location. That should/might satisfy the applications glib requirements and workaround the library being in /usr/local/lib instead of /opt/glib...

There is also the LD_LIBRARY_PATH (sp?) option, but I _think_ that the application has to be compiled to allow that. More data may be in the manpage for the "ld" command.

Or, you could always download the sources and compile them to whatever prefix you desire :)
there is no rest for the wicked yet the virtuous have no pillows