Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 2, 2021, 09:31   #1
bughunter
Adept
 
Join Date: Nov 2019
Location: Pasadena CA
Posts: 129
bughunter is on a distinguished road
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.]
bughunter is offline   Reply With Quote
Old March 2, 2021, 10:45   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,760
Donated: $60
Nick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old March 2, 2021, 10:55   #3
bughunter
Adept
 
Join Date: Nov 2019
Location: Pasadena CA
Posts: 129
bughunter is on a distinguished road
Quote:
Originally Posted by Nick View Post
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.
bughunter is offline   Reply With Quote
Old March 2, 2021, 18:22   #4
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 136
backwardsEric is on a distinguished road
Quote:
Originally Posted by Nick View Post
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.
backwardsEric is offline   Reply With Quote
Old March 2, 2021, 19:56   #5
bughunter
Adept
 
Join Date: Nov 2019
Location: Pasadena CA
Posts: 129
bughunter is on a distinguished road
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.
bughunter is offline   Reply With Quote
Old March 2, 2021, 20:03   #6
bughunter
Adept
 
Join Date: Nov 2019
Location: Pasadena CA
Posts: 129
bughunter is on a distinguished road
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).
bughunter is offline   Reply With Quote
Old March 2, 2021, 22:16   #7
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 136
backwardsEric is on a distinguished road
Quote:
Originally Posted by bughunter View Post
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
backwardsEric is offline   Reply With Quote
Old March 2, 2021, 22:19   #8
backwardsEric
Adept
 
Join Date: Aug 2019
Posts: 136
backwardsEric is on a distinguished road
Quote:
Originally Posted by bughunter View Post
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.
backwardsEric is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't compile Sil-Q joeljpa Sil 10 May 20, 2019 20:04
Make sure to watch Patti Smith cover Dylan at the Nobel ceremony Pete Mack Idle chatter 1 December 15, 2016 19:11
Trying to compile on Windows 8 SlothsInTheDungeon Development 5 August 9, 2014 03:17
Unable to compile O Rydel Development 0 November 2, 2011 04:36
Trying to compile 3.1.2v2 on OS X kLy Development 0 December 2, 2010 16:45


All times are GMT +1. The time now is 02:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.