Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.0: getrusage misdeclared locally on non-linux architectures #463

Closed
olebole opened this issue Jul 19, 2016 · 0 comments · Fixed by #476
Closed

2.1.0: getrusage misdeclared locally on non-linux architectures #463

olebole opened this issue Jul 19, 2016 · 0 comments · Fixed by #476

Comments

@olebole
Copy link
Contributor

olebole commented Jul 19, 2016

This is a forward of Debian bug #830253:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant