Re: [gtk-osx-users] [Gtk-osx-users] Problem with pycairo-python

On Jun 29, 2013, at 3:28 AM, Felix Krause <flyx isobeef org> wrote:


I am trying to compile meta-gtk-osx-python with stable moduleset for OSX 10.8, x86_64. While building 
pycairo-python2.6, I get the following error:

ld: warning: ignoring file /Users/Felix/gtk/inst/lib/libcairo.dylib, file was built for unsupported file 
format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the 
architecture being linked (i386): /Users/Felix/gtk/inst/lib/libcairo.dylib
Undefined symbols for architecture i386:
 "_cairo_append_path", referenced from:
     _pycairo_append_path in context.c.1.o
 [… snip: lots of other undefined refs]
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/02/t0l941k53254ghw2cjg1rn200000gn/T//ccfwxXwO.out (No such file 
or directory)
Waf: Leaving directory `/Users/Felix/gtk/source/py2cairo-1.10.0/build_directory'
Build failed
-> task failed (exit status 1): 
      {task 4464385552: cshlib 
cairomodule.c.1.o,context.c.1.o,font.c.1.o,path.c.1.o,pattern.c.1.o,matrix.c.1.o,surface.c.1.o ->}
['/Applications/', 'src/cairomodule.c.1.o', 
'src/context.c.1.o', 'src/font.c.1.o', 'src/path.c.1.o', 'src/pattern.c.1.o', 'src/matrix.c.1.o', 
'src/surface.c.1.o', '-o', '/Users/Felix/gtk/source/py2cairo-1.10.0/build_directory/src/', 
'-L/Users/Felix/gtk/inst/lib', '-lcairo', '-lpython2.7', '-L/Users/Felix/gtk/inst/lib', 
'-L/Users/Felix/gtk/inst/lib', '-arch', 'x86_64', 
'-mmacosx-version-min=10.8', '-Wl,-headerpad_max_install_names', '-dynamiclib', '-Wl,-F.', '-arch', 'i386', 
'-arch', 'x86_64', '-Wl,-F.', '-arch', 'i386', '-arch', 'x86_64', '-arch', 'i386', '-arch', 'x86_64']

Obviously, it tries to build a universal binary. How can I fix this?

Waf by default gets the CFLAGS values from python rather than the environment. If you don't build your own it 
will obviously use Apple's, i.e. /usr/bin/python, which is universal.

I'm no waf expert, but it appears to me that the only way to get it to set CFLAGS from the environment is to 
rewrite the wscript, and since I'm no waf expert I find
it easier to just build a single-architecture Python. Unfortunately for your case, Python needs to be built 
early in the process or dependencies get screwed up, so you should wipe out your source and installation 
(prefix) trees and start over, with python in the list of modules to build this time. The list I just used is:
meta-gtk-osx-bootstrap, python, meta-gtk-osx-core, meta-gtk-osx-python.
Do it all in one command so that jhbuild can interleave the individual modules in the right order.

John Ralls
This email is sponsored by Windows:

Build for Windows Store.
Gtk-osx-users mailing list
Gtk-osx-users lists sourceforge net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]