Re: Trying to compile gnome-libs - help...



The problem is with zlib but you need to find out if the compiler is
actually finding zlib or if it is finding the wrong version.
lets say zlib is at this path /usr/local/lib/libzlib.so

The first thing to watch out for is if zlib is named
libzlib.so or if it is names libz.so. The older versions
were named libz.so while newer ones are names libzlib.so
(I could be wrong about that). 

You compile like is looking for -lz which means it would
look for libz.so and not libzlib.so. If that is the problem
just add -lzlib and it should link.

If that is not the problem you need to make sure the compiler
can find libz. The best way to do this is to just include the
full path name of the lib in the compile line and see if that
works for you. So add this instead of -lz.

/usr/local/lib/libzlib.so

now if that works there could be two things going on.
You could have two versions of the lib on your system and the
bad version is getting read before your good version.
The other possibility is that the new lib you got does not
work either. The way to test this is to look for the symbol
uncompress (the one the linker is looking for) in the new
zlib shared object you just installed. Like so.

nm /usr/local/lib/libzlib.so | grep uncompress

compress.o:
00000000 T compress
00000000 T uncompress
000019e8 t compress_block

The "T" to the left of the symbol means it is defined in that lib.
If there is a "U" to the left of the symbol then it is not there.


hope that helps
Mo DeJong
dejong@cs.umn.edu
gimme multimedia group

On Mon, 17 Aug 1998, Michael Brodbelt wrote:

> Hi,
> 
> I've succesfully compiled and installed GTK, glib, and imlib, and I'm
> trying to compile the gnome libraries next, but I keep getting an error. 
> >From looking at the webpages, I thought this was caused by zlib (I have 
> a RedHat 5 system, though it's been modified from base now), so I installed 
> new rpm's, but I still have this trouble:-
> 
> ranlib .libs/libgtkxmhtml.a
> creating libgtkxmhtml.la
> (cd .libs && ln -s ../libgtkxmhtml.la libgtkxmhtml.la)
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I./.. -I/usr/local/include
> -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include
> -DWITH_GTK -DDEBUG -DGNOME_LIB -I/usr/X11R6/include
> -I/usr/local/lib/glib/include -I/usr/local/include -g -O2 -c test.c
> test.c: In function `main':
> test.c:92: warning: initialization makes pointer from integer without a
> cast
> /bin/sh ../libtool --mode=link gcc -g -O2  -o htmltest  test.o
> ../gtk-xmhtml/libgtkxmhtml.la -lXpm -ljpeg -lpng -lz -lz -lSM -lICE
> -L/usr/local/lib -L/usr/X11R6/lib -lgtk-1.1 -lgdk-1.1 -lglib-1.1 -lXext
> -lX11 -lm  -lm 
> gcc -g -O2 -o .libs/htmltest test.o -Wl,-rpath -Wl,/usr/local/lib
> ../gtk-xmhtml/.libs/libgtkxmhtml.so -lXpm -ljpeg -lpng -lz -lz -lSM
> -lICE -L/usr/local/lib -L/usr/X11R6/lib -lgtk-1.1 -lgdk-1.1 -lglib-1.1
> -lXext -lX11 -lm -lm
> ../gtk-xmhtml/.libs/libgtkxmhtml.so: undefined reference to `uncompress'
> ../gtk-xmhtml/.libs/libgtkxmhtml.so: undefined reference to `compress'
> make[2]: *** [htmltest] Error 1
> make[2]: Leaving directory `/usr/src/gnome/gnome-libs-0.27/gtk-xmhtml'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/gnome/gnome-libs-0.27'
> make: *** [all-recursive-am] Error 2
> [root@mordor gnome-libs-0.27]# 
> 
> Any idea what causes this?
> 
> Zlib versions are:-
> 
> [root@mordor gnome-libs-0.27]# rpm -q zlib zlib-devel
> zlib-1.1.2-2
> zlib-devel-1.1.2-2
> 
> Any help would be appreciated,
> 
> Mike.
> 
> 
> -- 
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 



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