Compile failure for 3.0.9 on Mac OS X 10.4.10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TreeFrog
    Rookie
    • Nov 2007
    • 5

    Compile failure for 3.0.9 on Mac OS X 10.4.10

    I get this when compiling vanila 3.0.9 on OS X 10.4.10 (Intel and PPC):

    CC main-gcu.c
    In file included from main-gcu.c:63:
    /usr/include/ncurses.h:335: error: parse error before 'bool'
    /usr/include/ncurses.h:337: error: parse error before '_leaveok'
    /usr/include/ncurses.h:338: error: parse error before '_scroll'

    Looks like it's something to do with stdbool, configure seemed to think it was okay:

    checking for dirent.h... yes
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for an ANSI C-conforming const... yes

    Any ideas what to do to fix it?
  • TreeFrog
    Rookie
    • Nov 2007
    • 5

    #2
    Originally posted by TreeFrog
    Any ideas what to do to fix it?
    Bah. What you do is use the Makefile.osx in the src directory.

    Sorry for the trouble

    Comment

    • mavfin
      Rookie
      • Nov 2007
      • 4

      #3
      I compiled an X11/curses version from the shell easily, and if you just want an OSX version to play, check rephial.org. There's a precompiled X version there.

      Comment

      • TreeFrog
        Rookie
        • Nov 2007
        • 5

        #4
        Originally posted by mavfin
        I compiled an X11/curses version from the shell easily, and if you just want an OSX version to play, check rephial.org. There's a precompiled X version there.
        Yeah I tried that one but I think the graphics are broken in it - at least I couldn't get them to work.

        Compiling vanilla from source provides a working carbon version with graphics which was what I was after.

        Comment

        • zaimoni
          Knight
          • Apr 2007
          • 590

          #5
          Originally posted by TreeFrog
          I get this when compiling vanila 3.0.9 on OS X 10.4.10 (Intel and PPC):

          CC main-gcu.c
          In file included from main-gcu.c:63:
          /usr/include/ncurses.h:335: error: parse error before 'bool'
          /usr/include/ncurses.h:337: error: parse error before '_leaveok'
          /usr/include/ncurses.h:338: error: parse error before '_scroll'

          Looks like it's something to do with stdbool, configure seemed to think it was okay:

          checking for dirent.h... yes
          checking for stdbool.h that conforms to C99... yes
          checking for _Bool... yes
          checking for an ANSI C-conforming const... yes

          Any ideas what to do to fix it?
          The XOpen Curses spec isn't C99 friendly -- the C99 stdbool collides with the bool definitions required by curses.

          I have similar problems with older versions of PDCurses (but not 3.3). My workaround was to adjust the curses headers to do things right, then rebuild curses before attempting to use it.

          Inspecting PDCurses 3.3...may want to fix my local copy up eventually, as a sufficiently competent C preprocessor in C++ mode should explicitly error when asked to #define a reserved word. [The spec says "undefined behavior" in this case for both C and C++, but bool is reserved only in C++.]
          Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
          Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
          Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎