Skip Menu |
 

This queue is for tickets about the GD CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: unsectreedee [...] gmail.com
Cc:
AdminCc:

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



Subject: GD install bug when using CPANM (minus)
Date: Sun, 20 Sep 2015 23:33:37 -0400
To: bug-GD [...] rt.cpan.org
From: unsec treedee <unsectreedee [...] gmail.com>
Download (untitled) / with headers
text/plain 5.5k
======================= *ERROR:* <snip-snip> ==> Found dependencies: GD --> Working on GD Fetching http://www.cpan.org/authors/id/L/LD/LDS/GD-2.56.tar.gz ... OK Configuring GD-2.56 ... N/A ! Configure failed for GD-2.56. See /root/.cpanm/work/1442804201.1140/build.log for details. ! Installing the dependencies failed: Module 'GD' is not installed ! Bailing out the installation for GDTextUtil-0.86. ! Installing the dependencies failed: Module 'GD::Text' is not installed, Module 'GD' is not installed ! Bailing out the installation for GDGraph-1.49. ======================= *COMMAND to Reproduce:* cpanm GD::Graph ======================= *OS Distribution:* Raspbian *=======================* *Platform (uname -a) :* Linux RaspberryPi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux ======================= *Perl Version:*v5.14.2 built for arm-linux-gnueabihf-thread-multi-64int *=======================* *CPANM Version Info:* cpanm (App::cpanminus) version 1.7039 (/usr/local/bin/cpanm) perl version 5.014002 (/usr/bin/perl) %Config: archname=arm-linux-gnueabihf-thread-multi-64int installsitelib=/usr/local/share/perl/5.14.2 installsitebin=/usr/local/bin installman1dir=/usr/share/man/man1 installman3dir=/usr/share/man/man3 sitearchexp=/usr/local/lib/perl/5.14.2 sitelibexp=/usr/local/share/perl/5.14.2 vendorarch=/usr/lib/perl5 vendorlibexp=/usr/share/perl5 archlibexp=/usr/lib/perl/5.14 privlibexp=/usr/share/perl/5.14 %ENV: @INC: FatPacked::23962952=HASH(0x16da548) /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl . *=======================* *CPANM BUILD.LOG details:*cpanm (App::cpanminus) 1.7039 on perl 5.014002 built for arm-linux-gnueabihf-thread-multi-64int Work directory is /root/.cpanm/work/1442804201.1140 You have make /usr/bin/make You have LWP 6.13 You have /bin/tar: tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html Show quoted text
>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching GD::Graph () on cpanmetadb ... --> Working on GD::Graph Fetching http://www.cpan.org/authors/id/R/RU/RUZ/GDGraph-1.49.tar.gz -> OK Unpacking GDGraph-1.49.tar.gz Entering GDGraph-1.49 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.04) Configuring GDGraph-1.49 Running Makefile.PL Warning: prerequisite GD 1.18 not found. Warning: prerequisite GD::Text 0.80 not found. Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for GD::Graph Writing MYMETA.yml and MYMETA.json The automatic tests for GDGraph are not really a solid workout of the library. The best way to test the package is to run the examples before installing it. You can run the examples in the samples directory with `make samples` or by going into that directory, and just running `make`. If that fails, please read samples/Makefile. -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.04) Checking if you have GD::Text 0.80 ... No Checking if you have GD 1.18 ... No ==> Found dependencies: GD::Text, GD Searching GD::Text (0.80) on cpanmetadb ... --> Working on GD::Text Fetching http://www.cpan.org/authors/id/M/MV/MVERB/GDTextUtil-0.86.tar.gz -> OK Unpacking GDTextUtil-0.86.tar.gz Entering GDTextUtil-0.86 META.yml/json not found. Creating skeleton for it. Configuring GDTextUtil-0.86 Running Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite GD 1 not found. Generating a Unix-style Makefile Writing Makefile for GD::Text Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.04) Checking if you have GD 1 ... No ==> Found dependencies: GD Searching GD (1) on cpanmetadb ... --> Working on GD Fetching http://www.cpan.org/authors/id/L/LD/LDS/GD-2.56.tar.gz -> OK Unpacking GD-2.56.tar.gz Entering GD-2.56 Checking configure dependencies from META.json Checking if you have Module::Build 0.42 ... Yes (0.4214) Checking if you have ExtUtils::Install 1.46 ... Yes (1.56) Configuring GD-2.56 Running Build.PL **UNRECOVERABLE ERROR** Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher. Running Makefile.PL Notice: Type perl Makefile.PL -h for command-line option summary. **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. -> N/A -> FAIL Configure failed for GD-2.56. See /root/.cpanm/work/1442804201.1140/build.log for details. -> FAIL Installing the dependencies failed: Module 'GD' is not installed -> FAIL Bailing out the installation for GDTextUtil-0.86. Already tried GD. Skipping. -> FAIL Installing the dependencies failed: Module 'GD::Text' is not installed, Module 'GD' is not installed -> FAIL Bailing out the installation for GDGraph-1.49. *=======================* *SOLUTION that worked for me:* Step1: apt-get install libgd2-xpm-dev build-essential Step2: then I re-ran the cpan install: cpanm GD::Graph Now it works... :-) I am reporting it because the CPAN installer should be able to handle this case IMHO (case of a missing libgd2 installation) and it should take care of it. *=======================*
Download (untitled) / with headers
text/plain 343b
On 2015-09-20 23:33:52, unsectreedee@gmail.com wrote: [...] Show quoted text
> I am reporting it because the CPAN installer should be able to handle this > case IMHO (case of a missing libgd2 installation) and it should take care > of it.
No CPAN installer is capable of this. Anyway, I don't this issue belongs to the GD issue queue and should be rejected.
Subject: Re: [rt.cpan.org #107210] GD install bug when using CPANM (minus)
Date: Mon, 21 Sep 2015 14:49:47 -0400
To: bug-GD [...] rt.cpan.org
From: unsec treedee <unsectreedee [...] gmail.com>
Download (untitled) / with headers
text/plain 1.5k
Hi: So it is not possible to add it to the "GD" BUILD.pl script to check if "libgd2" is installed and if not installed do an apt-get install ? We might disagree on this point. I have used other CPAN libraries and not run into this problem before. Could I suggest that you document the dependency on Linux "libgd2" Lib installation as a minimum on the CPAN webpage for GD as I did not notice this anywhere and I was lucky to find the solution quickly snooping around various things. I had to dig down into the CPAN debugging logs in order to realize what happened and why it was not working. Not all linux systems come with "libgd2" pre-installed. And I do not think an average user would have found this solution. My expectation was that the CPAN GD would install everything it needed (and if it is depended on an external library that it would install it as needed -- or at least point this out as an ERROR at top level of CPAN installer script). I'm just suggesting an improvement (at least document it) to make it easier for everyone. Thanks :-) On Mon, Sep 21, 2015 at 1:44 AM, Slaven_Rezic via RT <bug-GD@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=107210 > > > On 2015-09-20 23:33:52, unsectreedee@gmail.com wrote: > [...]
> > I am reporting it because the CPAN installer should be able to handle
> this
> > case IMHO (case of a missing libgd2 installation) and it should take care > > of it.
> > No CPAN installer is capable of this. > > Anyway, I don't this issue belongs to the GD issue queue and should be > rejected. > >
Download (untitled) / with headers
text/plain 3.7k
On 2015-09-21 14:49:57, unsectreedee@gmail.com wrote: Show quoted text
> Hi: > > So it is not possible to add it to the "GD" BUILD.pl script to check if > "libgd2" is installed and if not installed do an apt-get install ? We > might disagree on this point.
The responsibility of Build.PL and Makefile.PL is well-defined and covers only the configuration step, but not resolution of dependencies. Even Perl module dependencies are not resolved by Build.PL: it just determines which Perl module dependencies are required and missing, and leaves the installation act to CPAN.pm or cpanm, or to a human, if Build.PL was called manually (In the past there were attempts to do the installation step within Makefile.PL, see ExtUtils::AutoInstall and Module::AutoInstall, but these functionality is turned off if the installation runs within a CPAN.pm shell) Anyway, "apt-get install libgd2" does not work everywhere: $ sudo apt-get install libgd2 sudo: apt-get: command not found That's the other problem: if you start that way, then you would have to support all operating systems, not only Debian-based OS. This means different installers: apt-get, aptitude, yum, yast and others for Linux-based OS, pkg, pkg-add, portupgrade and others for FreeBSD, and others for Mac OS X, other *BSD systems, Solaris... And even if you manage this, you cannot be sure about the package name. The suggested "libgd2" does not work even for Debian, because you need to install the headers, too, so it has to be a development package, named "libgd-dev" here. Note that the "2" mysteriously vanished here. On rpm systems the suffix is not "-dev", but "-devel". FreeBSD does not make a distinction between development and non-development packages: you would use "libgd" here. Show quoted text
> I have used other CPAN libraries and not run into this problem before.
Well, that's because: * you used only pure-perl CPAN libraries * you were lucky and had the OS package already installed * there were Alien::* modules for the non-perl libraries available * the non-perl library was bundled in the perl module distribution Show quoted text
> > Could I suggest that you document the dependency on Linux "libgd2" Lib > installation as a minimum on the CPAN webpage for GD as I did not notice > this anywhere and I was lucky to find the solution quickly snooping around > various things.
You missed the obvious README or INSTALL file: https://metacpan.org/source/LDS/GD-2.56/README But maybe this document is in need of some modernization: it mentions which dependent libraries has to be installed, but nowadays it should probably also mention how to install the dependency as _packages_, at least for major OS. Show quoted text
> I had to dig down into the CPAN debugging logs in order to > realize what happened and why it was not working. Not all linux systems > come with "libgd2" pre-installed. And I do not think an average user > would have found this solution. > > My expectation was that the CPAN GD would install everything it needed (and > if it is depended on an external library that it would install it as needed > -- or at least point this out as an ERROR at top level of CPAN installer > script). > > I'm just suggesting an improvement (at least document it) to make it easier > for everyone.
When I said "this ticket should be rejected" I just meant that this ticket is filed in the wrong RT project. It would really be nice if it was possible to do a fully automatic installation. But the dependency installation should remain the responsibility of the installer, so you should have filed the ticket as a wishlist item to App::cpanminus, CPAN.pm, and CPANPLUS. In fact, I can imagine that such tickets already exist. Recent CPAN.pm versions have a plugin mechanism. This can be used to handle OS package dependencies. Here's a sketch how this can be done: https://gist.github.com/eserte/1a8b031d7ba463dbf3d1 Regards, Slaven
Subject: Re: [rt.cpan.org #107210] GD install bug when using CPANM (minus)
Date: Tue, 6 Oct 2015 18:59:33 -0400
To: bug-GD [...] rt.cpan.org
From: unsec treedee <unsectreedee [...] gmail.com>
Download (untitled) / with headers
text/plain 4.3k
Thanks very much Slaven for your response. I agree, this is definitely a short coming of the CPAN installer modules themselves. They should have a plugin or be able to read some file that contains external dependencies and then take the appropriate OS specific action to complete the install. Cheers :-) On Mon, Oct 5, 2015 at 2:56 PM, Slaven_Rezic via RT <bug-GD@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=107210 > > > On 2015-09-21 14:49:57, unsectreedee@gmail.com wrote:
> > Hi: > > > > So it is not possible to add it to the "GD" BUILD.pl script to check if > > "libgd2" is installed and if not installed do an apt-get install ? We > > might disagree on this point.
> > The responsibility of Build.PL and Makefile.PL is well-defined and > covers only the configuration step, but not resolution of > dependencies. Even Perl module dependencies are not resolved by > Build.PL: it just determines which Perl module dependencies are > required and missing, and leaves the installation act to CPAN.pm or > cpanm, or to a human, if Build.PL was called manually (In the past > there were attempts to do the installation step within Makefile.PL, > see ExtUtils::AutoInstall and Module::AutoInstall, but these > functionality is turned off if the installation runs within a CPAN.pm > shell) > > Anyway, "apt-get install libgd2" does not work everywhere: > > $ sudo apt-get install libgd2 > sudo: apt-get: command not found > > That's the other problem: if you start that way, then you would have > to support all operating systems, not only Debian-based OS. This means > different installers: apt-get, aptitude, yum, yast and others for > Linux-based OS, pkg, pkg-add, portupgrade and others for FreeBSD, and > others for Mac OS X, other *BSD systems, Solaris... And even if you > manage this, you cannot be sure about the package name. The suggested > "libgd2" does not work even for Debian, because you need to install > the headers, too, so it has to be a development package, named > "libgd-dev" here. Note that the "2" mysteriously vanished here. On rpm > systems the suffix is not "-dev", but "-devel". FreeBSD does not make > a distinction between development and non-development packages: you > would use "libgd" here. >
> > I have used other CPAN libraries and not run into this problem before.
> > Well, that's because: > > * you used only pure-perl CPAN libraries > > * you were lucky and had the OS package already installed > > * there were Alien::* modules for the non-perl libraries available > > * the non-perl library was bundled in the perl module distribution >
> > > > Could I suggest that you document the dependency on Linux "libgd2" Lib > > installation as a minimum on the CPAN webpage for GD as I did not notice > > this anywhere and I was lucky to find the solution quickly snooping
> around
> > various things.
> > You missed the obvious README or INSTALL file: > https://metacpan.org/source/LDS/GD-2.56/README > But maybe this document is in need of some modernization: it mentions > which dependent libraries has to be installed, but nowadays it should > probably also mention how to install the dependency as _packages_, at > least for major OS. >
> > I had to dig down into the CPAN debugging logs in order to > > realize what happened and why it was not working. Not all linux systems > > come with "libgd2" pre-installed. And I do not think an average user > > would have found this solution. > > > > My expectation was that the CPAN GD would install everything it needed
> (and
> > if it is depended on an external library that it would install it as
> needed
> > -- or at least point this out as an ERROR at top level of CPAN installer > > script). > > > > I'm just suggesting an improvement (at least document it) to make it
> easier
> > for everyone.
> > When I said "this ticket should be rejected" I just meant that this > ticket is filed in the wrong RT project. It would really be nice if it > was possible to do a fully automatic installation. But the dependency > installation should remain the responsibility of the installer, so you > should have filed the ticket as a wishlist item to App::cpanminus, > CPAN.pm, and CPANPLUS. In fact, I can imagine that such tickets > already exist. > > Recent CPAN.pm versions have a plugin mechanism. This can be used to > handle OS package dependencies. Here's a sketch how this can be done: > https://gist.github.com/eserte/1a8b031d7ba463dbf3d1 > > Regards, > Slaven > >


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.