can't build cairo

Kevin Layer layer at franz.com
Fri Nov 5 14:02:30 PDT 2010


Ryan Schmidt <ryandesign at macports.org> wrote:

>> On Oct 28, 2010, at 19:44, Kevin Layer wrote:
>> 
>> > 1. Install MacPorts 1.9.1.
>> > 
>> > 2. Edit /opt/local/etc/macports/macports.conf to update to:
>> > 
>> >   universal_archs i386 x86_64
>> > 
>> > Then, got this:
>> > 
>> > # port install gtk2 +x11 +universal
>> 
>> [snip]
>> 
>> > :info:build   CCLD   libcairo.la
>> > :info:build Undefined symbols:
>> > :info:build   "___umodti3", referenced from:
>> > :info:build       __cairo_uint128_divrem in cairo-wideint.o
>> > :info:build   "___udivti3", referenced from:
>> > :info:build       __cairo_uint128_divrem in cairo-wideint.o
>> > :info:build ld: symbol(s) not found
>> 
>> Yes, this was also reported in the issue tracker:
>> 
>> http://trac.macports.org/ticket/27011
>> 
>> cairo does not appear to like building for x86_64 on Leopard. Could you report this problem to the developers of cairo?
>> 

I joined the cairo list and reported the problem.  Below is what
transpired.

  From: Alexander Shulgin <alex.shulgin at gmail.com>
  Date: Tue, 2 Nov 2010 09:36:50 +0200
  Message-ID: <AANLkTik6mQZHWfWFEt8tSBpUjcSQeZCqGmfEgzJv7a2T at mail.gmail.com>
  Subject: Re: [cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)
  To: Kevin Layer <layer at franz.com>
  Cc: cairo at cairographics.org

  On Tue, Nov 2, 2010 at 01:36, Kevin Layer <layer at franz.com> wrote:
  > I'm trying to build the universal version of gtk2, and in the process
  > it tries to build cairo and gets the following error.  Is this a known
  > problem?
  >
  > I have the latest Xcode for Leopard installed.  3.1.4.  The rest of
  > the system is up to date, as well.

  I have built cairo-1.10 on Snow Leopard (10.6.4) w/o a problem, both
  x64 and i386 variants.  So this might be a problem with your version
  of Xcode.  I'd try to check on the Apple developer site if there's any
  updates/knwown issues to that.

  --
  Alex

I said that I had the latest, 3.1.4 and software update showed nothing
needed further updating.

  Date: Tue, 2 Nov 2010 08:44:11 +0100
  Message-ID: <AANLkTi=Bu9RWzYrCi8PJW_1Xdod7zvwBCi25y7TUj0j0 at mail.gmail.com>
  Subject: Re: [cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)
  From: Andrea Canciani <ranma42 at gmail.com>
  To: Alexander Shulgin <alex.shulgin at gmail.com>
  Cc: Kevin Layer <layer at franz.com>, cairo <cairo at cairographics.org>

  On Tue, Nov 2, 2010 at 8:36 AM, Alexander Shulgin
  <alex.shulgin at gmail.com> wrote:
  > On Tue, Nov 2, 2010 at 01:36, Kevin Layer <layer at franz.com> wrote:
  >> I'm trying to build the universal version of gtk2, and in the process
  >> it tries to build cairo and gets the following error.  Is this a known
  >> problem?

  I think it could be a problem with the configuration being correct only for
  one of the two architectures (in particular it looks like it detects uint128_t,
  but it is probably not available on i386).

  >>
  >> I have the latest Xcode for Leopard installed.  3.1.4.  The rest of
  >> the system is up to date, as well.
  >
  > I have built cairo-1.10 on Snow Leopard (10.6.4) w/o a problem, both
  > x64 and i386 variants.  So this might be a problem with your version
  > of Xcode.  I'd try to check on the Apple developer site if there's any
  > updates/knwown issues to that.

  You should be able to compile each variant independently (rerunning the
  configuration script) and then link them together to get an universal library.

  I don't know if this would be a valid option, but would confirm my
  suspects about what the problem is.

  Andrea

and

  Date: Wed, 3 Nov 2010 23:20:00 +0100
  Message-ID: <AANLkTimQBLYWcrDqW1trKAuEoGHHP+FfX7hWmxWncy6U at mail.gmail.com>
  Subject: Re: [cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)
  From: Andrea Canciani <ranma42 at gmail.com>
  To: Kevin Layer <layer at franz.com>
  Cc: Alexander Shulgin <alex.shulgin at gmail.com>,        cairo    <cairo at cairographics.org>

  On Wed, Nov 3, 2010 at 11:05 PM, Kevin Layer <layer at franz.com> wrote:
  > Alexander Shulgin <alex.shulgin at gmail.com> wrote:
  >
  >>> On Tue, Nov 2, 2010 at 01:36, Kevin Layer <layer at franz.com> wrote:
  >>> > I'm trying to build the universal version of gtk2, and in the process
  >>> > it tries to build cairo and gets the following error.  Is this a known
  >>> > problem?
  >>> >
  >>> > I have the latest Xcode for Leopard installed.  3.1.4.  The rest of
  >>> > the system is up to date, as well.
  >>>
  >>> I have built cairo-1.10 on Snow Leopard (10.6.4) w/o a problem, both
  >>> x64 and i386 variants.  So this might be a problem with your version
  >>> of Xcode.  I'd try to check on the Apple developer site if there's any
  >>> updates/knwown issues to that.
  >
  > I'm trying to build a universal binary with macports.  Clearly it
  > doesn't work, and the macports guys say it's a cairo problem.  I
  > really need a universal binary, and know of no other way to (easily)
  > build it.

  Can you check if building the i386 and the x86_64 versions separately
  and later merging them works?
  A good reference on how to merge the two builds is here:

  http://developer.apple.com/library/mac/technotes/tn2005/tn2137.html#TNTAG3

  >
  > Isn't there anything more that can be done?

  Please report the technote to the macports guys (and/or crosspost
  me to them ;) ).
  From what you're saying it looks like they assume that the configure
  script will produce the same results for ppc32/ppc64/i386/x86_64.
  To me this looks like a very strong assumption.

  If they can point out what we should change to help them get a
  universal binary, we can try to fix it in cairo.

  Andrea

and

  From: Alexander Shulgin <alex.shulgin at gmail.com>
  Date: Thu, 4 Nov 2010 09:30:49 +0200
  Message-ID: <AANLkTin386LZ9iZXL3W5nZNMeyzA0feJ9UhBexw9=cOD at mail.gmail.com>
  Subject: Re: [cairo] problem building cairo 1.10.0 for x86_64 on Mac OS X 10.5 (Leopard)
  To: Kevin Layer <layer at franz.com>
  Cc: cairo at cairographics.org

  On Thu, Nov 4, 2010 at 00:05, Kevin Layer <layer at franz.com> wrote:
  > Alexander Shulgin <alex.shulgin at gmail.com> wrote:
  >
  >>> I have built cairo-1.10 on Snow Leopard (10.6.4) w/o a problem, both
  >>> x64 and i386 variants.  So this might be a problem with your version
  >>> of Xcode.  I'd try to check on the Apple developer site if there's any
  >>> updates/knwown issues to that.
  >
  > I'm trying to build a universal binary with macports.  Clearly it
  > doesn't work, and the macports guys say it's a cairo problem.  I
  > really need a universal binary, and know of no other way to (easily)
  > build it.
  >
  > Isn't there anything more that can be done?

  Oh, I didn't use macports -- I've built from scratch with ./configure;
  make; make install; and it went just fine.

  --
  Alex


More information about the macports-users mailing list