Hans Nieuwenhuis wrote:
Hi,

I tried to compile the CVS version of PCB today, but compilation failed with 
the following error:

gcc -DNDEBUG -g -O2  -I/usr/X11R6/include -DXTHREADS -D_REENTRANT -
DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr
/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 
-I/usr/include/freetype2 -I/usr/include/freetype2/freetype2 
-I/usr/include/freetype2
/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   
-I/usr/include -Wall   -o pcb-bin  action.o autoplace.o autoroute.o buffer.o 
change.o command.o compat.o copy.o create.o crosshair.o data.o djopt.o draw.o 
drill.o error.o file.o find.o flags.o heap.o insert.o intersect.o line.o main.o 
mirror.o misc.o move.o mtspace.o mymem.o netlist.o output.o parse_l.o parse_y.o 
polygon.o puller.o print.o rats.o remove.o report.o res_parse.o res_lex.o 
rotate.o rtree.o rubberband.o search.o select.o set.o strflags.o undo.o 
vector.o vendor.o hid/common/actions.o hid/common/flags.o hid/common/hidinit.o 
hid/common/hidnogui.o hid/common/extents.o libgtk.a liblpr.a libbom.a 
libgerber.a libpng.a libps.a -lfl -lm    -L/usr/X11R6/lib -lgtk
-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -L/usr/X11R6/lib -lXpm -lX11 -ljpeg -lfreetype -lpng12 -lz -lm -lgd
libpng.a(libpng_a-png.o)(.text+0x834): In function `png_do_export':
hid/png/png.c:434: undefined reference to `gdImageGif'
collect2: ld returned 1 exit status


Seems like my gd library version is too old (version 2.0.27 on MDK 10.1) and 
does not support the gdImageGif function. After installing the latest version 
(2.0.33) the problem went away. I made a modification to configure.ac (actually 
I shamelessly ripped it from the graphviz package) which checks for versions 
2.0.33 or higher. Attached is a patch.


I came across it. I'll see about adding an autoconf test for it. What I may do is make configure fail if gdImageGif is not available _unless_ you give it a --disable-gif. Look for a fix in a day or 2. If you need it right now, you can just comment out the call to gdImageGif.

-Dan

Reply via email to