[cairo] build cairo on Mac OS X Leopard

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Wed Feb 16 06:30:45 PST 2011


On Wed, 16 Feb 2011 18:19:42 +0530 (IST)
Prashant Saxena <animator333 at yahoo.com> wrote:
>Leopard 10.5.5 Intel
>python 2.6.6 universal
>wxpython 2.8.11.0 universal
>
>I am completely new on Mac. In order to build and use cairo with pycairo I am 
>following instructions at here:
>
>http://cairographics.org/end_to_end_build_for_mac_os_x/
>
>Before I proceed I would like to know few things:
>
>1. If I produce cairo libs using "-arch ppc -arch i386" flags only,
>is it going to support x86_64 platform? or I have to use "-arch x86_64"
>flag also. The idea is that lib should be supported on all architecture
>(32/64 Intel/PPC)

Current Mac OS X installs universal(?) binaries including
i386 & x86_64 codes on x86_64-capable machines by default,
and the kernel can execute both binaries. So, i386 binary
(without x86_64 code) is portable on both intel platforms.

Some frameworks have incompatibilities between i386 and
x86_64 codes (some APIs might be available on i386 only,
because for back compatibilities), so the build testing
with "-arch x86_64" flag would be safer for future development.

>2. After building libpng and pixman, how do I produce static cairo lib? 
>(combined libpng, zlib and cairo together)
>I have to add a flag for static building but my c/c++ skills are limited...:-(

Do you mean an archive library of Cairo? Or, do you mean
statically linked binary linking Cairo? I think, Mac OS X
is shipped without C startup routines & library (libSystem)
for static binary, and you cannot build statically linked
binary, even hello-world. It might be possible to prepare
such files by compiling the disclosed sources of Mac OS X
SDK, but nobody can guarantee that it works well.

Regards,
mpsuzuki


More information about the cairo mailing list