読者です 読者をやめる 読者になる 読者になる

詩と創作・思索のひろば

ドキドキギュンギュンダイアリーです!!!

To install Math::BigInt::GMP with homebrewed GMP

Perl

The Problem

% cpanm -v Math::BigInt::GMP
cpanm (App::cpanminus) 1.7000 on perl 5.014002 built for darwin-2level
Work directory is /Users/motemen/.cpanm/work/1381980252.48465
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching Math::BigInt::GMP on cpanmetadb ...
--> Working on Math::BigInt::GMP
Fetching http://www.cpan.org/authors/id/P/PJ/PJACKLAM/Math-BigInt-GMP-1.37.tar.gz ... OK
Unpacking Math-BigInt-GMP-1.37.tar.gz
x Math-BigInt-GMP-1.37/
x Math-BigInt-GMP-1.37/BUGS
x Math-BigInt-GMP-1.37/build/
x Math-BigInt-GMP-1.37/build/leak.pl
x Math-BigInt-GMP-1.37/build/leaktest
x Math-BigInt-GMP-1.37/build/README
x Math-BigInt-GMP-1.37/CHANGES
x Math-BigInt-GMP-1.37/CREDITS
x Math-BigInt-GMP-1.37/GMP.xs
x Math-BigInt-GMP-1.37/inc/
x Math-BigInt-GMP-1.37/inc/Devel/
x Math-BigInt-GMP-1.37/inc/Devel/CheckLib.pm
x Math-BigInt-GMP-1.37/INSTALL
x Math-BigInt-GMP-1.37/lib/
x Math-BigInt-GMP-1.37/lib/Math/
x Math-BigInt-GMP-1.37/lib/Math/BigInt/
x Math-BigInt-GMP-1.37/lib/Math/BigInt/GMP.pm
x Math-BigInt-GMP-1.37/LICENSE
x Math-BigInt-GMP-1.37/Makefile.PL
x Math-BigInt-GMP-1.37/MANIFEST
x Math-BigInt-GMP-1.37/MANIFEST.SKIP
x Math-BigInt-GMP-1.37/META.json
x Math-BigInt-GMP-1.37/META.yml
x Math-BigInt-GMP-1.37/README
x Math-BigInt-GMP-1.37/SIGNATURE
x Math-BigInt-GMP-1.37/t/
x Math-BigInt-GMP-1.37/t/00sig.t
x Math-BigInt-GMP-1.37/t/01load.t
x Math-BigInt-GMP-1.37/t/02pod.t
x Math-BigInt-GMP-1.37/t/03podcov.t
x Math-BigInt-GMP-1.37/t/bigfltpm.inc
x Math-BigInt-GMP-1.37/t/bigfltpm.t
x Math-BigInt-GMP-1.37/t/bigintg.t
x Math-BigInt-GMP-1.37/t/bigintpm.inc
x Math-BigInt-GMP-1.37/t/bigintpm.t
x Math-BigInt-GMP-1.37/t/biglog.t
x Math-BigInt-GMP-1.37/t/bigroot.t
x Math-BigInt-GMP-1.37/t/storable.t
x Math-BigInt-GMP-1.37/t/threads.t
x Math-BigInt-GMP-1.37/TODO
x Math-BigInt-GMP-1.37/typemap
Entering Math-BigInt-GMP-1.37
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.68)
Running Makefile.PL
Configuring Math-BigInt-GMP-1.37 ... Can't link/include 'gmp'
N/A
! Configure failed for Math-BigInt-GMP-1.37. See /Users/motemen/.cpanm/work/1381980252.48465/build.log for details.

The Solution

% cpanm Math::BigInt::GMP --configure-args="LIBS=-L$(brew --prefix gmp)/lib\ -lgmp INC=-I$(brew --prefix gmp)/include"
--> Working on Math::BigInt::GMP
Fetching http://www.cpan.org/authors/id/P/PJ/PJACKLAM/Math-BigInt-GMP-1.37.tar.gz ... OK
Configuring Math-BigInt-GMP-1.37 ... OK
Building and testing Math-BigInt-GMP-1.37 ... OK
Successfully installed Math-BigInt-GMP-1.37
1 distribution installed

Success!!