bmk is broken for XCode 4.2 on Lion

Archives Forums/BlitzMax Bug Reports/bmk is broken for XCode 4.2 on Lion

Grey Alien(Posted 2011) [#1]
Continuing on from this thread ( http://www.blitzbasic.com/Community/posts.php?topic=96152 ) because I'm not sure my issue is the same as the original poster's issue, plus a lot of experimentation has gone on with help from other forum members before I came to the conclusion below.

Basically I installed BlitzMax 1.44 on my new Macbook Air with Lion on it a few months back and everything was fine. Then recently I upgraded to XCode 4.2 (from 4.0 or 4.1) and suddenly Blitzmax won't build modules with errors like the one below for one of my framework modules. Note that I now have 10.6 and 10.7 SDKs installed as a result of upgrading xcode. I haven't done anything else fancy to my system at all.



The problem appears to be Lion fix that was added in BlitzMax 1.43 to bmk_util.bmx in the src/bmk folder. It contains a reference to the isysroot and the 10.6 sdk in two places like this:

" -isysroot /Developer/SDKs/MacOSX10.6.sdk"


This seems to be making the gcc and g++ look in the wrong places. I've changed $PATH to try out many things, but none seem to work. I tried altering bmk_util.bmk but of course I can't compile it into bin/bmk because I can't compile modules.

This led me to try an experiment where I copied bin/bmk from BlitzMax 1.42 over my copy. Now the module compiles! Problem is that full-screen doesn't work in my game because I believe that was a known issue that was fixed with BlitzMax 1.43 by the isysroot code above. Mark's comment in versions.txt says:

"* Fullscreen mode doesn't seem to work on Lion with 10.7 SDK, but does with 10.6 so kludged BMK to use 10.6 when building on Lion.
Not at all pretty, but will have to do for now as I really have no idea what is going on with this one."


It sounds like the "proper" solution would be to get full screen working on the 10.7 SDK rather than trying some path magic that seems to be failing on updated systems.

Summary:

Basically the 1.44 bmk file is not compatible with a updated Mac using Lion and Xcode 4.2 and results in the failure of module building. More and more people will upgrade XCode soon and Blitmax will also break for them, so it would be great if this can be given high priority as a fix. Thanks in advance!

Last edited 2011


xlsior(Posted 2011) [#2]
Just out of curiosity, does it work if you use Brucey's BMK_NG?


BlitzSupport(Posted 2011) [#3]

Fullscreen mode doesn't seem to work on Lion with 10.7 SDK


I noticed that -- pretty weird. I did find this, which supposedly explains how to add full-screen support from the editor. No idea how that would be done programmatically, but maybe it'll point in the right direction...

http://vinceyuan.blogspot.com/2011/07/making-your-mac-app-support-full-screen.html

And another way, which sounds pretty awkward...

http://itracki.com/dev/mac-tutorials/mac-tutorial-os-lion-app-fullscreen/

How on earth did Apple manage to stuff this up, or did they have a wise explanation for it?

Last edited 2011


Grey Alien(Posted 2011) [#4]
@xlsior: Do you have a link? I searched with no success.

@BlitzSupport: Thanks, yeah sounds a bit awkward to say the least. It's crazy Apple have altered this. I guess they have some masterplan.


xlsior(Posted 2011) [#5]
http://code.google.com/p/bmkng/downloads/list

Catch-22: It's source code, so you'd need to compile it before you can use it.
But it has some major advantages over the standard BMK, including being multi-threaded so it can recompile many modules significantly faster.


AdamRedwoods(Posted 2011) [#6]
Couple links on Lion full-screen:
http://www.cocoabob.net/?p=789

http://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/FullScreenApp/FullScreenApp.html

Last edited 2011


Grey Alien(Posted 2012) [#7]
Um, this appears to be fine now on 1.45 but I don't know why.