Issue 51 in casacore: Not compiles with gcc-4.7.0

1 view
Skip to first unread message

casa...@googlecode.com

unread,
May 12, 2012, 5:36:33 AM5/12/12
to casacor...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Milestone-Release1.4

New issue 51 by nheghath...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

What steps will reproduce the problem?
1.Use gentoo sci-astronomy/casacore-1.4.0 ebuild and gcc-4.7.0
2.
3.

What is the expected output? What do you see instead?
Compiles and run fine.

Please provide any additional information below.

cd
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0_build/casa
&& /usr/bin/x86_64-pc-linux-gnu-g++ -Dcasa_casa_EXPORTS -DHAVE_HDF5
-DHAVE_FFTW3 -DHAVE_FFTW3_THREADS -DHAVE_READLINE -DUSE_THREADS
-DUSE_MULTI_THREADING -DNDEBUG -O2 -pipe -ggdb -march=native -pthread
-fopenmp -fPIC
-I/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0
-I/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0_build
-o CMakeFiles/casa_casa.dir/Arrays/ArrayError.cc.o -c
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/ArrayError.cc
In file included from
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/ArrayBase.h:34:0,
from
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/Array.h:32,
from
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/ArrayUtil2.cc:33:
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:130:28:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:135:29:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:135:43:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:135:57:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:136:9:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:136:31:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:136:53:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:137:9:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:137:31:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:137:53:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:138:9:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:151:26:
error:
declaration of ‘operator=’ as non-function
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:151:24:
error:
expected ‘;’ at end of member declaration
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:151:34:
error:
expected ‘)’ before ‘value’
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:224:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:225:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:226:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:227:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:235:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:236:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:240:11:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:295:23:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:296:23:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:297:23:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:298:23:
error:
‘ssize_t’ has not been declared
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:365:13:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:366:13:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:367:19:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:368:13:
error:
‘value_type’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:369:19:
error:
‘value_type’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:370:13:
error:
‘value_type’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:371:19:
error:
‘value_type’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:377:5:
error:
‘iterator’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:379:5:
error:
‘const_iterator’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:381:5:
error:
‘iterator’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:383:5:
error:
‘const_iterator’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:398:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:401:5:
error:
‘ssize_t’ does not name a type
/var/tmp/portage/sci-astronomy/casacore-1.4.0/work/casacore-1.4.0/casa/Arrays/IPosition.h:
In
member function ‘void casa::IPosition::fill(casa::uInt, InputIterator)’:

Full build log attached.

Thank you in advance.


casa...@googlecode.com

unread,
May 12, 2012, 5:37:53 AM5/12/12
to casacor...@googlegroups.com

Comment #1 on issue 51 by nheghath...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Build.log file.

Attachments:
build.log 217 KB

casa...@googlecode.com

unread,
May 15, 2012, 2:20:32 AM5/15/12
to casacor...@googlegroups.com

Comment #2 on issue 51 by gervandi...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Will use prtdiff_t instead of ssize_t (typedef-ed as axSize_t).
Hope to commit it soon.

casa...@googlecode.com

unread,
Jun 27, 2012, 8:10:22 AM6/27/12
to casacor...@googlegroups.com

Comment #3 on issue 51 by jdswinb...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

The attached patch (against today's trunk, not v1.4.0, although it probably
applies to that too) should address the issue with gcc-4.7. Obviously, this
is a temporary hack until Ger's promised changes come through.

Attachments:
0001-Missing-includes-required-by-gcc-4.7.patch 972 bytes

casa...@googlecode.com

unread,
Jun 27, 2012, 9:46:04 AM6/27/12
to casacor...@googlegroups.com

Comment #4 on issue 51 by jdswinb...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Actually, the attached is probably better.

Attachments:
0001-Fix-build-with-gcc-4.7.patch 2.1 KB

casa...@googlecode.com

unread,
Sep 14, 2012, 11:22:09 AM9/14/12
to casacor...@googlegroups.com

Comment #5 on issue 51 by ole.stre...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

The same patch is required to compile for the upcoming Debian Wheezy and
Ubuntu Quantal releases. I can confirm that it applies fine (with a few
lines offset) on v1.5.0.

casa...@googlecode.com

unread,
Sep 18, 2012, 8:20:40 PM9/18/12
to casacor...@googlegroups.com

Comment #6 on issue 51 by Malte.Marquarding: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

This should have been applied to trunk already. You need trunk for these
systems at the moment.

casa...@googlecode.com

unread,
Oct 2, 2012, 4:05:39 AM10/2/12
to casacor...@googlegroups.com

Comment #7 on issue 51 by jdswinb...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

The required changes on the trunk still aren't complete. Both r21266 and
r21268 (which is required on more than just OSX) help, but the attached
change to IPosition.h is still needed.

Attachments:
0001-Fix-build-with-gcc-4.7.patch 632 bytes

casa...@googlecode.com

unread,
Oct 2, 2012, 5:28:25 AM10/2/12
to casacor...@googlegroups.com

Comment #8 on issue 51 by jdswinb...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Sorry, that last comment was possibly misleading. By including unistd.h in
IPosition.h the build can proceed using ssize_t rather than ptrdiff_t, but
I understand that that isn't the intention. Unfortunately, the source has
many references to ssize_t within it, even after Ger's changes.

I attach a new patch which switches everything to use ptrdiff_t instead,
which compiles with GCC 4.7 and passes most tests (5 failures out of 480; I
see 6 failures on my older system).

Note that as well as using ptrdiff_t, there are also some changes required
in scimath/Mathematics/ConvolveGridder.tcc. These are also included in my
patch.

Attachments:
0001-Fix-build-with-gcc-4.7.patch 27.9 KB

casa...@googlecode.com

unread,
Oct 22, 2012, 6:51:58 PM10/22/12
to casacor...@googlegroups.com

Comment #9 on issue 51 by marcel.l...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Don't know what the current status is of this issue. However, I was able to
compile release 1.5.0 with GCC 4.7.1 on a Linux openSUSE 12.2 system with
only two minor tweaks:

marcel@aragorn:~/distrib> diff -ru casacore-1.5.0-org casacore-1.5.0
diff -ru casacore-1.5.0-org/casa/Arrays/IPosition.h
casacore-1.5.0/casa/Arrays/IPosition.h
--- casacore-1.5.0-org/casa/Arrays/IPosition.h 2012-03-14
15:30:48.000000000 +0100
+++ casacore-1.5.0/casa/Arrays/IPosition.h 2012-10-22
23:29:24.646173200 +0200
@@ -34,6 +34,7 @@
#include <casa/BasicSL/String.h>
#include <vector>
#include <cstddef> // for ptrdiff_t
+#include <sys/types.h>

namespace casa { //# NAMESPACE CASA - BEGIN

diff -ru casacore-1.5.0-org/casa/System/Casarc.cc
casacore-1.5.0/casa/System/Casarc.cc
--- casacore-1.5.0-org/casa/System/Casarc.cc 2011-10-18
09:39:05.000000000 +0200
+++ casacore-1.5.0/casa/System/Casarc.cc 2012-10-22
23:36:33.997450564 +0200
@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <cstdio>
+#include <unistd.h>

#define USE_FLOCK 0
#define CASARC_DEBUG 0


casa...@googlecode.com

unread,
Oct 23, 2012, 12:03:36 AM10/23/12
to casacor...@googlegroups.com
Updates:
Status: Fixed

Comment #10 on issue 51 by Malte.Marquarding: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

(No comment was entered for this change.)

casa...@googlecode.com

unread,
Oct 23, 2012, 12:05:06 AM10/23/12
to casacor...@googlegroups.com

Comment #11 on issue 51 by Malte.Marquarding: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Thanks Marcel, I have applied this to trunk.

casa...@googlecode.com

unread,
Jun 18, 2013, 8:53:10 AM6/18/13
to casacor...@googlegroups.com

Comment #12 on issue 51 by victormo...@gmail.com: Not compiles with
gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Hi,

i've wandered for hours trying to compile this code on OpenSuSE 12.2
without results.

The patch mentioned above is not applied to the trunk release available via
svn on googlecode.

After making the modifications mentioned above by hand (didn't trust an old
diff) everything runs ok.

Using OpenSuSE 12.2 _64, gcc 4.7

Regards,
Victor M.



--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

casa...@googlecode.com

unread,
Nov 4, 2013, 4:19:06 AM11/4/13
to casacor...@googlegroups.com

Comment #13 on issue 51 by hlfw...@gmail.com: Not compiles with gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

hi, friends, how to use the patch file, could anyone teach me?

Thanks very much

casa...@googlecode.com

unread,
Nov 11, 2013, 1:16:19 PM11/11/13
to casacor...@googlegroups.com

Comment #14 on issue 51 by victormo...@gmail.com: Not compiles with
gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

A patch (made with diff) is applied using the "patch" command. Look for the
manpage.

In my case, the modification posted by Marcel worked great and you can do
it by hand (without the diff command) :

- in file "/casa/Arrays/IPosition.h" add "#include <sys/types.h>"
- in file "/casa/System/Casarc.cc " add "#include <unistd.h>"

FYI : In the diff included above, the lines prepended by "+" are to be
added.

Post your results !

Regards,
Victor M.

casa...@googlecode.com

unread,
Nov 12, 2013, 2:00:17 AM11/12/13
to casacor...@googlegroups.com

Comment #15 on issue 51 by gervandi...@gmail.com: Not compiles with
gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Victor,

This issue has been fixed more than a year ago on the trunk, so I don't
understand why you still have to change it in your workspace. Didn't you do
an 'svn up'?

Cheers,
Ger

casa...@googlecode.com

unread,
Dec 16, 2013, 11:00:21 AM12/16/13
to casacor...@googlegroups.com

Comment #16 on issue 51 by victormo...@gmail.com: Not compiles with
gcc-4.7.0
http://code.google.com/p/casacore/issues/detail?id=51

Sorry for the mess...

The problem only arises with the stable version 1.5.0 available in the
Donload section.
I was always talking about that one...

The SVN version includes the patch for gcc47.

Regards,
vm
Reply all
Reply to author
Forward
0 new messages