On 3/19/2012 4:25 AM, Lemon Lime wrote:
On 03/19/12 12:56, Andrew Benton wrote:
On Mon, 19 Mar 2012 07:52:27 +0000
Martins Gulbis<[email protected]> wrote:
Hello,
I am having problems building pkg-config-0.26. The following is the
output when I try a make:
make all-recursive
make[1]: Entering directory `/home/martins/pkg-config-0.26'
Making all in popt
make[2]: Entering directory `/home/martins/pkg-config-0.26/popt'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/martins/pkg-config-0.26/popt'
Making all in .
make[2]: Entering directory `/home/martins/pkg-config-0.26'
/bin/sh ./libtool --tag=CC --mode=link gcc -g -Wall -O2 -g -O2 -o
pkg-config pkg.o parse.o main.o lglib-2.0 popt/libpopt.la
libtool: link: gcc -g -Wall -O2 -g -O2 -o pkg-config pkg.o parse.o
main.o lglib-2.0 popt/.libs/libpopt.a
gcc: error: lglib-2.0: No such file or directory
make[2]: *** [pkg-config] Error 1
make[2]: Leaving directory `/home/martins/pkg-config-0.26'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/martins/pkg-config-0.26'
make: *** [all] Error 2
As you can see, it cannot find lglib-2.0, the glib-2.0 library. The
makefile was created with the following configure command:
GLIB_LIBS=-lglib-2.0 GLIB_CFLAGS=-I/usr/include/glib-2.0 \
./configure --prefix=/usr
I noticed that the actual name of the library file in /usr/lib is
libglib-2.0, so I tried changing GLIBS_LIB in the above to libglib-2.0
and to libglib-2.0.a which had the same results. From looking at the
makefile I am having a hard time trying to figure out where it is
looking for library files. I think that Libtool is being used for
things like that, but not sure.
If gcc is trying to link to -lglib-2.0 the library should be called
libglib-2.0.so How did yours not get the .so at the end?
Andy
It looks like it is trying to link to "lglib-2.0" instead of
"-lglib-2.0". Perhaps you accidentally left out the "-" in the configure
command?
Thanks!! I knew it had to be something simple. And that is one of those
things that one can look at all day and see nothing wrong. It is
amazing how a fresh set of eyes looking at the problem can catch things
like that. Hoping to make a learning experience out of this, can you
point me to some docs or a web site, that explain how the makefile and
gcc interpret "-lglib-2.0" and wind up linking to the desired library.
Thanks again!!!
Martins
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page