Opened 8 years ago

Last modified 7 weeks ago

#37256 assigned defect

gobject-introspection: building non-universal i386 fails when python27 is installed universal i386 x86_64

Reported by: ryandesign (Ryan Schmidt) Owned by: dbevans (David B. Evans)
Priority: Low Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: cooljeanius (Eric Gallager)
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/", line 34, in <module>
    from giscanner.dumper import compile_introspection_binary
  File "./giscanner/", line 28, in <module>
    from .gdumpparser import IntrospectionBinary
  File "./giscanner/", line 31, in <module>
    from .transformer import TransformerException
  File "./giscanner/", line 27, in <module>
    from .girparser import GIRParser
  File "./giscanner/", line 26, in <module>
    from .girwriter import COMPATIBLE_GIR_VERSION
  File "./giscanner/", line 25, in <module>
    from .xmlwriter import XMLWriter
  File "./giscanner/", line 74, in <module>
    from _giscanner import collect_attributes
  File "./giscanner/", line 66, in load_module
    mod = imp.load_module(name, open(realpath), realpath, (extension, 'rb', 3))
ImportError: dlopen(./.libs/, 2): no suitable image found.  Did find:
	./.libs/ 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 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.

Change History (2)

comment:1 Changed 8 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 7 weeks ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to dbevans
Status: newassigned
Note: See TracTickets for help on using tickets.