[cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)
ranma42 at gmail.com
Tue Nov 9 07:42:12 PST 2010
On Tue, Nov 9, 2010 at 3:08 PM, Kevin Layer <layer at franz.com> wrote:
> Alexander Shulgin <alex.shulgin at gmail.com> wrote:
>>> On Mon, Nov 8, 2010 at 23:31, Kevin Layer <layer at franz.com> wrote:
>>> > Andrea Canciani <ranma42 at gmail.com> wrote:
>>> >>> Please try building the archive available here:
>>> >>> http://www.cairographics.org/releases/cairo-1.10.0.tar.gz
>>> >>> It should be as simple as decompressing it and running:
>>> >>> ./configure
>>> >>> make
>>> >>> (assuming that you already added macports to the path).
>>> >>> If both these commands run successfully, the problem is likely
>>> >>> in the macports packaging.
>>> > They did. However, that only made the i386 version. How do I
>>> > configure for x86_64? (I looked at configure and it wasn't obvious)
>>> I guess it's ./configure --build=x86_64 or something like that.
> OK, did that. The make that followed worked, but didn't produce any
> $ find . -name '*.dylib'
> $ find . -name 'libcairo.*'
> $ find . -name 'libcairo.*' | xargs file
> ./src/.libs/libcairo.a: current ar archive random library
> ./src/.libs/libcairo.la: ASCII English text, with very long lines
> ./src/.libs/libcairo.lai: ASCII English text, with very long lines
> ./src/libcairo.la: ASCII English text, with very long lines
> Not sure where to go from here. Any ideas?
You might want to try something like
export LDFLAGS="-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
export CFLAGS="-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
In http://cairographics.org/end_to_end_build_for_mac_os_x/ Travis reports that
the 10.4 sdk cannot be used to build for 64 bits targets. Maybe the dev
environment you're using defaults to using the 10.4 sdk. If the previous
configuration works, you maight want to try:
export LDFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64
export CFLAGS="-arch ppc -arch i386 -arch ppc64 -arch x86_64 -isysroot
(you can leave the ppc archs out if you don't want them)
If this works, you should get a universal dylib.
If this doesn't, but the previous config worked, you should still be able to
lipo the i386 and the x86_64 dylibs together.
If the previous config doesn't work... you should have some new error
message that might provide further insight.
Please report if any of these methods work for you as it will probably be
useful for other users.
PS: http://cairographics.org/end_to_end_build_for_mac_os_x/ is probably
a good reference to keep around when trying to build cairo. I expect you
to already have all the dependencies, so you can skip most of it, but it
points out important and non-obvious problems, like the missing 64bits
support in the 10.4 sdk
More information about the cairo