You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
results in an error while trying to install the astropy.wcs._wcs extension (see below).
Is this a known problem with llvm-gcc-4.2 or one specific to the wcs version included in astropy?
In file included from /Users/deil/git/astropy/astropy/wcs/src/wcslib/C/wcs.c:44:
/Users/deil/git/astropy/astropy/wcs/src/wcslib/C/wcsutil.h:227: warning: function declaration isn't a prototype
/Developer/usr/bin/llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DECHO -DWCSTRIG_MACRO -DASTROPY_WCS_BUILD -D_GNU_SOURCE -DWCSVERSION=4.8.2 -DNDEBUG -UDEBUG -I/Users/deil/Library/Python/2.7/lib/python/site-packages/numpy/core/include -I/Users/deil/git/astropy/astropy/wcs/src/wcslib/C -I/Users/deil/git/astropy/astropy/wcs/src -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /Users/deil/git/astropy/astropy/wcs/src/wcslib/C/wcserr.c -o build/temp.macosx-10.7-x86_64-2.7/Users/deil/git/astropy/astropy/wcs/src/wcslib/C/wcserr.o
/Users/deil/git/astropy/astropy/wcs/src/wcslib/C/wcserr.c:140: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:0:End-of-File not at end of a line
{standard input}:116:End-of-File not at end of a line
{standard input}:unknown:Partial line at end of file ignored
{standard input}:unknown:Undefined local symbol L_.str
{standard input}:unknown:Undefined local symbol L_.str1
{standard input}:unknown:Undefined local symbol L_.str2
error: command '/Developer/usr/bin/llvm-gcc-4.2' failed with exit status 1
I'm not getting this same error, but also have not been able to compile the wcs extensions on Lion.
running build_ext
building 'astropy.wcs._wcs' extension
C compiler: gcc -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -O -ansi
compile options: '-DECHO -DWCSTRIG_MACRO -DASTROPY_WCS_BUILD -D_GNU_SOURCE -DWCSVERSION=4.8.2 -DNDEBUG -UDEBUG -I/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/numpy/core/include -I/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C -I/Users/jiffyclub/astropy/astropy/wcs/src -I/Library/Frameworks/EPD64.framework/Versions/7.1/include/python2.7 -c'
gcc: /Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:36:19: error: stdio.h: No such file or directory
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:37:20: error: stdlib.h: No such file or directory
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:38:20: error: string.h: No such file or directory
In file included from /Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:41:
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcsprintf.h:123: error: expected ')' before '*' token
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c: In function 'wcserr_set':
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:75: warning: incompatible implicit declaration of built-in function 'calloc'
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c: In function 'wcserr_copy':
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:104: warning: incompatible implicit declaration of built-in function 'memset'
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:110: warning: incompatible implicit declaration of built-in function 'memcpy'
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:36:19: error: stdio.h: No such file or directory
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:37:20: error: stdlib.h: No such file or directory
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:38:20: error: string.h: No such file or directory
In file included from /Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:41:
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcsprintf.h:123: error: expected ')' before '*' token
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c: In function 'wcserr_set':
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:75: warning: incompatible implicit declaration of built-in function 'calloc'
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c: In function 'wcserr_copy':
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:104: warning: incompatible implicit declaration of built-in function 'memset'
/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c:110: warning: incompatible implicit declaration of built-in function 'memcpy'
error: Command "gcc -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -O -ansi -DECHO -DWCSTRIG_MACRO -DASTROPY_WCS_BUILD -D_GNU_SOURCE -DWCSVERSION=4.8.2 -DNDEBUG -UDEBUG -I/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/numpy/core/include -I/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C -I/Users/jiffyclub/astropy/astropy/wcs/src -I/Library/Frameworks/EPD64.framework/Versions/7.1/include/python2.7 -c /Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.c -o build/temp.macosx-10.5-x86_64-2.7/Users/jiffyclub/astropy/astropy/wcs/src/wcslib/C/wcserr.o" failed with exit status 1
This error is caused by the fact that on Lion there is no /Developer/SDKs/MacOSX10.5.sdk. I'm not sure why 10.5 being grabbed, but it could be because of my Python version. If I try to compile with the 10.6 or 10.7 SDKs I get the same error as cdeil.
Some bit of wcserr.c does not agree with this compiler, maybe the ellipsis on line 64?
The regular gcc compilers are still available on Lion as /usr/bin/gcc-4.2 and /usr/bin/gcc++-4.2 so by setting CC and CXX to these those of us on Lion may be able to get wcs compiled. It would be nice to have it work with the default compilers, though.
Yes, it works with the system GCC and also with the system CLANG on Lion.
So it's not really a problem now, although I think with the next XCode no GCC will be shipped anymore.
Maybe this is a bug in i686-apple-darwin11-llvm-gcc-4.2 or something in wcserr.c is not quite C standard-conform?
With the EPD I also found it necessary to set CFLAGS = "-isysroot /Developer/SDKs/MacOSX10.7.sdk" because the EPD is compiled with the 10.5 SDK which is not available on Lion. We should probably fix this as well, since chances are fairly high that people will be trying to install astropy with the EPD and Lion.
I'm trying to get access to a Lion machine to reproduce this and get to the bottom of it. (For what it's worth, it builds find with llvm-clang on Linux).
The ellipsis is standard C -- I'm not sure if there's a way around it, but I'll see if I can come up with anything.
@cdeil: When you say it works with the system CLANG, how are you setting that up? The default compiler is llvm-gcc which is clang with a gcc argument-handling compatibility layer, so I'm surprised one works and the other doesn't.
Activity
jiffyclub commentedon Oct 22, 2011
I'm not getting this same error, but also have not been able to compile the wcs extensions on Lion.
This error is caused by the fact that on Lion there is no /Developer/SDKs/MacOSX10.5.sdk. I'm not sure why 10.5 being grabbed, but it could be because of my Python version. If I try to compile with the 10.6 or 10.7 SDKs I get the same error as cdeil.
jiffyclub commentedon Oct 22, 2011
It looks like this has been a common issue for projects on Lion. On Lion the compilers default to llvm-gcc:
Here's a thread discussing this for another project: http://web.archiveorange.com/archive/v/yj6N4VBSrwkOaZ5VhQtw
Some bit of wcserr.c does not agree with this compiler, maybe the ellipsis on line 64?
The regular gcc compilers are still available on Lion as
/usr/bin/gcc-4.2and/usr/bin/gcc++-4.2so by setting CC and CXX to these those of us on Lion may be able to get wcs compiled. It would be nice to have it work with the default compilers, though.cdeil commentedon Oct 22, 2011
Yes, it works with the system GCC and also with the system CLANG on Lion.
So it's not really a problem now, although I think with the next XCode no GCC will be shipped anymore.
Maybe this is a bug in
i686-apple-darwin11-llvm-gcc-4.2or something inwcserr.cis not quite C standard-conform?jiffyclub commentedon Oct 22, 2011
With the EPD I also found it necessary to set
CFLAGS = "-isysroot /Developer/SDKs/MacOSX10.7.sdk"because the EPD is compiled with the 10.5 SDK which is not available on Lion. We should probably fix this as well, since chances are fairly high that people will be trying to install astropy with the EPD and Lion.mdboom commentedon Oct 26, 2011
I'm trying to get access to a Lion machine to reproduce this and get to the bottom of it. (For what it's worth, it builds find with llvm-clang on Linux).
The ellipsis is standard C -- I'm not sure if there's a way around it, but I'll see if I can come up with anything.
@cdeil: When you say it works with the system CLANG, how are you setting that up? The default compiler is llvm-gcc which is clang with a gcc argument-handling compatibility layer, so I'm surprised one works and the other doesn't.
mdboom commentedon Oct 26, 2011
Ugh -- of course I'm confused. clang != llvm-gcc, so I suppose it's not surprising that one works and the other doesn't.
cdeil commentedon Oct 26, 2011
This is how I invoked clang and the build worked:
export CC=CLANG; python setup.py buildjiffyclub commentedon Oct 27, 2011
I can help provide a Lion machine if you have trouble getting hold of one.
mdboom commentedon Oct 31, 2011
It seems like a legitimate compiler bug. I have filed a report with Apple as issue #10370713.
I have a patch to fix this -- setup.py detects the broken compiler version and if found, uses clang instead. See pull request #40.
Merge pull request astropy#40 from mdboom/osx/llvm-gcc-crash
Merge pull request #31 from astrofrog/coordinates-docs-representations