This is one of those Mac OS weirdnesses that I think can be fixed by shuffling
the order of the #include<>s around (yes, really).
I only have access to a Mac OS 10.6 system, where mahotas compiles cleanly.
Can you try changing the order of the includes in _convex.cpp?
Other than that, it's hard for me to help you.
Sorry
Luis
On Thursday, August 30, 2012 03:38:24 PM Davide Cittaro wrote:
> Hi there, I'm trying to install mahotas on OS X 10.8 and I get this long
> error, which I guess is due to the different c++ compiler (clang in place
> of gcc):
>
> customize UnixCCompiler
> #### ['clang', '-fno-strict-aliasing', '-fno-common', '-dynamic', '-g',
> '-Os', '-pipe', '-fno-common', '-fno-strict-aliasing', '-fwrapv',
> '-mno-fused-madd', '-DENABLE_DTRACE', '-DMACOSX', '-DNDEBUG', '-Wall',
> '-Wstrict-prototypes', '-Wshorten-64-to-32', '-DNDEBUG', '-g', '-Os',
> '-Wall', '-Wstrict-prototypes', '-DENABLE_DTRACE', '-arch', 'i386',
> '-arch', 'x86_64'] ####### Missing compiler_cxx fix for UnixCCompiler
> customize UnixCCompiler using build_ext
> building 'mahotas._convex' extension
> compiling C++ sources
> C compiler: clang++ -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe
> -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE
> -DMACOSX -DNDEBUG -Wall -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall
> -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe
>
> compile options:
> '-I/Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7
> -macosx-10.8-x86_64.egg/numpy/core/include
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.
> 7 -c' clang++: mahotas/_convex.cpp
> clang: warning: argument unused during compilation: '-mno-fused-madd'
> In file included from mahotas/_convex.cpp:7:
> In file included from mahotas/utils.hpp:6:
> In file included from
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17: In file
> included from
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1722:
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
> warning: "Using deprecated NumPy API, disable it by #defining
> NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using
> deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
> NPY_1_7_API_VERSION" ^
> In file included from mahotas/_convex.cpp:8:
> In file included from mahotas/numpypp/array.hpp:9:
> In file included from /usr/include/c++/4.2.1/iterator:69:
> In file included from /usr/include/c++/4.2.1/ostream:44:
> In file included from /usr/include/c++/4.2.1/ios:46:
> /usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments
> provided to function-like macro invocation isspace(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace'
> declared as a template isspace(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:69:21: error: too many arguments
> provided to function-like macro invocation isupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:68:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:69:5: error: variable 'isupper'
> declared as a template isupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:73:21: error: too many arguments
> provided to function-like macro invocation islower(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:72:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:73:5: error: variable 'islower'
> declared as a template islower(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:77:21: error: too many arguments
> provided to function-like macro invocation isalpha(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:76:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:77:5: error: variable 'isalpha'
> declared as a template isalpha(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:93:21: error: too many arguments
> provided to function-like macro invocation isalnum(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:92:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:93:5: error: variable 'isalnum'
> declared as a template isalnum(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:101:21: error: too many arguments
> provided to function-like macro invocation toupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:100:5: error: 'inline' can only
> appear on functions inline _CharT
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:101:5: error: variable 'toupper'
> declared as a template toupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:105:21: error: too many arguments
> provided to function-like macro invocation tolower(_CharT, const locale&);
> ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 1 warning and 20 errors generated.
> clang: warning: argument unused during compilation: '-mno-fused-madd'
> In file included from mahotas/_convex.cpp:7:
> In file included from mahotas/utils.hpp:6:
> In file included from
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17: In file
> included from
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1722:
> /Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-ma
> cosx-10.8-x86_64.egg/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
> warning: "Using deprecated NumPy API, disable it by #defining
> NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using
> deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
> NPY_1_7_API_VERSION" ^
> In file included from mahotas/_convex.cpp:8:
> In file included from mahotas/numpypp/array.hpp:9:
> In file included from /usr/include/c++/4.2.1/iterator:69:
> In file included from /usr/include/c++/4.2.1/ostream:44:
> In file included from /usr/include/c++/4.2.1/ios:46:
> /usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments
> provided to function-like macro invocation isspace(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace'
> declared as a template isspace(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:69:21: error: too many arguments
> provided to function-like macro invocation isupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:68:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:69:5: error: variable 'isupper'
> declared as a template isupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:73:21: error: too many arguments
> provided to function-like macro invocation islower(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:72:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:73:5: error: variable 'islower'
> declared as a template islower(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:77:21: error: too many arguments
> provided to function-like macro invocation isalpha(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:76:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:77:5: error: variable 'isalpha'
> declared as a template isalpha(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:93:21: error: too many arguments
> provided to function-like macro invocation isalnum(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:92:5: error: 'inline' can only
> appear on functions inline bool
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:93:5: error: variable 'isalnum'
> declared as a template isalnum(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:101:21: error: too many arguments
> provided to function-like macro invocation toupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:100:5: error: 'inline' can only
> appear on functions inline _CharT
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:101:5: error: variable 'toupper'
> declared as a template toupper(_CharT, const locale&);
> ^
> /usr/include/c++/4.2.1/bits/localefwd.h:105:21: error: too many arguments
> provided to function-like macro invocation tolower(_CharT, const locale&);
> ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 1 warning and 20 errors generated.
> error: Command "clang++ -fno-strict-aliasing -fno-common -dynamic -g -Os
> -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
> -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wshorten-64-to-32 -DNDEBUG -g -Os
> -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe
> -I/Library/Python/2.7/site-packages/numpy-1.8.0.dev_5c944b9_20120828-py2.7-
> macosx-10.8-x86_64.egg/numpy/core/include
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.
> 7 -c mahotas/_convex.cpp -o
> build/temp.macosx-10.8-intel-2.7/mahotas/_convex.o" failed with exit status
> 1
>
> Any help?
>
> d
>
> ---
> Davide Cittaro
>
daweo...@gmail.com
>
http://sites.google.com/site/davidecittaro/
--
Luis Pedro Coelho | Institute for Molecular Medicine |
http://luispedro.org