Subject: | Missing gmp.h (gmp-devel) dependency check? |
I was trying to install Net-SSH-Perl, which needed Math-GMP.
Math-GMP failed with the following (using cpanm):
Searching Math::GMP on cpanmetadb ...
--> Working on Math::GMP
Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/Math-GMP-2.07.tar.gz
-> OK
Unpacking Math-GMP-2.07.tar.gz
Entering Math-GMP-2.07
Checking configure dependencies from META.yml
Configuring Math-GMP-2.07
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Math::GMP
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.88)
Building and testing Math-GMP-2.07
cp lib/Math/GMP.pm blib/lib/Math/GMP.pm
AutoSplitting blib/lib/Math/GMP.pm (blib/lib/auto/Math/GMP)
Running Mkbootstrap for Math::GMP ()
chmod 644 GMP.bs
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap -typemap typemap GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"2.07\" -DXS_VERSION=\"2.07\" -fPIC "-I/usr/lib64/perl5/CORE" GMP.c
GMP.xs:4:17: error: gmp.h: No such file or directory
GMP.xs: In function ‘constant’:
GMP.xs:51: warning: label ‘not_there’ defined but not used
GMP.xs: At top level:
then a lot more errors and warning. The key bit was that I was missing gmp.h, which I found to be a part of the CentOS 6 'gmp-devel' package using 'yum whatprovides */gmp.h'. But, just wondering or suggesting - is there a way to have it fail out on a gmp.h check prior to trying to actually build? I would have found that more intuitive. Thanks, and thanks for the software!