Target Platform Woes

BlitzMax Forums/BlitzMax Programming/Target Platform Woes

Robby(Posted 2013) [#1]
Hi guys! I'm wondering if there's anything I need to know about compiling and what happens when the compiled app is run, for example, on different versions of Mac OS X.

I'm making my app on Leopard 10.5 but wondering if maybe I should upgrade to Lion? I sent a simple program to a friend and he sent back this note which seems to imply some confusion over intel macs, classic, and the versions of OS X. What, exactly, does Blitz compile for? My friend seems to think Blitz is compiling for classic apps only?

Here's his note. Any advice on this would be greatly appreciated! My project could die an early death if I don't get this straightened out.
Thanks, -Rob

Friends note trying to run my app:


So the problem with the Mac version is that it targets the old Mac classic build architecture. 10.6 Snow Leapord (all version previous to 10.6 are natively capable of running classic apps) contained a piece of software called "Rosetta" which was essentially a classic emulator that would allow it to run classic applications. Apple removed Rosetta from 10.7 so classic applications no longer work on 10.7 and newer.

So after I changed the extension to .app, I went to get info and it shows 'Kind:' and "Application (Classic)" so I am 99.9% sure that this is the issue.

If you still have the source code and project you should be able to rebuild it using a newer build target (assuming your developer environment is moderately up to date) - it will probably say "Intel" or "x86" or something like that.


GaryV(Posted 2013) [#2]
If you want it to run on x86 architecture you can't compile it on an old PPC based system. You need to get an x86 based Mac to compile on.

I am guessing this is the issue as I do not have a Mac.


xlsior(Posted 2013) [#3]
Blitzmax on an intel mac creates intel executables, blitzmax on a PPC mac creates the old-style PPC executables.

(Brucey has a custom bmk for blitzmax that can create universal binaries which include both the PPC and intel version in a single executable)


Robby(Posted 2013) [#4]
My Mac is the 2007 Intel-based Mac, so i assumed it was compiling intel executables. The 2.8 Ghz Intel Core 2 Duo. Since my friends Mac is a later one, I assume that is also Intel, so its curious why his info panel shows classic? This is rather odd. Any ideas?


Brucey(Posted 2013) [#5]
If you are using the PPC version of BlitzMax , it will build PPC applications on an (PPC enabled) Intel Mac.

If in doubt, download and install the latest x86 version of BlitzMax, and build your things using that.

As xlsior says, it is possible to build universal (PPC+Intel) apps on supported version of OS X, using a custom version of the bmk app. But you are probably not interested in building for PPC, so it may not be worth your time to try it.


Midimaster(Posted 2013) [#6]
I 'm also very interested in this discussion, because of big problems with my customers....

I think that's not a problem of BlitzMax creating "PPC code". I compile on a Mac Mini 10.5 (upgraded to 10.6). The customers with 10.7 and 10.8 tell me the apps will not run. On the other side I hear about blitzmax developers which have a 10.7 or 10.8 developing system and they have no problems with their apps.

At the moment for me it looks like need to buy a new mac....


Robby(Posted 2013) [#7]
On the help menu/about maxide I have:

Max IDE 1.42
BCC Version BlitzMax Release Version 1.48

GCC Version 4.0.1
G++ Version 4.0.1

Not sure what GCC and G++ is, but I think this is the latest version of Blitz for Mac.

My Mac is OS X 10.5.8, 2.8 GHz Intel Core 2 Duo

The compiled file itself, when I select Get info, has it as
Kind: Application (Intel)

Is it possible that its making a PCC and somehow marking it as Intel?

My friend suspects Blitz may be looking at the software architecture and not hardware architure. He also said 10.5 is PCC compatible.

He was also surprised there's not a target build setting in Blitz.

So if it is defaulting to the platform on which it is run, could it be building PCC apps on 10.5 and labeling them intel?

I'm wondering if the key here is to upgrade to Lion, or if Blitz even runs on Lion. Isn't Blitz 32 bit and Lion 64 bit?

Midimaster - do you know if those other developers who code in 10.7 or 10.8 have their app's also run on 10.5 and 10.6? -Rob


Brucey(Posted 2013) [#8]
He was also surprised there's not a target build setting in Blitz.

There's a good idea. I should consider building that into bmk ng...


Robby(Posted 2013) [#9]
This just in from my friend:


"So blitzmax is setting a target internally regardless of ether or not it allows the user to explicitly do it. Now what I can tell you is that I'm 99.5% sure that what's happening is blitzmax is building a PPC compatible binary (for whatever reason). It's not a question of hardware - in fact hardware is irrelevant in this case.

Because you have 10.5 which supports classic ppc (note that it also supports intel native binaries) applications you're able to run the binary (since it's built to be ppc compatable). The 64bit/32bit thing is definitely not an issue at all in the case (unless the setting on your compiler is somehow causing it to push out a PPC build).

Long story short 10.5 (and 10.6 with the Rosetta plugin installed) will run certain PPC applications, it has nothing to do with whether you have intel or ppc hardware.

So I would expect that you would be able to run it, if I installed 10.5 on my intel mac I would be able to run it too. 10.7+ is able to read the binary and determine that it's targeting an architecture (PPC) that's no longer supported by 10.7+ and thus is incapable of running it."



So its possible that apps made with 10.5 and 10.6 might not work on 10.7 and above.

I'm not sure about Blitz and Lion. If it can work, and run on 10.7 and above, that would be better as most people are probably doing Lion anyway, rather than the other way around. 10.5 and 10.6 will likely go out soon enough.

Are there coders here on Lion and is Blitz ok with it? Thanks again for everything. -Rob


skidracer(Posted 2013) [#10]
BlitzMax apps will not run on standard Lion without the user changing their Security Settings to "Allow applications downloaded from anywhere".