I've worked on this problem for a few days and couldn't find any solution even after reading several other blogs.
Whenever I try to install modules using CPAN, these installs fail since 'make' errors.
cpan[1]> install Clone
CPAN: Storable loaded ok (v2.18)
Reading '/Users/erikhanschen/.cpan/Metadata'
Database was generated on Wed, 11 Jun 2014 12:06:12 GMT
CPAN: YAML loaded ok (v0.92)
CPAN: Time::HiRes loaded ok (v1.9711)
Reading 49 yaml files from /Users/erikhanschen/.cpan/build/
DONE
Restored the state of none (in 1.7859 secs)
Running install for module 'Clone'
GARU/Clone-0.37.tar.gz
Has already been unwrapped into directory /Users/erikhanschen/.cpan/build/Clone-0.37-F3R5u0
GARU/Clone-0.37.tar.gz
Has already been prepared
GARU/Clone-0.37.tar.gz
Could not make: Unknown error
CPAN: CPAN::Meta loaded ok (v2.120351)
cpan[2]>
After I had to replaced my hard drive recently, I had to re-install Xcode but even after that, the make command didn't work. Uninstalling Xcode and installing GCC compiler instead didn't help. make is in /usr/bin/ and that directory is in my PATH, and make and GCC run when run without arguments, but the CPAN installer still can't find it when I'm trying to install a module.
After removing the contents of the CPAN build directory, trying to install a module still crashes at "make".
cpan[2]> install Clone
Running install for module 'Clone'
CPAN: Digest::SHA loaded ok (v5.45)
CPAN: Compress::Zlib loaded ok (v2.008)
Checksum for /Users/erikhanschen/.cpan/sources/authors/id/G/GA/GARU/Clone- 0.37.tar.gz ok
Scanning cache /Users/erikhanschen/.cpan/build for sizes
DONE
CPAN: Archive::Tar loaded ok (v1.96)
x Clone-0.37/
x Clone-0.37/Changes
x Clone-0.37/Clone.pm
x Clone-0.37/Clone.xs
x Clone-0.37/Makefile.PL
x Clone-0.37/MANIFEST
x Clone-0.37/META.json
x Clone-0.37/META.yml
x Clone-0.37/README
x Clone-0.37/t/
x Clone-0.37/t/01array.t
x Clone-0.37/t/02hash.t
x Clone-0.37/t/03scalar.t
x Clone-0.37/t/04tie.t
x Clone-0.37/t/05dtype.t
x Clone-0.37/t/06refcnt.t
x Clone-0.37/t/07magic.t
x Clone-0.37/t/08fieldhash.t
x Clone-0.37/t/dclone.t
x Clone-0.37/t/dump.pl
x Clone-0.37/t/tied.pl
CPAN: File::Temp loaded ok (v0.2304)
CPAN: Module::CoreList loaded ok (v2.13)
Configuring G/GA/GARU/Clone-0.37.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
'EXPATINCPATH' is not a known MakeMaker parameter name.
'EXPATLIBPATH' is not a known MakeMaker parameter name.
Generating a Unix-style Makefile
Writing Makefile for Clone
Writing MYMETA.yml and MYMETA.json
GARU/Clone-0.37.tar.gz
/usr/bin/perl Makefile.PL EXPATLIBPATH=/non-standard/lib EXPATINCPATH=/non-standard/include -- OK
Running make for G/GA/GARU/Clone-0.37.tar.gz
cp Clone.pm blib/lib/Clone.pm
AutoSplitting blib/lib/Clone.pm (blib/lib/auto/Clone)
Running Mkbootstrap for Clone ()
chmod 644 Clone.bs
/usr/bin/perl /Library/Perl/Updates/5.10.0/ExtUtils/xsubpp -typemap /System/Library/Perl/5.10.0/ExtUtils/typemap Clone.xs > Clone.xsc && mv Clone.xsc Clone.c
gcc-4.2 -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -O3 -DVERSION=\"0.37\" -DXS_VERSION=\"0.37\" "- I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE" Clone.c
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
lipo: can't open input file: /var/tmp//cc23LjqR.out (No such file or directory)
make: *** [Clone.o] Error 2
GARU/Clone-0.37.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
GARU/Clone-0.37.tar.gz : make NO
I've already updated perl, CPAN, and Module::Build. I'm thinking the next step is to upgrade to 10.7, 10.8, or 10.9 and try to reinstall Command Line Tools straight from Apple.
Thoughts?
I had to re-install Xcode but even after that, the make command didn't work...
Install Command Line tools. Open Xcode, and then go to Xcode → Preferences → Downloads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With