[cairo-bugs] [Bug 39493] 32-bit build fails with MacOSX10.7.sdk

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 7 07:21:25 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=39493

--- Comment #6 from Andrea Canciani <ranma42 at gmail.com> 2011-09-07 07:21:23 PDT ---
Created an attachment (id=50961)
 View: https://bugs.freedesktop.org/attachment.cgi?id=50961
 Review: https://bugs.freedesktop.org/review?bug=39493&attachment=50961

Make cairo-missing a static library

(In reply to comment #4)
> Cairo builds on Lion with the ranma42 patch, yes.
> 
> The only problem with any build-time configuration for these is that the
> resulting shared library won't work on previous versions of OSX. That includes
> Snow Leopard and previous in the cases of getline and strndup, and Tiger for
> ATSUI support. One can work around that for now by building against the 10.6
> SDK.

Yes, that's true.
If it becomes an issue, we can define strndup()/getline() in cairo-missing
unconditionally, so that they will always be available.

Regarding the font thing, I just noticed that although it's not available in
the headers, FMGetATSFontRefFromFont is still provided by the 10.7 frameworks:
$ nm
/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks/QD.framework/Versions/Current/QD
| grep FMGetATSFontRefFromFont
0000000000007ec1 T _FMGetATSFontRefFromFont

We can probably make it available just like "private" APIs by dlsym'ing it.

(In reply to comment #5)
> But unfortunately it now fails when building on Leopard:
>   CCLD   cairo-analyse-trace
> Undefined symbols:
>   "_strndup", referenced from:
>       _main in cairo-analyse-trace.o
>   "_getline", referenced from:
>       _main in cairo-analyse-trace.o
> ld: symbol(s) not found
> 
> $  nm util/cairo-missing/.libs/libcairo-missing.dylib | grep strndup
> 00001da0 t _strndup
> 
> So, not exported.

Yes, they're not exported as it was supposed to be a static library.
Can you please check if the attached patch fixes your 10.6 build?

Otherwise, can you provide additional details about your 10.6 build
environment?
In my environment the build fails with:
Undefined symbols for architecture x86_64:
  "_png_set_longjmp_fn", referenced from:
      _read_png in lto.o
      _png_simple_error_callback in lto.o
      _write_png in lto.o

(which is weird, as the build works just fine when I don't have "-isysroot
/Developer/SDKs/MacOSX10.6.sdk" in CFLAGS/LDFLAGS).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list