Page 2 of 2

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 12:44 am
by monte
giving up for today... I went back to trying to compile for the simulator because at least that's compiling... The lcext file doesn't get recognised as an engine but the file inside the app bundle that get's built does. Actually pumped the air in excitement when resolveImage returned the long id of an image correctly!!! ;-)

Now to work out if you want it???

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 12:50 am
by mwieder
Um... gcc 4.2? I'm running gcc 4.6.3.
I wonder if that's a problem...

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 1:23 am
by monte
I think it's only an issue on OS X because Xcode can't find the compiler

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 9:14 am
by LCMark
Guess that means it doesn't like the 10.7 SDK ;)

Xcode 4.3.3 comes with the 10.6 SDK, try downloading that and copying the SDK into the 4.6.1 bundle and try that.

We'll take a look at the 10.7 issues and see if we can make it compile.

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 10:27 am
by markw
OK, I got all of the stage-mobile project to build with one tiny change from the release-6.0.1 branch (iossupport.h had an absolute path include to sys/stat.h at the bottom - seems to have moved, I don't even have /usr/include - but switching it to <sys/stat.h> worked OK. Is there a reason for the absolute path I've not discovered yet?

I haven't had time to look at building for Mac again beyond realising I'd have to figure out how to change the compiler to LLVM-GCC-4.2 for my current setup as I don't have plain old GCC 4.2 at all just now, my XCode version is too new - wanted to do that in the global config rather than change each project. :)

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 10:33 am
by LCMark
Changing the compiler globally is easy - just modify the GCC_VERSION setting in rules/Global.xcconfig.

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 1:12 pm
by LCMark
Okay - Ian reminded me this morning that we can't build the engine against the 10.7 SDK as that SDK started to remove some of the old APIs the engine still uses... We'll have to wait until after Cocoaification for building against 10.7+ SDKs to be possible. For now, the latest SDK you can use is 10.6, which (as I mentioned before) is included with Xcode 4.3.3.

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 3:47 pm
by markw
>> Changing the compiler globally is easy - just modify the GCC_VERSION setting in rules/Global.xcconfig.

I thought this must be it but setting it to "LLVM GCC 4.2" as it appears in Xcode didn't work and I didn't have time to hunt right then. Not the most obvious syntax in the world from Apple here:
GCC_VERSION = com.apple.compilers.llvmgcc42

So I changed this and tried I tried against 10.7 and found your missing functions - lots in revvideograbber and a couple in revbrowser before it gave up.

Unfortunately I'm on Mountain Lion and there's no Xcode version before 4.4 for Mountain Lion - the only way to get 10.6 SDK or earlier is a manual grab from an old Xcode version and I don't have one of those around, nor a machine with Lion to install one (shame - I upgraded my old Mac Mini from 10.6 only a few months back to setup a CI server to parallel my main machine).

Guess I'll just have to wait for Cocoaification or mess with a VM. :)

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 3:57 pm
by LCMark
Hmmm - we'll see if we can get a script together that will extract SDKs from an Xcode DMG... I know its possible because I've seen it done - this would solve the problem for those on Mountain Lion (Cocoaification is still a way off and I'm sure there's a fair few people who'd like to poke around in the current version who only have Mountain Lion!).

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 9:24 pm
by n9yty
runrevmark wrote:Hmmm - we'll see if we can get a script together that will extract SDKs from an Xcode DMG...
I downloaded the XCode 4.3.3 disk image, mounted it, and just looked inside the XCode.app package....

XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk

I copied that into the same location inside my installed XCode 4.6 installation in /Applications.

$ xcodebuild -showsdks

OS X SDKs:
Mac OS X 10.6 -sdk macosx10.6
Mac OS X 10.7 -sdk macosx10.7
OS X 10.8 -sdk macosx10.8

So it looks like it worked. Now to see if I can build from here...

[UPDATE:]
I also had to go here and change a bit so it could find libstdc++:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib

and either rename the existing directory "i686-apple-darwin11" to "i686-apple-darwin11" or symlink it.

There was also a conflict with the build.h file in the engine and a system Build.h, so I renamed the livecode build.h to lcbuild.h and changed the files that referenced it.

I still had a few errors in here with cast/type conversions:
vi /Users/n9yty/LiveCode/SOURCE/livecode/engine/src/opensslsocket.cpp
vi /Users/n9yty/LiveCode/SOURCE/livecode/engine/src/deploy_sign.cpp

but now I am down to just 7 errors left... :) Actually, just one:
ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libssl.0.9.7.dylib for architecture i386

Not sure what to think about that, lipo says it has code for x86_64 i386 ppc7400 ....

Some notes on XCode 3.3 on Lion mentioned with this error string... http://stackoverflow.com/questions/1104 ... -correctly.

But I was able to get around this by changing the dependencies from the version-specific (libssl-0.9.7.dylib) to just (libssl.dylib). Now just two more issues with it looking for the 10.5 SDK for android/iphone bits. Almost there! :)

SUCCESS!

But it doesn't launch yet... :( Run from the console I see:

Startup error - /Users/n9yty/LiveCode/SOURCE/livecode/_build/mac/Release/LiveCode.app/Contents/MacOS/Toolset/home.rev

That file is not there, the Toolset dir isn't there at all. Coping it in from the ice directory allowed it to launch. Yay! But only when from Terminal in the LiveCode.app/Contents/MacOS directory... When launched via Finder or the open command it can't seem to find this Toolset directory. I'll have to look into it more, time for dinner.

That, and when I tried to run the solution I had been working on it doesn't see to have the XML stuff, or at least it hit an error trying to create an XML tree.

Re: Xcode 3.2.6

Posted: Fri Apr 12, 2013 9:45 pm
by monte
Mark... perhaps a symlink solution???

http://stackoverflow.com/questions/1142 ... a-base-sdk