[Debian-astro-maintainers] Bug#830253: casacore: FTBFS on non-Linux: getrusage misdeclared locally
Aaron M. Ucko
amu at alum.mit.edu
Thu Jul 7 16:00:31 UTC 2016
Source: casacore
Version: 2.1.0-1
Severity: important
Justification: fails to build from source
Builds of casacore on kFreeBSD and the Hurd failed with errors along
the lines of
/usr/include/i386-kfreebsd-gnu/sys/resource.h:87:69: error: declaration of 'int getrusage(__rusage_who_t, rusage*) throw ()' has a different exception specifier
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
^
In file included from /«PKGBUILDDIR»/casacore/casa/OS/MemoryTrace.h:32:0,
from /«PKGBUILDDIR»/casa/Containers/Block.cc:29:
/«PKGBUILDDIR»/casacore/casa/OS/Timer.h:58:16: error: from previous declaration 'int getrusage(int, rusage*)'
extern "C" int getrusage(int, struct rusage*);
^
casa/CMakeFiles/casa_casa.dir/build.make:701: recipe for target 'casa/CMakeFiles/casa_casa.dir/Containers/Block.cc.o' failed
To address this error, I would suggest editing lines 44 and 192 of
casa/OS/Timer.h and lines 47, 78, 118, 148, 183, 223, 254, and 290 of
casa/OS/Timer.cc to check __GLIBC__ either instead of or in addition
to AIPS_LINUX. (An even better fix would be to have the build system
check whether a prototype is available.) There may well be references
to AIPS_LINUX in other files that could also stand to be generalized.
Could you please take a look?
Thanks!
More information about the Debian-astro-maintainers
mailing list