Issue 37 in casacore: Not buildable with GCC 4.6

0 views
Skip to first unread message

casa...@googlecode.com

unread,
Jul 28, 2011, 4:14:15 AM7/28/11
to casacor...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 37 by jdswinb...@gmail.com: Not buildable with GCC 4.6
http://code.google.com/p/casacore/issues/detail?id=37

Casacore trunk (and presumably other versions) aren't buildable with GCC
4.6: see the log below. Building with GCC 4.5 is fine.

The relevant change from the GCC release notes
(http://gcc.gnu.org/gcc-4.6/changes.html) is "Most libstdc++ standard
headers have been changed to no longer include the cstddef header as an
implementation detail. Code that relied on that header being included as
side-effect of including other standard headers will need to include
cstddef explicitly."

The attached short patch gets things working for me.

$ g++-4.6 --version
g++-4.6 (Debian 4.6.1-4) 4.6.1
[...]

$ scons --with=cxx=g++4.6
[jds@crash casacore]$ scons --with-cxx=g++-4.6
scons: Reading SConscript files ...
Checking for C library dl... yes
Checking for C library gfortran... yes
Checking for C library blas... yes
Checking for C library lapack... yes
Checking for C library cfitsio... yes
Checking for C library wcs... yes

scons: warning: The build_dir keyword has been deprecated; use the
variant_dir keyword instead.
File "/home/jds/Software/casacore/SConstruct", line 191, in <module>
scons: done reading SConscript files.
scons: Building targets ...
g++-4.6 -o build_linux_x86_64/opt/casa/aips.o -c -fPIC -DHAVE_DLOPEN -W
-Wall -Woverloaded-virtual -O2 -I. casa/aips.cc
g++-4.6 -o build_linux_x86_64/opt/casa/version.o -c -fPIC -DHAVE_DLOPEN -W
-Wall -Woverloaded-virtual -O2 -I. casa/version.cc
g++-4.6 -o build_linux_x86_64/opt/casa/Arrays/Array2.o -c -fPIC
-DHAVE_DLOPEN -W -Wall -Woverloaded-virtual -O2 -I. casa/Arrays/Array2.cc
In file included from ./casa/Arrays/ArrayBase.h:34:0,
from ./casa/Arrays/Array.h:32,
from casa/Arrays/Array2.cc:28:
./casa/Arrays/IPosition.h:358:13: error: 'ptrdiff_t' does not name a type
In file included from ./casa/Arrays/Array.h:33:0,
from casa/Arrays/Array2.cc:28:
./casa/Containers/Block.h:310:11: error: 'ptrdiff_t' does not name a type
In file included from casa/Arrays/Array2.cc:28:0:
./casa/Arrays/Array.h:593:15: error: 'ptrdiff_t' does not name a type
./casa/Arrays/Array.h:631:15: error: 'ptrdiff_t' does not name a type
scons: *** [build_linux_x86_64/opt/casa/Arrays/Array2.o] Error 1
scons: building terminated because of errors.


Attachments:
stddef.diff 650 bytes

casa...@googlecode.com

unread,
Sep 1, 2011, 9:53:33 AM9/1/11
to casacor...@googlegroups.com
Updates:
Status: Fixed
Owner: gervandi...@gmail.com

Comment #1 on issue 37 by gervandi...@gmail.com: Not buildable with GCC 4.6
http://code.google.com/p/casacore/issues/detail?id=37

Fixed it in the trunk version (and special branch)

Reply all
Reply to author
Forward
0 new messages