From: John R. <jr...@ce...> - 2011-08-01 14:44:59
|
On Aug 1, 2011, at 4:17 AM, MaSch wrote: > Hello, > > I tried making my gtk App work on Lion and applied : > - Patch for crash with undecorated windows on MacOS Lion (gtk+ Bug 655074) > - Patch for resizing window on MacOS Lion (gtk+ Bug 655122) > - Skipped libiconv in jhbuild and instead using the system one. > > In preliminary testing this all works very well for me on 10.7 and 10.6. > But when I test my app on 10.5 I get : > >> OS Version: Mac OS X 10.5.6 (9G66) >> Report Version: 6 >> >> Exception Type: EXC_BREAKPOINT (SIGTRAP) >> Exception Codes: 0x0000000000000002, 0x0000000000000000 >> Crashed Thread: 0 >> >> Dyld Error Message: >> Symbol not found: _posix_memalign >> Referenced from: ///Users/user/Desktop/EasyTAG.app/Contents/Resources/lib/libglib-2.0.0.dylib >> Expected in: /usr/lib/libSystem.B.dylib > > This is probably to be expected because googling showed that > "posix_memalign" support was introduced in Mac OS 10.6 and is not > available on <= 10.5. > > What I do not understand is even though I compiled on 10.7 with 10.6 > Target SDK (which exposes posix_memalign) I specified > "mmacosx-version-min=10.4" . > > glib's configure log indicates of course that posix_memalign was turned on : > >> configure:20598: checking for posix_memalign >> configure:20598: /usr/bin/gcc-4.2 -o conftest -arch i386 -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -Wall -I/Users/gtkdev2/gtk/inst/include -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -DG_DISABLE_SINGLE_INCLUDES -L/Users/gtkdev2/gtk/inst/lib -L/Users/gtkdev2/gtk/inst/lib -arch i386 -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.4 -Wl,-headerpad_max_install_names -framework Carbon conftest.c -lintl >&5 >> configure:20598: $? = 0 >> configure:20598: result: yes > > I suppose this is some configure bug on glib's side ? Or is it Apple's > fault ? Or mine ? Any ideas ? > > I could of course build with 10.5 SDK, but unfortunately this isn't > included with Xcode 4 anymore so I would have to install Xcode 3 side by > side or extract the old SDKs from the Xcode 3 pkgs ... > For now I have opted to manually edit glibs configure and remove > posix_memalign then it falls back to more primitive allocation methods. > Unfortunately the Apple doesn't mark the regular unix headers (posix_memalign is in stdlib.h) with version information, so setting macosx-version-min doesn't help. Fiddling the GLib configure is the right thing to do. Thanks for reporting this. As an aside, neither XCode 3 nor the older SDKs work on Lion, so we have to make everything build against SDK10.6 and able to run on 10.4. That's going to take a while, and the more testing the better. Regards, John Ralls |