> When I first compiled, it couldn't find png.h so I went and found
> that. Then it said it needed zlib so I went and found that. Installed
> zlib with no apparent errors. Then installed libpng with no apparent
> errors. Recompiled again. Still couldn't find png.h.
You need the development version of the rpm, I think.
I did source installs. The png.h was there, it just couldn't find it.
> Moved png.h to /usr/local/include (and then several others as iterations
> found them) and now when I compile I get the above errors. I tried moving
> the libpng.so to /usr/lib/ (actually a symbolic link). Still no go.
The problem isn't that it can't find libpng.so -- the problem is that it
can't find deflate and friends (from zlib, I think) that libpng.so depends
on.
I didn't believe it was but I gave it a try anyway. Of course it failed again. Then I started trying to figure out why it couldn't find the items.
> I've got a zillion zlibs on this system. I have my source at
> /usr/src/zlib-1.1.4 and symbolic link to same as /usr/src/zlib.
It is not looking for the source to zlib, only for the lib so it can
satisfy the dependencies that libpng has.
Excuse me, I meant to imply that the object modules (from my zlib compile) were in the same directory. I didn't figure it meant the source :) See next.
> Q2 & 3: There is no zlib.so anywhere and I have the deflate.o (and all the
> rest) where the source is. Where should I put them? I see there is a
> deflate.c in the XFree86 cvs tree - shouldn't it be building and using that?
Can you find an RPM with zlib? Preferably a devel version?
The rpms that I found (libpng & zlib) were of a release before the fix for some kind of overrun bug. Figured to get it right while I was at it.
> Thanks again for all of your patience and assistance.
It's okay as long as you 1) make progress, 2) ask good questions where we
don't have to guess too much 3) make an effort to look up the obvious
before you post and 4) mostly follow instructions :)
1) I (hope I) am making progress (although it feeeeeeeelll so sloooooooowwwww). 2) I figure my posts border on the verge of tedious, but I want to give good data so I can receive good feedback & ideas. That's why they are sortta digests of what has transpired. They show what I've attempted and where I am. Possibly from that y'all can see what i'm doing wrong. 3) I've spent hours after each problem trying to figure it out, but end up at an impasse. 4) I try, sometimes even the answer/instruction is beyond my understanding. Sometimes I get an answer that was already discovered/tried & mentioned later in the post.
As long as somebody does that I don't mind helping him/her :) -- it's
actually fun then!
I enjoy the hunt also, and the occasional victories keep me going. Still it's been frustrating that I haven't bagged the problem yet.
This is what has happened since I sent my last post
The short answer is no forward progress. Some lateral, but no forward.
I searched the generated log for deflate et. al. and found where make World did the xcursorgen stuff. Captured the generated commands to a script file so I could play with them. The script is (gcc line broken to make it readable in the mail)
- #!/bin/sh -v
- cd /usr/src/cvs/xc-4.2.99.3/xc/programs/xcursorgen
- echo "Entering directory $PWD "
- gcc -m32 -O2 -fno-strength-reduce -fno-strict-aliasing -ansi -pedantic
- -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
- -Wnested-externs -Wundef
- -I../.. -I../../exports/include
- -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO
- -c -o xcursorgen.o xcursorgen.c
- rm -f xcursorgen
- gcc -m32 -o xcursorgen -O2 -fno-strength-reduce -fno-strict-aliasing -ansi -pedantic
- -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
- -Wnested-externs -Wundef
- -L../../exports/lib xcursorgen.o -lXcursor -lXext -lX11 -lpng -lm -Wl,-rpath-link,../../exports/lib
- cd /usr/src/cvs/xc-4.2.99.3/xc/programs/xcursorgen
- (typed from notes)
- from directory /usr/src/cvs/xc-4.2.99.3/xc/lib/zlib
- remove libz.a (an archive ar called it)
- ar clq .... libz.a (created archive libz.a from my missing objects (and more) - create, don't look for dups, quietly)
- ranlib libz.a (make an index in libz.a)
- made a symbolic link xc/exports/lib/libza to the one just built
- from directory /usr/src/cvs/xc-4.2.99.3/xc/lib/zlib
- -L../../exports/lib xcursorgen.o -lXcursor -lXext -lX11
-lpng -llibz -lm
-Wl,-rpath-link,../../exports/lib
Ok, I tried to figure out how to get the make World to include a -llibz on the command line but that was beyond me. While poking around I found a HasZlib directive that could be put in site.def. So I did. Set the make World off and went to bed. No joy in the morning. Still can't find the bloody modules.
Saw a note this morning about WORLDOPTS= in the invokation of the make world: make World WORLDOPTS= > World.log 2>&1
Still no joy.
The make process wipes out the whole exports/lib directory (naturally) and does not put a correctly named zlib someplace where it can find it. I'm sure its something I've hosed up, but I have no idea what. I have inserted the HasZlib directive in the site.def file and sure enough it doesn't attempt to build it, but how do I get it to add -L/usr/src/zlib to it's gcc command? There must be an option someplace, but the whole make/makefile/imakefile thing is cryptic in the extreme to me. I'll keep searching, but I figure there has to be a way.
Can you tell me how to add the -L/usr/src/zlib to the errant gcc command?
-g
The more leaks I plug, the more leaks I find.
How do I tell the make to add another library to the compile.

