On Sat, 18 Jan 2003, Greg Julius wrote:

> > > 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.

Presumably the Makefile with the source probably installed png.h
someplace different from where the Red Hat rpm would have put it.  The
build environment on a Red Hat system is set up to use slightly different
search paths from what the libpng sources default to, I think.

I was thinking about something like this:
http://rpmfind.net/linux/rpm2html/search.php?query=libpng-devel

(No, I don't know which version would be relevant to you -- I switched to
Debian on my machine years ago)

> > > 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.

gcc (when invoked as a linker) doesn't look for .o files unless you tell
it to.

> > > 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.

OK - it sounds like you asked for more problems than necessary, though.

> > > 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.

I think you are doing fine :)

> 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
>
> I found that the first (the compile?) worked fine and the second (the
> link?) is where the failure is.  This didn't tell me much at the time, but

Yes, the first is the compile and the second is the link.

> I went searching for deflate in the log because it was one of the problem
> children.  I found in the log where it did:
> (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
>
> All of that proceeded without errors.  So the question became why can't the
> xcursorgen step find them?  I tried putting libz.a in the same directory as
> the libpng.so but that didn't help.  Investigated the offending gcc line
> above and noted -lpng on the line and wondered why isn't there a -llibz on
> the line?  Tried that, and it couldn't find the library.  Noted that all of
> the .a files in the directory start with lib so  I created a symbolic link
> to libz.a named liblibz.a.  Then I changed the last bit of the second gcc
> line to read:
> -L../../exports/lib   xcursorgen.o -lXcursor -lXext -lX11 -lpng -llibz

should perhaps be -lz.  The linker prepends "lib" and appends
".so"/".a"/whatever so -lz would make it look for libz.so/a.

> Can you tell me how to add the -L/usr/src/zlib to the errant gcc command?

No.  I hate Imakefiles -- I hope to see them replaced soon.

I started a compile of the 4.2.99 snapshot about an hour and a half ago
to see if I ran into the same problems as you.  Nothing so far but it is
still compiling.

I think there is another target besides World that lets you continue from
where it left off the last time [checking xc/Makefile...]

Something like:

make -f xmakefile World

might just work.  What if you manually compile and linking the stuff that
breaks and use the above make invokation to continue the build...?

-Peter

_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86

Reply via email to