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

詩と創作・思索のひろば

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

Installing Term::ReadLine::Gnu with Homebrewed readline

Perl homebrew

[2013-09-05] Now cpanminus 1.7 is out and below is old-dated. Check out here.

The Problem

% cpanm Term::ReadLine::Gnu --look
--> Working on Term::ReadLine::Gnu
Fetching http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.20.tar.gz ... OK
Entering /Users/motemen/.cpanm/work/1376970318.31747/Term-ReadLine-Gnu-1.20 with /bin/zsh
\\\└('ω')」////

% perl Makefile.PL 
Found `/usr/lib/libtermcap.dylib'.
cc  -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -Wdeclaration-after-statement -DHAVE_STRING_H rlver.c -o rlver    -lreadline -ltermcap
rlver.c:4:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main() { puts(rl_library_version); }
^~~~
1 warning generated.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The libreadline you are using is the libedit library.  Use the GNU Readline Library.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The Solution

% cpanm Term::ReadLine::Gnu --look
% perl Makefile.PL --prefix=$(brew --prefix readline)
% make
% make install

Success!!