Library compiled but not see by OS

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Library compiled but not see by OS

Postby tuan168 » Tue Jul 12, 2005 6:32 am

hi all
after successfully configure && make && make install
the library is there in /usr/local/lib but FC3 does not recognise

some library suggested to add the following
edit /etc/ld.so.conf and add /usr/local/lib /usr/lib

$ ldconfig
$ pkg-config --libs --cflags libname

# pkg-config --libs --cflags pango
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -l pango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
localhost ~]#

but some lilbrary can not be config

please advice
thank you very much in advance...
User avatar
tuan168
 
Posts: 3
Joined: Thu Jun 30, 2005 10:54 am

RE: Library compiled but not see by OS

Postby M-Saunders » Tue Jul 12, 2005 9:23 am

What's the actual error message you receive?
User avatar
M-Saunders
LXF regular
 
Posts: 2893
Joined: Mon Apr 11, 2005 12:14 pm

RE: Library compiled but not see by OS

Postby jjmac » Tue Jul 12, 2005 12:13 pm

>>
some library suggested to add the following
edit /etc/ld.so.conf and add /usr/local/lib /usr/lib

$ ldconfig
$ pkg-config --libs --cflags libname
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -l pango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
localhost ~]#
>>


You maybe mixing up two seperate issues. The later one ...

"$ pkg-config --libs --cflags libname"

Will likely be used by a configure script for a source file collection that requires "pango" to be available for its' build. The output from that command will then be used as part of the associated Makefile creations.

The second "ldconfig" is a program that creates a cache of library paths that the dynamic linker will use to resolve a programs run-time linking issues with shared libraries. It has a number of default paths built into it, and any extra or unusual paths can be added to the /etc/ld.so.config file for inclusion.

Adding /usr/local/lib is probably a good idea if you have any ".so" libraries installed there.

It shouldn't be neccessary to add /lib and /usr/lib though.

Adding /usr/X11R6/lib is usually required. And if you have any ".so" libries that are working out of their own package directories, then they should also be added to the list as well. /opt would be a good candidate there.

If you run "]$ ldd /path_to_prog/prog_name" you will get a list of which libraries the linker needs to run the program, along with any it can't find.


jm
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia

RE: Library compiled but not see by OS

Postby tuan168 » Wed Jul 13, 2005 8:06 am

[quote="jjmac"]>>
some library suggested to add the following
edit /etc/ld.so.conf and add /usr/local/lib /usr/lib

$ ldconfig
$ pkg-config --libs --cflags libname
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -l pango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
localhost ~]#
>>


You maybe mixing up two seperate issues. The later one ...

"$ pkg-config --libs --cflags libname"

Will likely be used by a configure script for a source file collection that requires "pango" to be available for itshi, and thank you for your advices

what i'm trying to is install mplayer from source.. i'm managed to download tarball the following files
mplayer-1.0pre7-1.tar.bz2, atk-1.2.4.tar.bz2 glib-2.7.2.tar.bz2, gtk+2.7.2 pango-1.9.0.tar.bz
i then compiled and installed, everything work fine in text mode,,,, but wait there is more i now want mplayer in gui mode
which come to PANGOCAIRO OSD test support... which require cairo, libpixman, glitz
according to INSTALL file run these command automake && make && make install
libpixman-0.1.5 and glitz-0.4.3 compile and install successfully and no error was given ...
but when i try to compile cairo-0.5.1 it complain

checking for glitz >= 0.4.0... Package glitz was not found in the pkg-config search path.
Perhaps you should add the directory containing `glitz.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glitz' found
checking for libpixman >= 0.1.4... Package libpixman was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpixman.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpixman' found

configure: error: Library requirements (libpixman >= 0.1.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
localhost cairo-0.5.1]#

these files are listed in /usr/local/lib
libglitz.a libglitz.-glx-a
libglitz.a libglitz-glx.a libglitz-glx.la libglitz-glx.so libpangox-1.0.so.0.900.0
libglitz-glx.so.1 libglitz-glx.so.1.0.0 libglitz.la libglitz.so libglitz.so.1 libpixman.a
libgettextlib.la libglitz.so.1.0.0 libmikmod.so.2 libpixman.la mplayer
libgettextlib.so libgmodule-2.0.la libmikmod.so.2.0.4 libpixman.so pango
libgettextpo.a libgmodule-2.0.so libogg.a libpixman.so.1 pangocairo.pc
libgettextpo.la libgmodule-2.0.so.0 libogg.la libpixman.so.1.0.0

and these files are listed in /usr/local/lib/pkg
ls /usr/local/lib/pkgconfig/
atk.pc glitz-glx.pc gmodule-2.0.pc gmodule-no-export-2.0.pc gthread-2.0.pc libquicktime.pc pango.pc pangox.pc
glib-2.0.pc glitz.pc gmodule-export-2.0.pc gobject-2.0.pc libpixman.pc pangoft2.pc pangoxft.pc
localhost cairo-0.5.1]#


i have install mplayer with all the necessary library from rpm.... but that is not the way to learn ...
Tuan
Freedom and liberty are seldom appreciated until they are lost.
Every obstacle that is overcome adds to ther freedom you can dnjoy.
Freedom to Linux World
User avatar
tuan168
 
Posts: 3
Joined: Thu Jun 30, 2005 10:54 am

RE: Library compiled but not see by OS

Postby jjmac » Wed Jul 13, 2005 12:31 pm

ok, cairo seems to be the only source package with a problem with pkg-config.


Did the other source compiles require those two libs as part of their build process ???

If so, and they used pkg-config in therir configuration process, then it must be configured properly. Easy to check, if you kept build logs for them, those libs should show up as cli inclusions during the link stages. If not, they should be findable in the respective Makefiles.

If thats so, then the focus is more on something to do with cairo than pkg-config.

Have you ran it manually for those two libs. Just to see what kind of output it generates. If it correctly returns the paths to /usr/local, then that would suggest it's not the real problem.


]$ pkg-config --libs --cflags glitz

Does that produce correct output ?


>>
checking for glitz >= 0.4.0... Package glitz was not found in the pkg-config search path.
>>

Assuming pkg-config is correctly configured... a syntax error in the configuration script can generate something like that. Such as, the lib name butting up against one of the switches with out the required white space to seperate them. I've had that occure on a couple of occasions.

Searching back through the config.log file should reveal that, if thats the case.

You could try a couple of symlinks from /usr/bin/pkg-config and /usr/lib/pkg-config down to /usr/local for good measure. But if pkg-config is configured for its' /usr/local install, then that shouldn't be needed.

If the search through cairo doesn't reveal it, and the symlinks don't work, then try setting the env variable.

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib


As far as the /etc/ld.so.config file goes, it will need an entry for /usr/local/lib if it hasn't already got one. But it shouldn't for the standard locations /lib and /usr/lib. But thats really just more for the run-time support.


A none-standard install like /usr/local can be prone to path conflicts though. As thats all it probably is, it will be solved. It's just getting past ./configure thats sometimes problematic.

I would suspect a syntax error in configure though. Or a version conflict. configure can be a bugger of a script to search through(grin). If it had something like ...

pkg-config --libs--cflags glitz instead of

pkg-config --libs --cflags glitz

then that would make configure think that the command failed due to an absent lib. I think it sometimes happens because of quirks associated with the passes that are used to create it.

man pkg-config is worth a look, it seems you can give pkg-config a different "prefix" to test with if you want.


Hope thats all it is :)



Edit: 14th July 2005:

The only other thing really would be trying the --with-xxxx switches that will likely be available to configure, eith for those libes or pkg-config. Thats a straww grab though.


jm
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia


Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests