[MacPorts] #37256: gobject-introspection: building non-universal i386 fails when python27 is installed universal i386 x86_64
MacPorts
noreply at macports.org
Sun Dec 9 01:56:05 PST 2012
#37256: gobject-introspection: building non-universal i386 fails when python27 is
installed universal i386 x86_64
--------------------------+-----------------------------------
Reporter: ryandesign@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Low | Milestone:
Component: ports | Version: 2.1.2
Keywords: | Port: gobject-introspection
--------------------------+-----------------------------------
This one's interesting. Installing gobject-introspection without the
universal variant fails when build_arch is i386 (i.e. on Leopard,
presumably on Tiger too) on a 64-bit Mac if python27 is already installed
universal for i386 and x86_64. (I changed my universal_archs to this in
macports.conf.) The error message is:
{{{
Traceback (most recent call last):
File "./g-ir-scanner", line 44, in <module>
from giscanner.scannermain import scanner_main
File "./giscanner/scannermain.py", line 34, in <module>
from giscanner.dumper import compile_introspection_binary
File "./giscanner/dumper.py", line 28, in <module>
from .gdumpparser import IntrospectionBinary
File "./giscanner/gdumpparser.py", line 31, in <module>
from .transformer import TransformerException
File "./giscanner/transformer.py", line 27, in <module>
from .girparser import GIRParser
File "./giscanner/girparser.py", line 26, in <module>
from .girwriter import COMPATIBLE_GIR_VERSION
File "./giscanner/girwriter.py", line 25, in <module>
from .xmlwriter import XMLWriter
File "./giscanner/xmlwriter.py", line 74, in <module>
from _giscanner import collect_attributes
File "./giscanner/libtoolimporter.py", line 66, in load_module
mod = imp.load_module(name, open(realpath), realpath, (extension,
'rb', 3))
ImportError: dlopen(./.libs/_giscanner.so, 2): no suitable image found.
Did find:
./.libs/_giscanner.so: mach-o, but wrong architecture
make[2]: *** [GLib-2.0.gir] Error 1
}}}
The problem is that 64-bit is considered better than 32-bit so python27
runs 64-bit, then is surprised when it cannot find a 64-bit _giscanner.so.
The workaround I used was to install gobject-introspection universal as
well.
Perhaps it's an esoteric case, since most users aren't on Leopard anymore
and most of those that are haven't changed their universal_archs, but I
wanted to at least document the problem and the workaround.
--
Ticket URL: <https://trac.macports.org/ticket/37256>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list