From chris.barker at noaa.gov Tue Feb 11 02:03:36 2014 From: chris.barker at noaa.gov (Chris Barker) Date: Mon, 10 Feb 2014 17:03:36 -0800 Subject: [Pythonmac-SIG] Errors building Cython extensions on 10.9... Message-ID: Hi all, Have people in general been able to get extensions to build right under 10.9? I"ve got a bunch of C++ code (and Cython-generated C++ wrappers), that hav been building fine on OS-X up to 10.8, and Windows, and LInux, but now I've got a user trying to build under 10.9, and they get a bunch of errors. They reported trying both clang and gcc, with the same (or similar) results. Error 1): In file included from gnome/cy_gnome/cy_mover.cpp:561: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/complex:246: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:1: error: 'inline' can only appear on functions inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... that's in the library code! -- weird. Then there is: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1571:46: error: call to 'scalbln' is ambiguous scalbln(_A1 __x, long __y) _NOEXCEPT {return scalbln((double)__x, __y);} ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1565:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __x, long __y... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1566:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __x, lo... Again in the library... gnome/cy_gnome/cy_mover.cpp:5082:13: error: call to 'isspace' is ambiguous if (isspace(*ts)) ^~~~~~~ /usr/include/ctype.h:267:1: note: candidate function isspace(int _c) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cctype:124:38: note: candidate function inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_i... Another library issue. So all this seems to be related to what librares 10.9 is using. Hint: On the Cython list, there was this thread: https://groups.google.com/forum/#!topic/cython-users/XfUMB1vhM3g in which the user had the same "isspace" problem. In that thread someone suggested: """ The problem seems to stem from the fact that libc++ requires the std:: namespacing. Compiling and linking with the GNU libstdc++ can use the isspace function without namespacing fine. Mavericks changed the default C++ library to libc++ """ Is there a way to get it to use the old lib, rather than changing our source and Cython, and ???? I think that Cython has been patched to remove the call to isspace, but who knows what other issues may crop up.... I don't have a 10.9 system to test on, so this will be a trick to debug, but any suggestions are welcome. Thanks, -Chris Full Error report: cc -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 -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -DpyGNOME=1 -I../lib_gnome -I/Users/kthyng/.virtualenvs/default/lib/python2.7/site-packages/numpy/core/include -I../third_party_lib/netcdf-4.3/darwin/x86_64/include -I. -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gnome/cy_gnome/cy_mover.cpp -o build/temp.macosx-10.9-intel-2.7/gnome/cy_gnome/cy_mover.o clang: warning: argument unused during compilation: '-mno-fused-madd' In file included from gnome/cy_gnome/cy_mover.cpp:350: ../lib_gnome/ShioTimeValue_c.h:88:18: warning: 'ShioTimeValue_c::ReadTimeValues' hides overloaded virtual function [-Woverloaded-virtual] virtual OSErr ReadTimeValues (char *path); ^ ../lib_gnome/OSSMTimeValue_c.h:74:18: note: hidden overloaded virtual function 'OSSMTimeValue_c::ReadTimeValues' declared here virtual OSErr ReadTimeValues (char *path, shor... ^ In file included from gnome/cy_gnome/cy_mover.cpp:352: In file included from ../lib_gnome/TimeGridVel_c.h:24: In file included from ../lib_gnome/Replacements.h:18: ../lib_gnome/CurrentMover_c.h:43:17: warning: 'CurrentMover_c::UpdateUncertainty' hides overloaded virtual function [-Woverloaded-virtual] virtual OSErr UpdateUncertainty(const Seconds& elapsed... ^ ../lib_gnome/Mover_c.h:58:17: note: hidden overloaded virtual function 'Mover_c::UpdateUncertainty' declared here virtual OSErr UpdateUncertainty(void); ^ In file included from gnome/cy_gnome/cy_mover.cpp:352: In file included from ../lib_gnome/TimeGridVel_c.h:24: In file included from ../lib_gnome/Replacements.h:19: ../lib_gnome/CATSMover_c.h:62:17: warning: 'CATSMover_c::AddUncertainty' hides overloaded virtual function [-Woverloaded-virtual] virtual OSErr AddUncertainty(long setIndex, long leInd... ^ ../lib_gnome/Mover_c.h:49:17: note: hidden overloaded virtual function 'Mover_c::AddUncertainty' declared here virtual OSErr AddUncertainty (long setIndex, long leIn... ^ In file included from gnome/cy_gnome/cy_mover.cpp:352: In file included from ../lib_gnome/TimeGridVel_c.h:24: In file included from ../lib_gnome/Replacements.h:20: ../lib_gnome/WindMover_c.h:73:17: warning: 'WindMover_c::UpdateUncertainty' hides overloaded virtual function [-Woverloaded-virtual] virtual OSErr UpdateUncertainty(const Seconds& elapsed... ^ ../lib_gnome/Mover_c.h:58:17: note: hidden overloaded virtual function 'Mover_c::UpdateUncertainty' declared here virtual OSErr UpdateUncertainty(void); ^ In file included from gnome/cy_gnome/cy_mover.cpp:360: ../lib_gnome/GridCurrentMover_c.h:49:17: warning: 'GridCurrentMover_c::AddUncertainty' hides overloaded virtual function [-Woverloaded-virtual] virtual OSErr AddUncertainty(long setIndex, long leInd... ^ ../lib_gnome/Mover_c.h:49:17: note: hidden overloaded virtual function 'Mover_c::AddUncertainty' declared here virtual OSErr AddUncertainty (long setIndex, long leIn... ^ In file included from gnome/cy_gnome/cy_mover.cpp:365: In file included from /Users/kthyng/.virtualenvs/default/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /Users/kthyng/.virtualenvs/default/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Users/kthyng/.virtualenvs/default/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760: /Users/kthyng/.virtualenvs/default/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15: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 " \ ^ In file included from gnome/cy_gnome/cy_mover.cpp:561: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/complex:246: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:1: error: 'inline' can only appear on functions inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:46: error: redefinition of 'floor' as different kind of symbol inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... ^ ../lib_gnome/TypeDefs.h:197:18: note: expanded from macro 'round' #define round(n) floor((n) + 0.5) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:833:1: note: previous definition is here floor(_A1 __x) _NOEXCEPT {return floor((double)__x);} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:58: error: expected ')' inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... ^ ../lib_gnome/TypeDefs.h:197:25: note: expanded from macro 'round' #define round(n) floor((n) + 0.5) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:46: note: to match this '(' inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... ^ ../lib_gnome/TypeDefs.h:197:24: note: expanded from macro 'round' #define round(n) floor((n) + 0.5) ^ In file included from gnome/cy_gnome/cy_mover.cpp:561: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/complex:246: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1552:62: error: expected ';' after top level declarator inline _LIBCPP_INLINE_VISIBILITY float round(float __x) _NOEXCEP... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1571:46: error: call to 'scalbln' is ambiguous scalbln(_A1 __x, long __y) _NOEXCEPT {return scalbln((double)__x, __y);} ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1565:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY float scalbln(float __x, long __y... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1566:46: note: candidate function inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __x, lo... ^ gnome/cy_gnome/cy_mover.cpp:2049:64: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] ...= __pyx_v_self->mover->ReallocateUncertainty(__pyx_v_num_LEs, (&(*__Pyx_... ~~~~~~~~~~~~ ^~~~~~~~~~~~~~~ gnome/cy_gnome/cy_mover.cpp:5082:13: error: call to 'isspace' is ambiguous if (isspace(*ts)) ^~~~~~~ /usr/include/ctype.h:267:1: note: candidate function isspace(int _c) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cctype:124:38: note: candidate function inline _LIBCPP_INLINE_VISIBILITY int isspace(int __c) {return __libcpp_i... ^ 7 warnings and 6 errors generated. error: command 'cc' failed with exit status 1 -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Tue Feb 11 02:28:17 2014 From: nad at acm.org (Ned Deily) Date: Mon, 10 Feb 2014 17:28:17 -0800 Subject: [Pythonmac-SIG] Errors building Cython extensions on 10.9... References: Message-ID: In article , Chris Barker wrote: > Have people in general been able to get extensions to build right under > 10.9? I"ve got a bunch of C++ code (and Cython-generated C++ wrappers), > that hav been building fine on OS-X up to 10.8, and Windows, and LInux, but > now I've got a user trying to build under 10.9, and they get a bunch of > errors. [...] > Is there a way to get it to use the old lib, rather than changing our > source and Cython, and ???? I've seen a lot of discussions on the MacPorts groups about the problems caused by the 10.9 change in the default C++ library. It seems you can change it at compile time but you need to be careful that other C++ libs are also built the same. See, for example: http://stackoverflow.com/questions/19637164/c-linking-error-after-upgradi ng-to-mac-os-x-10-9-xcode-5-0-1 -- Ned Deily, nad at acm.org From chris.barker at noaa.gov Tue Feb 11 17:24:08 2014 From: chris.barker at noaa.gov (Chris Barker) Date: Tue, 11 Feb 2014 08:24:08 -0800 Subject: [Pythonmac-SIG] Errors building Cython extensions on 10.9... In-Reply-To: References: Message-ID: On Mon, Feb 10, 2014 at 5:28 PM, Ned Deily wrote: > > I've seen a lot of discussions on the MacPorts groups about the problems > caused by the 10.9 change in the default C++ library. It seems you can > change it at compile time but you need to be careful that other C++ libs > are also built the same. See, for example: > > http://stackoverflow.com/questions/19637164/c-linking-error-after-upgradi > ng-to-mac-os-x-10-9-xcode-5-0-1 > > OK, so it looks like we need: "-stdlib=libc++" and maybe: -mmacosx-version-min=10.6 But shouldn't ditutils have already done that? And some folks seem to say that if macosx-version-min is set, then you shouldn't need the stdlib setting -- so maybe the pythonorg builds will still work NOTE: I'm not sure what Python build the user in question was using -- if it's macprot, or homebrew or raoll-your-own, then the macosversion may not have been set. Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulcoones at comcast.net Wed Feb 12 15:27:59 2014 From: paulcoones at comcast.net (Paul Coones) Date: Wed, 12 Feb 2014 06:27:59 -0800 Subject: [Pythonmac-SIG] Attention: New Clang Available for 10.9 Message-ID: <66EA29FA-CB51-47F5-AA2A-FE738CAD23D5@comcast.net> A week ago, they released a new version (3.4) of Clang/llvm for Mac OSX 10.9 darwin x86_64. Perhaps it will help out with fixing those errors. c++, clang, clang-c, llvm, llvm-c. From livingstonemark at gmail.com Fri Feb 14 02:38:04 2014 From: livingstonemark at gmail.com (Mark Livingstone) Date: Fri, 14 Feb 2014 11:38:04 +1000 Subject: [Pythonmac-SIG] Image error activation problems Message-ID: Hi Guys, I have a current mac ports install. Sometime about a month or so ago my two machines started getting these sorts of errors. Now it seems like every time I try to update mac ports I have to fix these. Whenever I check, there are many (sometimes over a dozen) of old versions of stuff which I have to manually fix. Short of nuke and restart, is there a way to fix this? TIA, MarkL renaissance:src mlivingstone$ sudo port install py27-six Password: ---> Computing dependencies for py27-six ---> Activating py27-six @1.5.2_0 Error: org.macports.activate for port py27-six returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.5.2-py2.7.egg-info already exists and does not belong to a registered port. Unable to activate port py27-six. Use 'port -f activate py27-six' to force the activation. Please see the log file for port py27-six for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-six/py27-six/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port py27-six failed renaissance:src mlivingstone$ sudo port -f activate py27-six ---> The following versions of py27-six are currently installed: ---> py27-six @1.3.0_0 ---> py27-six @1.4.1_0 ---> py27-six @1.5.2_0 Error: port activate failed: Registry error: Please specify the full version as recorded in the port registry. renaissance:src mlivingstone$ sudo port -f uninstall py27-six at 1.3.0_0 ---> Uninstalling py27-six @1.3.0_0 ---> Cleaning py27-six renaissance:src mlivingstone$ sudo port -f uninstall py27-six at 1.4.1_0 ---> Uninstalling py27-six @1.4.1_0 ---> Cleaning py27-six renaissance:src mlivingstone$ sudo port -f activate py27-six ---> Computing dependencies for py27-six ---> Activating py27-six @1.5.2_0 Warning: File /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.5.2-py2.7.egg-info already exists. Moving to: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.5.2-py2.7.egg-info.mp_1392341561. ---> Cleaning py27-six renaissance:src mlivingstone$ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Fri Feb 14 03:19:27 2014 From: nad at acm.org (Ned Deily) Date: Thu, 13 Feb 2014 18:19:27 -0800 Subject: [Pythonmac-SIG] Image error activation problems References: Message-ID: In article , Mark Livingstone wrote: > I have a current mac ports install. Sometime about a month or so ago my two > machines started getting these sorts of errors. Now it seems like every > time I try to update mac ports I have to fix these. Whenever I check, there > are many (sometimes over a dozen) of old versions of stuff which I have to > manually fix. > > Short of nuke and restart, is there a way to fix this? In general, the MacPorts Users list is probably the best place to ask such questions: https://lists.macosforge.org/mailman/listinfo/macports-users But, a couple of suggestions. Make sure your installation is really up-to-date: sudo port selfupdate sudo port -u upgrade outdated Also, make sure you have py27-setuptools installed and not the now-obsolete py27-distribute. You could also uninstall the older versions: sudo port uninstall py27-six @1.4.1_0 sudo port uninstall py27-six @1.3.0_0 AFAIK, that egg-info file should be being installed as part of py27-six @1.5.2_0. > renaissance:src mlivingstone$ sudo port install py27-six > Password: > ---> Computing dependencies for py27-six > ---> Activating py27-six @1.5.2_0 > Error: org.macports.activate for port py27-six returned: Image error: > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site > -packages/six-1.5.2-py2.7.egg-info > already exists and does not belong to a registered port. Unable to > activate port py27-six. Use 'port -f activate py27-six' to force the > activation. > Please see the log file for port py27-six for details: > > /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.or > g_release_tarballs_ports_python_py-six/py27-six/main.log > To report a bug, follow the instructions in the guide: > http://guide.macports.org/#project.tickets > Error: Processing of port py27-six failed > renaissance:src mlivingstone$ sudo port -f activate py27-six > ---> The following versions of py27-six are currently installed: > ---> py27-six @1.3.0_0 > ---> py27-six @1.4.1_0 > ---> py27-six @1.5.2_0 > Error: port activate failed: Registry error: Please specify the full > version as recorded in the port registry. > renaissance:src mlivingstone$ sudo port -f uninstall py27-six at 1.3.0_0 > ---> Uninstalling py27-six @1.3.0_0 > ---> Cleaning py27-six > renaissance:src mlivingstone$ sudo port -f uninstall py27-six at 1.4.1_0 > ---> Uninstalling py27-six @1.4.1_0 > ---> Cleaning py27-six > renaissance:src mlivingstone$ sudo port -f activate py27-six > ---> Computing dependencies for py27-six > ---> Activating py27-six @1.5.2_0 > Warning: File > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site > -packages/six-1.5.2-py2.7.egg-info > already exists. Moving to: > /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site > -packages/six-1.5.2-py2.7.egg-info.mp_1392341561. > ---> Cleaning py27-six > renaissance:src mlivingstone$ -- Ned Deily, nad at acm.org