Include phys_constants.h last to avoid interfering with system headers on aarch64.

#428 Merged at 8a9e85f
Repository
enzo-dev
Branch
week-of-code
Author
  1. Pascal Terjan (CMoi)
Reviewers
Description

phys_constants.h defines "pc" which is the name of a field of the struct sigcontext from /usr/include/asm/sigcontext.h and struct user_regs_struct in /usr/include/sys/user.h among others.

Comments (8)

  1. Nathan Goldbaum

    Seems fine to me assuming it continues to build on other architectures.

    Out of curiousity is this on e.g. a raspberry pi or are you running Enzo on an ARM cluster or something like that?

  2. Pascal Terjan (CMoi) author

    However I noticed I only sent half of it, same change is needed in Grid_FlagCellsToBeRefinedByJeansLength.C…

  3. John Regan

    What header file was pulling in /usr/include/asm/sigcontext.h and /usr/include/sys/user.h and causing the build failure?

    1. Pascal Terjan (CMoi) author

      ErrorExceptions.h is the one pulling in signal stuff:

      In file included from /usr/include/signal.h:306,
      from ErrorExceptions.h:20,
      from Grid_FlagCellsToBeRefinedByJeansLength.C:19:
      phys_constants.h:61:41: error: expected unqualified-id before numeric constant
      #define pc 3.0857e18
      ^~~~~

      1. John Regan

        Ha. OK then. Is the error coming from exception.h header? When I look at your fork there is nothing on line 20 of ErrorExceptions.h. Either way this looks good.