luispedro/mahotas — Issue #4: 0.7 won't compile on OS X 10.7
Author: ijstokes
Created: 2011-12-16 20:29:36+00:00
State: open

I've just tried installing via pip and easy_install, and also from the latest git clone, but I always end up with the same set of errors (below). I went back to 0.6.6 and it works OK. I tried figuring out the cause of the problem, but without success. I have the latest XCode gcc (4.2.1) and also macports gcc (4.4.0), but both produce the same problems (below).

Cheers,

Ian

compile options: '-I/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/7.1/include/python2.7 -c'
g++: mahotas/_interpolate.cpp
In file included from /usr/include/c++/4.2.1/ios:47,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/localefwd.h:58:34: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:70:34: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:74:34: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:78:34: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:94:34: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:102:34: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:106:34: error: macro "tolower" passed 2 arguments, but takes just 1
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h:245:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:274:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:817:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:850:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4614:44: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4632:44: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4638:44: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4644:44: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4668:44: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4680:44: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4686:44: error: macro "tolower" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/4.2.1/ios:47,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/localefwd.h:58: error: ‘std::isspace’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:58: error: template declaration of ‘bool std::isspace’
/usr/include/c++/4.2.1/bits/localefwd.h:70: error: ‘std::isupper’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:70: error: template declaration of ‘bool std::isupper’
/usr/include/c++/4.2.1/bits/localefwd.h:74: error: ‘std::islower’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:74: error: template declaration of ‘bool std::islower’
/usr/include/c++/4.2.1/bits/localefwd.h:78: error: ‘std::isalpha’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:78: error: template declaration of ‘bool std::isalpha’
/usr/include/c++/4.2.1/bits/localefwd.h:94: error: ‘std::isalnum’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:94: error: template declaration of ‘bool std::isalnum’
/usr/include/c++/4.2.1/bits/localefwd.h:102: error: ‘std::toupper’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:102: error: template declaration of ‘_CharT std::toupper’
/usr/include/c++/4.2.1/bits/localefwd.h:106: error: ‘std::tolower’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:106: error: template declaration of ‘_CharT std::tolower’
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h:230: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:245: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:258: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h:259: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:274: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:290: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘_CharT std::__ctype_abstract_base<_CharT>::towupper(int (*)(_CharT)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:231: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘_CharT std::__ctype_abstract_base<_CharT>::towlower(int (*)(_CharT)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:260: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: At global scope:
/usr/include/c++/4.2.1/bits/locale_facets.h:800: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:817: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:832: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h:833: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:850: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:869: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘char std::ctype::towupper(int (*)(char)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:801: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘char std::ctype::towlower(int (*)(char)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:834: error: ‘__c’ was not declared in this scope
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h: At global scope:
/usr/include/c++/4.2.1/bits/locale_facets.h:4614: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4632: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4638: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4644: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4668: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4680: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4686: error: function definition does not declare parameters
In file included from /usr/include/c++/4.2.1/ios:47,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/localefwd.h:58:34: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:70:34: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:74:34: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:78:34: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:94:34: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:102:34: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/localefwd.h:106:34: error: macro "tolower" passed 2 arguments, but takes just 1
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h:245:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:274:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:817:53: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:850:53: error: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4614:44: error: macro "isspace" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4632:44: error: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4638:44: error: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4644:44: error: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4668:44: error: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4680:44: error: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/4.2.1/bits/locale_facets.h:4686:44: error: macro "tolower" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/4.2.1/ios:47,
from /usr/include/c++/4.2.1/ostream:45,
from /usr/include/c++/4.2.1/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/localefwd.h:58: error: ‘std::isspace’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:58: error: template declaration of ‘bool std::isspace’
/usr/include/c++/4.2.1/bits/localefwd.h:70: error: ‘std::isupper’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:70: error: template declaration of ‘bool std::isupper’
/usr/include/c++/4.2.1/bits/localefwd.h:74: error: ‘std::islower’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:74: error: template declaration of ‘bool std::islower’
/usr/include/c++/4.2.1/bits/localefwd.h:78: error: ‘std::isalpha’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:78: error: template declaration of ‘bool std::isalpha’
/usr/include/c++/4.2.1/bits/localefwd.h:94: error: ‘std::isalnum’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:94: error: template declaration of ‘bool std::isalnum’
/usr/include/c++/4.2.1/bits/localefwd.h:102: error: ‘std::toupper’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:102: error: template declaration of ‘_CharT std::toupper’
/usr/include/c++/4.2.1/bits/localefwd.h:106: error: ‘std::tolower’ declared as an ‘inline’ variable
/usr/include/c++/4.2.1/bits/localefwd.h:106: error: template declaration of ‘_CharT std::tolower’
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h:230: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:245: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:258: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h:259: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:274: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:290: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘_CharT std::__ctype_abstract_base<_CharT>::towupper(int (*)(_CharT)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:231: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘_CharT std::__ctype_abstract_base<_CharT>::towlower(int (*)(_CharT)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:260: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: At global scope:
/usr/include/c++/4.2.1/bits/locale_facets.h:800: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:817: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:832: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h:833: error: ‘btowc’ is not a type
/usr/include/c++/4.2.1/bits/locale_facets.h:850: error: expected ‘;’ before ‘const’
/usr/include/c++/4.2.1/bits/locale_facets.h:869: error: expected `;' before ‘char_type’
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘char std::ctype::towupper(int (*)(char)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:801: error: ‘__c’ was not declared in this scope
/usr/include/c++/4.2.1/bits/locale_facets.h: In member function ‘char std::ctype::towlower(int (*)(char)) const’:
/usr/include/c++/4.2.1/bits/locale_facets.h:834: error: ‘__c’ was not declared in this scope
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/iterator:70,
from mahotas/numpypp/array.hpp:9,
from mahotas/_filters.h:2,
from mahotas/_interpolate.cpp:38:
/usr/include/c++/4.2.1/bits/locale_facets.h: At global scope:
/usr/include/c++/4.2.1/bits/locale_facets.h:4614: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4632: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4638: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4644: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4668: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4680: error: function definition does not declare parameters
/usr/include/c++/4.2.1/bits/locale_facets.h:4686: error: function definition does not declare parameters
error: Command "g++ -fno-strict-aliasing -fno-common -dynamic -arch i386 -DNDEBUG -g -O3 -arch i386 -I/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/7.1/include/python2.7 -c mahotas/_interpolate.cpp -o build/temp.macosx-10.5-i386-2.7/mahotas/_interpolate.o" failed with exit status 1