Skip Menu |

This queue is for tickets about the GD CPAN distribution.

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

Owner: Nobody in particular
Requestors: gregoa [...]

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


From: gregoa [...]
Subject: libgd-perl: FTBFS: Could not find gdlib-config in the search path.
Download (untitled) / with headers
text/plain 1.3k
We have the following bug reported to the Debian package of GD ( It doesn't seem to be a bug in the packaging, so you may want to take a look. Thanks! Summary: gdlib-config is gone (in Debian at least), probably pkg-config would be a good replacement. ------8<-----------8<-----------8<-----------8<-----------8<----- From: Chris Lamb <> To: Subject: libgd-perl: FTBFS: Could not find gdlib-config in the search path. Date: Sat, 28 May 2016 11:45:14 +0100 Source: libgd-perl Version: 2.53-2.1 Severity: serious Justification: fails to build from source User: Usertags: ftbfs X-Debbugs-Cc: Dear Maintainer, libgd-perl fails to build from source in unstable/amd64: [..] cd . && /usr/bin/perl Makefile.PL NOECHO= INSTALLDIRS=vendor **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd. /usr/share/cdbs/1/class/ recipe for target 'Makefile' failed make: *** [Makefile] Error 2 ------8<-----------8<-----------8<-----------8<-----------8<----- Thanks for considering, gregor herrmann, Debian Perl Group
Download (untitled) / with headers
text/plain 156b
Here's the patch we're using in Debian currently. Probably not ready for prime-time / not universally applicable, but maybe it helps others. Cheers, gregor
Subject: 1002_gdlib-config_pkg-config.patch
Description: use pkg-config (via ExtUtils::PkgConfig) instead of the removed gdlib-config. Additionally remove parts from try_to_autoconfigure which are not needed, at least on Debian, and adjust some variable to the different output of pkg-config. pkg-config doesn't return "features", so we're hardcoding it for now, taken from gdlib-config as of src:libgd2 2.2.3-1.1 (rebuilt with gdlib-config re-enabled). . This patch might need more massaging before upstreaming it wrt non-Debian systems, and inclusion of ExtUtils::PkgConfig into the distributions metadata. Origin: vendor Bug: Bug-Debian: Forwarded: no Author: gregor herrmann <> Last-Update: 2016-09-25 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,7 @@ use ExtUtils::MakeMaker qw(prompt WriteMakefile); use Config; use strict; +use ExtUtils::PkgConfig; # if this is a dev version the version number can be a string with underscores # remove them to prevent a warning and that's what perl will do it it was @@ -273,27 +274,23 @@ sub try_to_autoconfigure { my ($options,$lib_gd_path,$INC,$LIBPATH,$LIBS) = @_; - my $config = `gdlib-config --all`; - return unless $config; + my %config = ExtUtils::PkgConfig->find ('gdlib'); + return unless %config; $AUTOCONFIG++; - my ($version) = $config =~ /^GD library\s+(\S+)/m; + my ($version) = $config{modversion}; warn "Configuring for libgd version $version.\n"; - my ($cflags) = $config =~ /^cflags:\s+(.+)/m; - my ($ldflags) = $config =~ /^ldflags:\s+(.+)/m; - my ($libs) = $config =~ /^libs:\s+(.+)/m; - my ($libdir) = $config =~ /^libdir:\s+(.+)/m; - my ($features) = $config =~ /^features:\s+(.+)/m; - my ($includedir) = $config =~ /^includedir:\s+(.+)/m; + my ($cflags) = $config{cflags}; + my ($libs) = $config{libs}; + my ($libdir) = ExtUtils::PkgConfig->variable('gdlib', 'libdir'); + my ($features) = 'GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FREETYPE GD_FONTCONFIG GD_JPEG GD_XPM GD_TIFF GD_WEBP'; @$INC = map {s/^-I// && "-I$_"} split /\s+/,$cflags; - @$LIBPATH = map {s/^-L// && "-L$_"} split /\s+/,$ldflags; @$LIBS = split /\s+/,$libs; - push @$LIBS,"-lgd"; push @$LIBPATH,"-L$libdir"; - ($$lib_gd_path = $libdir) =~ s!/[^/]+$!!; + $$lib_gd_path = $libdir; $$options = $features; my ($minor, $patch) = $version =~ /^2\.(\d+)\.(\d+)$/; @@ -301,8 +298,6 @@ $$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33"; } - my @correct_inc = map {s/^-I// && $_} split /\s+/,$cflags; - check_for_stray_headers($includedir,@correct_inc); return 1; }
subscribing as this also affects Ubuntu >= 16.10
Download (untitled) / with headers
text/plain 278b
If someone else fails on installing GD on Ubuntu >= 16.10, even after applying the Debian fixes from RT#114788, just copy or move GD.xs from lib to . and rerun make. Not sure how Debian builds libgd-perl, don't know their build system and didn't find any hints in debian/rules.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to