Number: 1210
Title: incorrect gdImageCreateFromJpeg dependency
Submitter: Derek Jones
Date: Wed Oct 17 15:34:51 2007
Subsys: Build/Installation
Version: 2.14.1
System: x86-Linux-Suse 10.0
Severity: major
Problem:
File diffimg/diffimg.c line 119 is #ifdef HAVE_GD_JPEG

and HAVE_GD_JPEG is defined so gdImageCreateFromJpeg is called.

File lib/gd/gd_jpeg.c line 37 is #ifdef HAVE_LIBJPEG

and HAVE_LIBJPEG is not defined so the rest of the file, including the definition of gdImageCreateFromJpeg, is skipped. This eventually results in a link time error.
Comments:
While tracking down the problem I deleted the .o file for gd_jpeg and was surprised to see that no rebuild happened (a make clean) in the gd directory was needed. It would cause fewer surprised if the makefile included dependencies on the .o files existing (in .libs)

[ellson] It may be that, if you have gd-2.0.34 or later installed on your system, that the internal libgd code isn't being used?

If there are missing dependencies its an automake, or libtool bug. I suspect the problem is that the make target is the foo.lo, not .libs/foo.o. Perhaps automake doesn't expect the user to poke in .libs.

I think there was a bug related to a missing #ifdef that I've already fixed in the 2.15 development series, any chance you could try a recent snapshot from www.graphviz.org?

BTW, jpeg is not a good format for line drawings due to is lossiness. We've tested recently and the smallest images (not antialiased) are from -Tpng:gd

[derek] > It may be that, if you have gd-2.0.34 or later installed on your system, that the internal libgd code isn't being used?

I may have 2.0.27 according to index.html in /usr/share/doc/packages/gd

There is a gd directory containing lots of stuff that came as part of the graphviz download.

> If there are missing dependencies its an automake, or libtool bug. I suspect the problem is that the make target is the foo.lo, not .libs/foo.o. Perhaps automake doesn't expect the user to poke in .libs. > > I think there was a bug related to a missing #ifdef that I've already fixed in the 2.15 development series, > any chance you could try a recent snapshot from www.graphviz.org?

Same problem occurred when building 2.15.20071018.0440

> BTW, jpeg is not a good format for line drawings due to is lossiness. We've tested recently and the smallest images (not antialiased) are from -Tpng:gd

Not my call. I am just doing an out-of-the-box build.
Fix:
Work around (half credit :-) is to patch diffimg.c so that gdImageCreateFromJpeg is not called.
Owner: *
Status: *