Skip Menu |

This queue is for tickets about the GD CPAN distribution.

Report information
The Basics
Id: 69483
Status: open
Priority: 0/
Queue: GD

People
Owner: Nobody in particular
Requestors: ambs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.46
Fixed in: (no value)



Subject: Trouble compiling when multiple libpng installed
Hello I am trying to install GD with no success in my mac. I have libgd with the following: [ambs@rachmaninoff ~]$ gdlib-config --all GD library 2.0.33 includedir: /opt/local//include cflags: -I/opt/local//include ldflags: -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib libs: -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv libdir: /opt/local//lib features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF When I run Makefile.PL everything seems OK: [ambs@rachmaninoff GD-2.46-mine]$ perl Makefile.PL Notice: Type perl Makefile.PL -h for command-line option summary. Configuring for libgd version 2.0.33. Checking for stray libgd header files...none found. Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33 GD library used from: /opt/local/ Writing Makefile for GD Writing MYMETA.yml and MYMETA.json INCLUDE : -I/opt/local//include LIBPATH : -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib -L/opt/local//lib LIBS : -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv -lgd compilation just works, but when running tests: t/GD.t ........ 1/12 Testing using png support. libpng warning: Application was compiled with png.h from libpng-1.4.3 libpng warning: Application is running with png.c from libpng-1.2.34 gd-png: fatal libpng error: Incompatible libpng version in application and library Can you give me any hint on what might be going on? Thanks, ambs PS: In attach a patch that fixes some details: a missing slash between prefix and the include string, and substitute multiple slashes by only one, so that we can compare directly strings (note the INCLUDE path above). Otherwise the compile system complains that /opt/local//include/gd.h is different from /opt/local/include/gd.h :)
Subject: GD-patch
Download GD-patch
application/octet-stream 1.8k

Message body not shown because it is not plain text.

Show quoted text
> INCLUDE : -I/opt/local//include > LIBPATH : -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib
-L/opt/local//lib Show quoted text
> LIBS : -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv
-lgd Show quoted text
>
Although these variables are defined this way, during linkage: LD_RUN_PATH="/usr/X11/lib:/opt/local/lib:/usr/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector GD.o -o blib/arch/auto/GD/GD.bundle \ -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib -L/opt/local//lib -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv -lgd \ Note the /usr/local/lib before the /opt/local/lib. Can't find out who is defining it, and prepending it there :-|
Show quoted text
> LD_RUN_PATH="/usr/X11/lib:/opt/local/lib:/usr/lib" env > MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup > -L/usr/local/lib -L/opt/local/lib -fstack-protector GD.o -o > blib/arch/auto/GD/GD.bundle \ > -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib -L/opt/local//lib > -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv -lgd \
It seems that these three items: -L/usr/local/lib -L/opt/local/lib -fstack-protector come from Config.pm Probably easier for me to remove libpng from /usr/local. But if you have any idea how to make user defined @LIBPATH to appear before, you are welcome :)
On Fri Jul 15 06:57:13 2011, AMBS wrote: Show quoted text
> > LD_RUN_PATH="/usr/X11/lib:/opt/local/lib:/usr/lib" env > > MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup > > -L/usr/local/lib -L/opt/local/lib -fstack-protector GD.o -o > > blib/arch/auto/GD/GD.bundle \ > > -L/opt/local/lib -L/opt/local/lib -L/usr/X11/lib -L/opt/local//lib > > -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv -lgd \
> > It seems that these three items: > > -L/usr/local/lib -L/opt/local/lib -fstack-protector > > come from Config.pm > > Probably easier for me to remove libpng from /usr/local. But if you have > any idea how to make user defined @LIBPATH to appear before, you are > welcome :)
This is basically a perl5 Configure bug, mixing up the include vs lib precedence. I fixed it manually in a couple of Makefile.PL's. See https://github.com/perl11/cperl/issues/267 -- Reini Urban