[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA: Problems compiling gerbv: -lz, -lm
On Fri, Aug 20, 2004 at 11:43:26PM +0200, Stefan Petersen wrote:
> On Sat, 21 Aug 2004, Hamish Moffatt wrote:
>
> > On Fri, Aug 20, 2004 at 08:23:45AM +0000, Karel Kulhavý wrote:
> > > I got numerous problems with missing -lz, -lm in addition to -lpng during compilation
> > > of gerbv-0.16
> >
> > > configure:3716: gcc -o conftest -O2 -march=athlon-xp -fomit-frame-pointer -fstrength-reduce -fschedule-insns -I/home/clock/usr/include conftest.c -lpng >&5
> > > /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../libpng.so: undefined reference to `deflate'
> >
> > That means your libpng is built wrong. It should link against libz
> > itself if it needs it, rather then depending on user applications to
> > provide that link.
Can you point to a section of libpng specification saying that the user program
may rely on the fact that -lm and -lz will be linked by libpng itself?
Have you written the program according to the libpng interface specification?
Cl<
>
> Hamish is right. On my machine I get from "ldd /usr/lib/libpng.so"
> libz.so.1 => /usr/lib/libz.so.1 (0x40032000)
> libm.so.6 => /lib/libm.so.6 (0x40043000)
> libc.so.6 => /lib/libc.so.6 (0x40065000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
>
>
> > You only changed configure. You would need to change the makefiles also.
>
> Do the changes in configure.in. Then rerun aclocal, autoheader, autconf,
> automake --copy --add-missing (in that order). Then rerun ./configure et
> al.
>
> -OR-
>
> you could run
> ./configure --disable-exportpng
>
> if you don't need png export functionality.
>
>
> > > I think the ./configure and make mechanism of gerbv must be broken somehow.
> >
> > No, your libpng is broken.
>
> I agree with Hamish.
>
> Regards,
> /Stefan