Anyone sadistic enough to watch a noob try to compile on OS X 10.6.8?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bughunter
    Adept
    • Nov 2019
    • 141

    Anyone sadistic enough to watch a noob try to compile on OS X 10.6.8?

    So my current MBP gave up the GPU ghost a few days ago and I'm using a 17 year old intel Core Duo 15" MBP running the newest version of OS X that supports it: 10.6.8 Snow Leopard. It may be some time before I can afford what I want... days or weeks idk yet.

    The latest build of Angband that will run on this thing is 4.0.5. Newer versions just fail to launch. The nostalgia was entertaining for a while, but I'd rather play 4.1.x or preferably 4.2.x

    I don't see any reason why I shouldn't be able to compile my own app, but it'd be the first time I've ever done such on a modern OS. (My last compile was on a HP64000 development system in 1985.)

    It's been nothing but a series of obstacles:

    I got the 4.2.1 source from rephial.org, unpacked it, and navigated to the src directory in a terminal window, and began to think "Hey, this is going to work!"

    But when I tried "make -f makefile.osx" all I got back was "-bash: make: command not found"

    Fk me. Xcode never got installed on this thing.

    Ok, so then a little gargling led me to the Apple developer site, and I logged in and found the version of Xcode I need... only to find my browser won't grok the download page.

    "The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

    I have never seen this before, ever, on any site... wtf Apple? (You know, if I'm looking for a version of xcode that's 8 major revisions old, I'm not likely to be running your latest OS or an up-to-date browser... come ON.)

    Anyway, so now I'm gonna have to go dig thru the attic and find the right box with the old install CDs/DVDs for this old beast, hope the Snow Leopard DVD is there, and hope it mounts. WTF Apple...

    Am I doing it right?

    Am I stupidly overlooking something?

    (Like an alternate source for xcode-3.2.6?)

    [Now I remember why I switched from EE/CS to straight EE.]
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    So the first problem I see in your future is the line
    Code:
    DEPLOYMENT_TARGET = MACOSX_DEPLOYMENT_TARGET=10.9
    from Makefile.osx; you'll want to change that to 10.6.

    There are also likely to be functions used in main-cocoa.m which may not work on Snow Leopard. One option if you run into this sort of problem is lifting the whole src/cocoa directory from an earlier Angband version, but that has the potential to cause incompatibilities with other Angband UI code.

    Good luck
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • bughunter
      Adept
      • Nov 2019
      • 141

      #3
      Originally posted by Nick
      Good luck
      Thanks, Nick.

      It may be a day or two before I get the time to climb up to the attic and bang my head on the rafters, but I'll keep you posted.

      Comment

      • backwardsEric
        Knight
        • Aug 2019
        • 527

        #4
        Originally posted by Nick
        So the first problem I see in your future is the line
        Code:
        DEPLOYMENT_TARGET = MACOSX_DEPLOYMENT_TARGET=10.9
        from Makefile.osx; you'll want to change that to 10.6.

        There are also likely to be functions used in main-cocoa.m which may not work on Snow Leopard. One option if you run into this sort of problem is lifting the whole src/cocoa directory from an earlier Angband version, but that has the potential to cause incompatibilities with other Angband UI code.

        Good luck
        There's also,

        Code:
        OBJ_CFLAGS = -std=c99 -x objective-c -fobjc-arc -mmacosx-version-min=10.9
        a little bit before that in Makefile.osx.

        Compiling the 4.2.1 version of the Mac interface isn't going to work without more changes than those to MACOSX_DEPLOYMENT_TARGET and -mmacosx-version-min: it's using some Objective-C features that only have limited support (automated reference counting, ARC) or no support (weak properties) on 10.6. 4.2.0 would be easier to work with (if you want the rest of 4.2.1, using src/main-cocoa.m, src/Makefile.osx, and the contents of src/cocoa from 4.2.0 rather than what's in 4.2.1 should work). With a recent version of Xcode and checking for features not available in 10.6, one line in 4.2.0's main-cocoa.m, line 641, is flagged as using a feature from 10.7:

        Code:
        angbandLayerScale = fmax(angbandLayerScale, [screen backingScaleFactor]);
        Given that line is bracketed with a test for whether or not backingScaleFactor is present, it could work as is.

        Comment

        • bughunter
          Adept
          • Nov 2019
          • 141

          #5
          OK, thanks also, Eric.

          Like the other flag declaration, I should just be able to change that to "-macosx-version-min=10.6" ?

          I have no problem settling for Angband 4.2.0 if that is the latest that will work.

          Comment

          • bughunter
            Adept
            • Nov 2019
            • 141

            #6
            Oh and btw, the rephial.org Releases page says that Angband 4.1.x releases are compiled for "macOS 10.5+" ... but not true for this install of 10.6

            Perhaps there's something I can change on my end? I'd been running older versions of Angband on it.

            Should I be deleting any prefs or old folders first? I nuked the ones I could find, or sent them to a gulag folder (save files).

            Comment

            • backwardsEric
              Knight
              • Aug 2019
              • 527

              #7
              Originally posted by bughunter
              Oh and btw, the rephial.org Releases page says that Angband 4.1.x releases are compiled for "macOS 10.5+" ... but not true for this install of 10.6

              Perhaps there's something I can change on my end? I'd been running older versions of Angband on it.

              Should I be deleting any prefs or old folders first? I nuked the ones I could find, or sent them to a gulag folder (save files).
              The problem with the 4.1.x releases could be a similar one to one that was fixed after 4.2.1 was released: the Objective-C code was compiled for backwards compatibility but the C code was not and that was causing 4.2.1 to fail on older versions (10.13 if I'm remembering correctly). If you get a crash report when you start the details in that could help sort out if it's a problem with compatibility with the OS (those would typically be some sort of symbol missing) versus loading some preferences that are not compatible. Another method that could help diagnose what goes wrong at start up is to run the executable directly from the command line so any messages are readily visible rather than going to system logs:
              1. In a terminal, change directories to where the application is stored.
              2. Then run:
                Code:
                cd Angband.app/Contents/MacOS
              3. Then run the executable there:
                Code:
                ./angband


              If there is a problem with the preferences specific to the Mac front-end, those are stored in ~/Library/Preferences/org.rephial.angband.plist and can cleared by running

              Code:
              defaults delete org.rephial.angband

              Comment

              • backwardsEric
                Knight
                • Aug 2019
                • 527

                #8
                Originally posted by bughunter
                Like the other flag declaration, I should just be able to change that to "-macosx-version-min=10.6" ?
                Yes, that would be the correct change for that line in Makefile.osx.

                Comment

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