Re: libgtop-0.26.2, won't compile



On Mon, 28 Sep 1998, Wilkes Joiner wrote:

> > OTOH, it doesn't seem to include the glibs in the link line...
> >
> > gcc -Wall -W -g -O2 -D_BSD -DGLIBTOP_DAEMON_SLAVE -o
> > .libs/libgtop_daemon gnuserv.o slave.o main.o io.o version.o
> > -Wl,-rpath -Wl,/home/ats/gnome/lib ../../lib/.libs/libgtop.so
> > -Wl,-rpath -Wl,/home/ats/gnome/lib 
> > ../../sysdeps/common/.libs/libgtop_common.so -Wl,-rpath
> > -Wl,/home/ats/gnome/lib ../../sysdeps/linux/.libs/libgtop_sysdeps.so
> > -L/usr/X11R6/lib -lXau -lnsl -lm

That's how it should look like:

/bin/sh ../../libtool --mode=link egcs -Wall -W -g -O2 -D_BSD
-DGLIBTOP_DAEMON_SLAVE  -o libgtop_daemon  gnuserv.o slave.o main.o io.o
version.o ../../lib/libgtop.la ../../sysdeps/common/libgtop_common.la
../../sysdeps/linux/libgtop_sysdeps.la   -L/usr/X11R6/lib -lXau 
mkdir .libs
egcs -Wall -W -g -O2 -D_BSD -DGLIBTOP_DAEMON_SLAVE -o .libs/libgtop_daemon
gnuserv.o slave.o main.o io.o version.o -Wl,--rpath
-Wl,/home/norwegen/TEST/lib ../../lib/.libs/libgtop.so -Wl,--rpath
-Wl,/home/norwegen/TEST/lib ../../sysdeps/common/.libs/libgtop_common.so
-L/usr/X11R6/lib -lXau -Wl,--rpath -Wl,/home/norwegen/TEST/lib
../../sysdeps/linux/.libs/libgtop_sysdeps.so -L/home/baulig/INSTALL/lib
-lglib -L/usr/X11R6/lib -lXau

There is no need to add the glib stuff to the _LDADD variables since
libtool automatically keeps track of this is it is in the
`libgtop_sysdeps_la_LIBADD' variable in sysdeps/linux/Makefile.am.

However, if this works, your sysdeps/linux/libgtop_sysdeps.la will
contain the following line (with another pathname of cause):

# Libraries that this one depends upon.
dependency_libs=' -L/home/baulig/INSTALL/lib -lglib'

Is this the case ?

If not, there's either a problem with libtool or with the Makefile
in sysdeps/linux - your sysdeps/linux/Makefile should contain the
following lines:

libgtop_sysdeps_la_LIBADD       = -L/home/baulig/INSTALL/lib  -lglib

  and somewhere later this:

libgtop_sysdeps.la: $(libgtop_sysdeps_la_OBJECTS) $(libgtop_sysdeps_la_DEPENDENCIES)
        $(LINK) -rpath $(libdir) $(libgtop_sysdeps_la_LDFLAGS) $(libgtop_sysdeps_la_OBJECTS) $(libgtop_sysdeps_la_LIBADD) $(LIBS)

Martin

-----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier
   martin@home-of-linux.org, http://www.home-of-linux.org/
------------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]