Compiling under Snow Leopard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • half
    Knight
    • Jan 2009
    • 910

    Compiling under Snow Leopard

    I've just tried to compile NPP under the new version of Mac OS X (Snow Leopard), but it has multiple errors in 'main-crb.c'. Is main-crb.c finally broken? Have other people run into similar problems? Does this affect V as well? Is there some easy way out?
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    I can't speak to NPP, but I'd be interested if you cared to post the error(s) you're getting when trying to compile V.
    linux->xterm->screen->pmacs

    Comment

    • zaimoni
      Knight
      • Apr 2007
      • 590

      #3
      While I don't have a Mac to check, I am reading about Snow Leopard's predatory consumption of software. The two big things making the mailing lists I am on are:
      * API deletion: there were a number of archaic OS functions whose last version is OS X 10.5 . The software using these functions makes a tasty snack for the Snow Leopard. (Side benefit: outdated malware also helplessly dies.)
      * Default binaries are now 64-bit rather than 32-bit: the Snow Leopard consumes vast quantities of developer time in inexplicable link-time errors.

      I'm unclear whether V has been updated enough to avoid being eaten by the Snow Leopard. I do know that there was a burst of updating the mac backend for V, so it's possible.
      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

      • Pete Mack
        Prophet
        • Apr 2007
        • 6883

        #4
        Originally posted by half
        I've just tried to compile NPP under the new version of Mac OS X (Snow Leopard), but it has multiple errors in 'main-crb.c'. Is main-crb.c finally broken? Have other people run into similar problems? Does this affect V as well? Is there some easy way out?
        1. Fix Makefile.osx:
        Code:
        -arch ppc -arch i386 -mmacosx-version-min=10.0
        should be
        Code:
        -arch x86 -mmacosx-version-min=10.5
        Also try -arch x86_32 as the default target has apparently changed to 64 bit, and 64-bit OSX doesn't have Carbon support, much less QuickDraw support.

        2. Try compiling V or FA. There have been a few modernizations to Makefile.osx that aren't in NPP. Porting Makefile.osx from UnAngband or V shouldn't be a big deal.

        3. If it doesn't work, I will have to bite the bullet and learn Cocoa. At which point, it will be time to think about the iPhone port...

        Comment

        • takkaria
          Veteran
          • Apr 2007
          • 1951

          #5
          Originally posted by Pete Mack
          1. Fix Makefile.osx:
          Code:
          -arch ppc -arch i386 -mmacosx-version-min=10.0
          should be
          Code:
          -arch x86 -mmacosx-version-min=10.5
          Also try -arch x86_32 as the default target has apparently changed to 64 bit, and 64-bit OSX doesn't have Carbon support, much less QuickDraw support.

          2. Try compiling V or FA. There have been a few modernizations to Makefile.osx that aren't in NPP. Porting Makefile.osx from UnAngband or V shouldn't be a big deal.

          3. If it doesn't work, I will have to bite the bullet and learn Cocoa. At which point, it will be time to think about the iPhone port...
          It may be worth starting to nick stuff from http://ridiculousfish.com/angband/ to phase out the Carbon stuff with Cococa.
          takkaria whispers something about options. -more-

          Comment

          • half
            Knight
            • Jan 2009
            • 910

            #6
            Thanks Pete, your advice has worked perfectly. I'm actually compiling from an old branch of NPP as it is my own variant, and the compiler flags were:

            -Wall -W -O0 -fpascal-strings -DMACH_O_CARBON

            which I changed to:

            -Wall -W -O0 -fpascal-strings -DMACH_O_CARBON -arch i386

            and then it worked fine. It also worked with:

            -Wall -W -O0 -fpascal-strings -DMACH_O_CARBON -arch ppc -arch i386

            It just looked like I must have been using a pretty old mac makefile in the first place, as this last version seems to be what you were saying that I was starting with.

            So, good news for Snow Leopard Angband, bad news for iPhone Angband...

            Thanks everyone,
            half.

            Comment

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