[Gtk-osx-users] posix_memalign in libSystem.B



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.


Thanks Marco




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