[cairo] build cairo on Mac OS X Leopard

Andrea Canciani ranma42 at gmail.com
Wed Feb 16 06:27:53 PST 2011


On Wed, Feb 16, 2011 at 1:49 PM, Prashant Saxena <animator333 at yahoo.com> wrote:
> Hi,
>
> 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)

You have to also use -arch x86_64. In the guide you are following,
appropriate compilation flags for 64bits builds are given in the section
"Setup environment variables for fat binary compilation". Please read
that section carefully, as it point out a very important tradeoff between
operating system version compatibility and architecture compatibility.

>
> 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...:-(

I never tried to do this, but AFAICT if you compile zlib, libpng and pixman
as statically-linked libraries, you should get the desired result.

Andrea


More information about the cairo mailing list