Opened 9 years ago

Closed 9 years ago

#50517 closed defect (invalid)

py27-cairo needs x11 variant?

Reported by: olupton (Olli Lupton) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: macports@…
Port: py27-cairo

Description

Hi,

I have the following variants set on my system: +quartz -x11

This led to a broken py-cairo install:

$ python

import gi gi.require_foreign("cairo")

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gi/init.py", line 137, in require_foreign

raise ImportError(str(e))

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so, 2): Symbol not found: _cairo_xlib_surface_get_depth

Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so Expected in: /opt/local/lib/libcairo.2.dylib

in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so

Building cairo with the +x11 variant solved it; I think the problem is that the binary py-cairo package assumed x11 support in cairo but did not request it?

Change History (2)

comment:1 Changed 9 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:2 Changed 9 years ago by dbevans (David B. Evans)

Resolution: invalid
Status: newclosed

Adding a +x11 variant will not help if you build with -x11. Now that cairo (and others) install both quartz and x11 backends by default, building with +quartz -x11 is not necessary and as you have shown can cause problems. I recommend building with just +quartz, although X11 support will be built with cairo (in addition to quartz) it will not interfere with your +quartz build.

Note: See TracTickets for help on using tickets.