Troubleshoot Perl module installation on Mac OS X
- by Daniel Standage
I'm trying to install the Perl module Set::IntervalTree on Mac OS X. I recently installed it today on an Ubuntu box with no problem. I simply started cpan, entered install Set:IntervalTree, and it all worked out. However, the installation failed on Mac OS X--it spits out a huge list of compiler errors (below). How would I troubleshoot this. I don't even know where to begin.
cpan[1]> install Set::IntervalTree
CPAN: Storable loaded ok (v2.18)
Going to read /Users/standage/.cpan/Metadata
Database was generated on Fri, 14 Jan 2011 02:58:42 GMT
CPAN: YAML loaded ok (v0.72)
Going to read /Users/standage/.cpan/build/
............................................................................DONE
Found 1 old build, restored the state of 1
Running install for module 'Set::IntervalTree'
Running make for B/BE/BENBOOTH/Set-IntervalTree-0.01.tar.gz
CPAN: Digest::SHA loaded ok (v5.45)
CPAN: Compress::Zlib loaded ok (v2.008)
Checksum for /Users/standage/.cpan/sources/authors/id/B/BE/BENBOOTH/Set-IntervalTree-0.01.tar.gz ok
Scanning cache /Users/standage/.cpan/build for sizes
............................................................................DONE
x Set-IntervalTree-0.01/
x Set-IntervalTree-0.01/src/
x Set-IntervalTree-0.01/src/Makefile
x Set-IntervalTree-0.01/src/interval_tree.h
x Set-IntervalTree-0.01/src/test_main.cc
x Set-IntervalTree-0.01/lib/
x Set-IntervalTree-0.01/lib/Set/
x Set-IntervalTree-0.01/lib/Set/IntervalTree.pm
x Set-IntervalTree-0.01/Changes
x Set-IntervalTree-0.01/MANIFEST
x Set-IntervalTree-0.01/t/
x Set-IntervalTree-0.01/t/Set-IntervalTree.t
x Set-IntervalTree-0.01/typemap
x Set-IntervalTree-0.01/perlobject.map
x Set-IntervalTree-0.01/IntervalTree.xs
x Set-IntervalTree-0.01/Makefile.PL
x Set-IntervalTree-0.01/README
x Set-IntervalTree-0.01/META.yml
CPAN: File::Temp loaded ok (v0.18)
CPAN.pm: Going to build B/BE/BENBOOTH/Set-IntervalTree-0.01.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Set::IntervalTree
cp lib/Set/IntervalTree.pm blib/lib/Set/IntervalTree.pm
AutoSplitting blib/lib/Set/IntervalTree.pm (blib/lib/auto/Set/IntervalTree)
/usr/bin/perl /System/Library/Perl/5.10.0/ExtUtils/xsubpp -C++ -typemap /System/Library/Perl/5.10.0/ExtUtils/typemap -typemap perlobject.map -typemap typemap IntervalTree.xs > IntervalTree.xsc && mv IntervalTree.xsc IntervalTree.c
g++ -c -Isrc -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -g -O0 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" "-I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE" -Isrc IntervalTree.c
In file included from /usr/include/c++/4.2.1/bits/basic_ios.h:44,
from /usr/include/c++/4.2.1/ios:50,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iostream:45,
from IntervalTree.xs:16:
/usr/include/c++/4.2.1/bits/locale_facets.h:4420:40: error: macro "do_open" requires 7 arguments, but only 2 given
/usr/include/c++/4.2.1/bits/locale_facets.h:4467:34: error: macro "do_close" requires 2 arguments, but only 1 given
/usr/include/c++/4.2.1/bits/locale_facets.h:4486:55: error: macro "do_open" requires 7 arguments, but only 2 given
/usr/include/c++/4.2.1/bits/locale_facets.h:4513:23: error: macro "do_close" requires 2 arguments, but only 1 given
In file included from /usr/include/c++/4.2.1/bits/locale_facets.h:4599,
from /usr/include/c++/4.2.1/bits/basic_ios.h:44,
from /usr/include/c++/4.2.1/ios:50,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iostream:45,
from IntervalTree.xs:16:
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/messages_members.h:58:38: error: macro "do_open" requires 7 arguments, but only 2 given
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/messages_members.h:67:71: error: macro "do_open" requires 7 arguments, but only 2 given
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/messages_members.h:78:39: error: macro "do_close" requires 2 arguments, but only 1 given
In file included from /usr/include/c++/4.2.1/bits/basic_ios.h:44,
from /usr/include/c++/4.2.1/ios:50,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iostream:45,
from IntervalTree.xs:16:
/usr/include/c++/4.2.1/bits/locale_facets.h:4486: error: ‘do_open’ declared as a ‘virtual’ field
/usr/include/c++/4.2.1/bits/locale_facets.h:4486: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:4513: error: variable or field ‘do_close’ declared void
/usr/include/c++/4.2.1/bits/locale_facets.h:4513: error: expected ‘;’ before ‘const’
In file included from /usr/include/c++/4.2.1/bits/locale_facets.h:4599,
from /usr/include/c++/4.2.1/bits/basic_ios.h:44,
from /usr/include/c++/4.2.1/ios:50,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iostream:45,
from IntervalTree.xs:16:
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/messages_members.h:67: error: expected initializer before ‘const’
/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/messages_members.h:78: error: expected initializer before ‘const’
In file included from IntervalTree.xs:19:
src/interval_tree.h:95: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
src/interval_tree.h:95: error: expected a type, got ‘IntervalTree<T,N>::it_recursion_node’
src/interval_tree.h:95: error: template argument 2 is invalid
src/interval_tree.h: In constructor ‘IntervalTree<T, N>::IntervalTree()’:
src/interval_tree.h:130: error: expected type-specifier
src/interval_tree.h:130: error: expected `;'
src/interval_tree.h:135: error: expected type-specifier
src/interval_tree.h:135: error: expected `;'
src/interval_tree.h:141: error: request for member ‘push_back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::LeftRotate(IntervalTree<T, N>::Node*)’:
src/interval_tree.h:178: error: ‘y’ was not declared in this scope
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::RightRotate(IntervalTree<T, N>::Node*)’:
src/interval_tree.h:240: error: ‘x’ was not declared in this scope
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::TreeInsertHelp(IntervalTree<T, N>::Node*)’:
src/interval_tree.h:298: error: ‘x’ was not declared in this scope
src/interval_tree.h:299: error: ‘y’ was not declared in this scope
src/interval_tree.h: In member function ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::insert(const T&, N, N)’:
src/interval_tree.h:375: error: ‘y’ was not declared in this scope
src/interval_tree.h:376: error: ‘x’ was not declared in this scope
src/interval_tree.h:377: error: ‘newNode’ was not declared in this scope
src/interval_tree.h:379: error: expected type-specifier
src/interval_tree.h:379: error: expected `;'
src/interval_tree.h: In member function ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::GetSuccessorOf(IntervalTree<T, N>::Node*) const’:
src/interval_tree.h:450: error: ‘y’ was not declared in this scope
src/interval_tree.h: In member function ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::GetPredecessorOf(IntervalTree<T, N>::Node*) const’:
src/interval_tree.h:483: error: ‘y’ was not declared in this scope
src/interval_tree.h: In destructor ‘IntervalTree<T, N>::~IntervalTree()’:
src/interval_tree.h:546: error: ‘x’ was not declared in this scope
src/interval_tree.h:547: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
src/interval_tree.h:547: error: expected a type, got ‘(IntervalTree<T,N>::Node * <expression error>)’
src/interval_tree.h:547: error: template argument 2 is invalid
src/interval_tree.h:547: error: invalid type in declaration before ‘;’ token
src/interval_tree.h:551: error: request for member ‘push_back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:554: error: request for member ‘push_back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:557: error: request for member ‘empty’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:558: error: request for member ‘back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:559: error: request for member ‘pop_back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:561: error: request for member ‘push_back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h:564: error: request for member ‘push_back’ in ‘stuffToFree’, which is of non-class type ‘int’
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::DeleteFixUp(IntervalTree<T, N>::Node*)’:
src/interval_tree.h:613: error: ‘w’ was not declared in this scope
src/interval_tree.h:614: error: ‘rootLeft’ was not declared in this scope
src/interval_tree.h: In member function ‘T IntervalTree<T, N>::remove(IntervalTree<T, N>::Node*)’:
src/interval_tree.h:697: error: ‘y’ was not declared in this scope
src/interval_tree.h:698: error: ‘x’ was not declared in this scope
src/interval_tree.h: In member function ‘std::vector<T, std::allocator<_CharT> > IntervalTree<T, N>::fetch(N, N)’:
src/interval_tree.h:819: error: ‘x’ was not declared in this scope
src/interval_tree.h:833: error: invalid types ‘int[size_t]’ for array subscript
src/interval_tree.h:836: error: request for member ‘push_back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:837: error: request for member ‘back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:838: error: request for member ‘back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:839: error: request for member ‘back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:840: error: request for member ‘size’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:846: error: request for member ‘size’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:847: error: expected `;' before ‘back’
src/interval_tree.h:848: error: request for member ‘pop_back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:850: error: ‘back’ was not declared in this scope
src/interval_tree.h:853: error: invalid types ‘int[size_t]’ for array subscript
IntervalTree.c: In function ‘void boot_Set__IntervalTree(PerlInterpreter*, CV*)’:
IntervalTree.c:365: warning: deprecated conversion from string constant to ‘char*’
src/interval_tree.h: In constructor ‘IntervalTree<T, N>::IntervalTree() [with T = std::tr1::shared_ptr<sv>, N = long int]’:
IntervalTree.c:67: instantiated from here
src/interval_tree.h:130: error: cannot convert ‘int*’ to ‘IntervalTree<std::tr1::shared_ptr<sv>, long int>::Node*’ in assignment
src/interval_tree.h:135: error: cannot convert ‘int*’ to ‘IntervalTree<std::tr1::shared_ptr<sv>, long int>::Node*’ in assignment
...blah blah blah...
...blah blah blah...
...blah blah blah...
...blah blah blah...
...blah blah blah...
...blah blah blah...
src/interval_tree.h:848: error: request for member ‘pop_back’ in ‘((IntervalTree<T, N>*)this)->IntervalTree<T, N>::recursionNodeStack’, which is of non-class type ‘int’
src/interval_tree.h:850: error: ‘back’ was not declared in this scope
src/interval_tree.h:853: error: invalid types ‘int[size_t]’ for array subscript
IntervalTree.c: In function ‘void boot_Set__IntervalTree(PerlInterpreter*, CV*)’:
IntervalTree.c:365: warning: deprecated conversion from string constant to ‘char*’
src/interval_tree.h: In constructor ‘IntervalTree<T, N>::IntervalTree() [with T = std::tr1::shared_ptr<sv>, N = long int]’:
IntervalTree.c:67: instantiated from here
src/interval_tree.h:130: error: cannot convert ‘int*’ to ‘IntervalTree<std::tr1::shared_ptr<sv>, long int>::Node*’ in assignment
src/interval_tree.h:135: error: cannot convert ‘int*’ to ‘IntervalTree<std::tr1::shared_ptr<sv>, long int>::Node*’ in assignment
src/interval_tree.h: In member function ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::insert(const T&, N, N) [with T = std::tr1::shared_ptr<sv>, N = long int]’:
IntervalTree.xs:57: instantiated from here
src/interval_tree.h:375: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:375: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h:376: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:376: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h:377: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:377: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h: In member function ‘std::vector<T, std::allocator<_CharT> > IntervalTree<T, N>::fetch(N, N) [with T = std::tr1::shared_ptr<sv>, N = long int]’:
IntervalTree.xs:65: instantiated from here
src/interval_tree.h:819: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:819: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
IntervalTree.xs:65: instantiated from here
src/interval_tree.h:847: error: dependent-name ‘IntervalTree<T,N>::it_recursion_node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:847: note: say ‘typename IntervalTree<T,N>::it_recursion_node’ if a type is meant
src/interval_tree.h: In destructor ‘IntervalTree<T, N>::~IntervalTree() [with T = std::tr1::shared_ptr<sv>, N = long int]’:
IntervalTree.c:205: instantiated from here
src/interval_tree.h:546: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:546: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::TreeInsertHelp(IntervalTree<T, N>::Node*) [with T = std::tr1::shared_ptr<sv>, N = long int]’:
src/interval_tree.h:380: instantiated from ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::insert(const T&, N, N) [with T = std::tr1::shared_ptr<sv>, N = long int]’
IntervalTree.xs:57: instantiated from here
src/interval_tree.h:298: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:298: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h:299: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:299: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::LeftRotate(IntervalTree<T, N>::Node*) [with T = std::tr1::shared_ptr<sv>, N = long int]’:
src/interval_tree.h:395: instantiated from ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::insert(const T&, N, N) [with T = std::tr1::shared_ptr<sv>, N = long int]’
IntervalTree.xs:57: instantiated from here
src/interval_tree.h:178: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:178: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
src/interval_tree.h: In member function ‘void IntervalTree<T, N>::RightRotate(IntervalTree<T, N>::Node*) [with T = std::tr1::shared_ptr<sv>, N = long int]’:
src/interval_tree.h:399: instantiated from ‘typename IntervalTree<T, N>::Node* IntervalTree<T, N>::insert(const T&, N, N) [with T = std::tr1::shared_ptr<sv>, N = long int]’
IntervalTree.xs:57: instantiated from here
src/interval_tree.h:240: error: dependent-name ‘IntervalTree<T,N>::Node’ is parsed as a non-type, but instantiation yields a type
src/interval_tree.h:240: note: say ‘typename IntervalTree<T,N>::Node’ if a type is meant
lipo: can't open input file: /var/tmp//ccLthuaw.out (No such file or directory)
make: *** [IntervalTree.o] Error 1
BENBOOTH/Set-IntervalTree-0.01.tar.gz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
BENBOOTH/Set-IntervalTree-0.01.tar.gz : make NO