Re: [gtk-osx-users] gtk-osx jhbuild and XCode 4.4.1 on Lion

On Aug 21, 2012, at 6:13 AM, MaSch <masch82 gmail com> wrote:

> On 8/18/12 7:22 AM, John Ralls wrote:
>> Yeah, it should work. I just did a test build on Mountain Lion with
> Xcode 4.4.1. The only problem was freetype, which needs to have
> configure and make run manually. Just drop into a shell and run
> ../configure --prefix=$PREFIX && make; then you can quit the shell and
> pick rerun install. It's been discussed here before. No issues with gtk.
> Thanks you are of course right. reconfiguring helps.
>> objcMsgsend is the C function that dispatches objective-c messages.
> Suggests that a library is missing. Perhaps you need to reinstall
> command-line tools?
> Hmmm, I have tried reinstaling cmd-line tools. Didn't help. However I
> have conducted further tests indicating the following :
> Mac OS 10.7.4 - Xcode 4.1 with command line tools
> setup_sdk(target="10.4", sdk_version="10.6", architectures=["i386"])
> setup_sdk(target="10.4", sdk_version="10.7", architectures=["i386"])
> both compile just fine.
> Mac OS 10.7.4 - Xcode 4.4.1 with command line tools
> setup_sdk(target="10.7", sdk_version="10.7", architectures=["x86_64"])
> setup_sdk(target="10.6", sdk_version="10.7", architectures=["i386"])
> setup_sdk(target="10.5", sdk_version="10.7", architectures=["i386"])
> compile ok
> However Mac OS 10.7.4 - Xcode 4.4.1 both
> setup_sdk(target="10.4", sdk_version="10.7", architectures=["i386"])
> and
> setup_sdk(target="10.4", sdk_version="10.6", architectures=["i386"]) -
> using a 10.6 SDK folder copied from Xcode 4.1
> fails to compile with :
> ________________________
> dyld: Symbol not found: _objc_msgSend
>  Referenced from:
> /Users/gtkdev2/gtk/source/gtk+-2.24.9/gtk/.libs/libgtk-quartz-2.0.0.dylib
>  Expected in:
> /Users/gtkdev2/gtk/source/gtk+-2.24.9/gtk/.libs/libgtk-quartz-2.0.0.dylib
> ________________________
> I have tested this in a clear environment (on VM for 4.1 one VM for
> 4.4.1 - always deleted the whole gtk/inst - and all gtk/source
> directories between building with a new setup_sdk setting).
> So I'm pretty sure these results are valid.
> I don't expect anyone to fix this combination. And after resolving my
> errors I can continue building my app. I'm not even sure it makes a big
> practical difference in the end product (target=10.4/10.5)?
> I just wanted to let everyone know how it looks like atm, if they would
> try to build this setup_sdk combination with Xcode 4.4.1 on Lion.

Interesting. The difference between 4.1 and 4.4 is the compiler: Gcc in the former and llvm in the latter. There must be some 10.4 compatibility code that doesn't work with llvm.

No matter, though: Even if it compiled successfully, a gtk program built with a particular SDK won't actually run on a system earlier than that SDK, so you can build a 10.4-compatible program only with SDK 10.4u. The reason is that dyld checks the "compatibility version" in the dylib it's about to load at startup against that for the stub with which the program was linked with at build, and won't load an earlier version. When it's dealing with frameworks it can use a more fine-grained "weak linking" approach that lets you code around compatibility issues, which is why you can build a regular Cocoa app on Lion that will work on Tiger by setting min-osx-version to 10.4. It's why my primary build machine is still running Snow Leopard.

Tiger support is a bit more complicated still: The 10.4u SDK builds only with gcc-4.0, not with 4.2, and that's available only with XCode 3 and earlier. XCode 3 won't install or run on Lion.

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]