how can I build a universal mdmg of gtk2?

Kevin Layer layer at franz.com
Tue Aug 3 23:57:15 PDT 2010


I'm on a quest to make a single dmg that will work on i386 and x86_64.

Here's the method I used to build, on a 10.5 Intel system:

1. Install MacPorts 1.9.1.

2. Edit /opt/local/etc/macports/macports.conf to update

   universal_archs i386 x86_64

3. port install gtk2 +x11 +universal

4. port mdmg gtk2 +x11 +universal


I take the resulting dmg to a system without macports installed,
install it and run a 64-bit program that uses gtk2's dylib.  I get an
error that libatk-1.0.0.dylib is not found.  When I run file on
/opt/local/lib/libatk-1.0.0.dylib, it does indeed say it's only a i386
arch library (many of the others in this directory are i386 and
x86_64).

Below is the output of "file *.dylib" in /opt/local/lib/.  I don't
understand why only some of the libraries are universal.

Any help would be appreciated.

Thanks.

Kevin

libX11.6.dylib:                 Mach-O dynamically linked shared library i386
libX11.dylib:                   Mach-O dynamically linked shared library i386
libXau.6.dylib:                 Mach-O dynamically linked shared library i386
libXau.dylib:                   Mach-O dynamically linked shared library i386
libXcomposite.1.dylib:          Mach-O dynamically linked shared library i386
libXcomposite.dylib:            Mach-O dynamically linked shared library i386
libXcursor.1.dylib:             Mach-O dynamically linked shared library i386
libXcursor.dylib:               Mach-O dynamically linked shared library i386
libXdamage.1.dylib:             Mach-O dynamically linked shared library i386
libXdamage.dylib:               Mach-O dynamically linked shared library i386
libXdmcp.6.dylib:               Mach-O dynamically linked shared library i386
libXdmcp.dylib:                 Mach-O dynamically linked shared library i386
libXext.6.dylib:                Mach-O dynamically linked shared library i386
libXext.dylib:                  Mach-O dynamically linked shared library i386
libXfixes.3.dylib:              Mach-O dynamically linked shared library i386
libXfixes.dylib:                Mach-O dynamically linked shared library i386
libXft.2.1.13.dylib:            Mach-O dynamically linked shared library i386
libXft.2.dylib:                 Mach-O dynamically linked shared library i386
libXft.dylib:                   Mach-O dynamically linked shared library i386
libXi.6.dylib:                  Mach-O dynamically linked shared library i386
libXi.dylib:                    Mach-O dynamically linked shared library i386
libXinerama.1.dylib:            Mach-O dynamically linked shared library i386
libXinerama.dylib:              Mach-O dynamically linked shared library i386
libXrandr.2.dylib:              Mach-O dynamically linked shared library i386
libXrandr.dylib:                Mach-O dynamically linked shared library i386
libXrender.1.dylib:             Mach-O dynamically linked shared library i386
libXrender.dylib:               Mach-O dynamically linked shared library i386
libasprintf.0.dylib:            Mach-O dynamically linked shared library i386
libasprintf.dylib:              Mach-O dynamically linked shared library i386
libatk-1.0.0.dylib:             Mach-O dynamically linked shared library i386
libatk-1.0.dylib:               Mach-O dynamically linked shared library i386
libcairo.2.dylib:               Mach-O dynamically linked shared library i386
libcairo.dylib:                 Mach-O dynamically linked shared library i386
libcharset.1.dylib:             Mach-O dynamically linked shared library i386
libcharset.dylib:               Mach-O dynamically linked shared library i386
libexpat.0.dylib:               Mach-O dynamically linked shared library i386
libexpat.1.5.2.dylib:           Mach-O dynamically linked shared library i386
libexpat.1.dylib:               Mach-O dynamically linked shared library i386
libexpat.dylib:                 Mach-O dynamically linked shared library i386
libfontconfig.1.dylib:          Mach-O dynamically linked shared library i386
libfontconfig.dylib:            Mach-O dynamically linked shared library i386
libform.5.dylib:                Mach-O dynamically linked shared library i386
libform.dylib:                  Mach-O dynamically linked shared library i386
libformw.5.dylib:               Mach-O dynamically linked shared library i386
libformw.dylib:                 Mach-O dynamically linked shared library i386
libfreetype.6.dylib:            Mach-O dynamically linked shared library i386
libfreetype.dylib:              Mach-O dynamically linked shared library i386
libgailutil.18.dylib:           Mach-O universal binary with 2 architectures
libgailutil.18.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgailutil.18.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgailutil.dylib:              Mach-O universal binary with 2 architectures
libgailutil.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgailutil.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk-x11-2.0.0.dylib:         Mach-O universal binary with 2 architectures
libgdk-x11-2.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk-x11-2.0.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk-x11-2.0.dylib:           Mach-O universal binary with 2 architectures
libgdk-x11-2.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk-x11-2.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk_pixbuf-2.0.0.dylib:      Mach-O universal binary with 2 architectures
libgdk_pixbuf-2.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk_pixbuf-2.0.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk_pixbuf-2.0.dylib:        Mach-O universal binary with 2 architectures
libgdk_pixbuf-2.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk_pixbuf-2.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk_pixbuf_xlib-2.0.0.dylib: Mach-O universal binary with 2 architectures
libgdk_pixbuf_xlib-2.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk_pixbuf_xlib-2.0.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgdk_pixbuf_xlib-2.0.dylib:   Mach-O universal binary with 2 architectures
libgdk_pixbuf_xlib-2.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgdk_pixbuf_xlib-2.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgettextlib-0.18.1.dylib:     Mach-O dynamically linked shared library i386
libgettextlib.dylib:            Mach-O dynamically linked shared library i386
libgettextpo.0.dylib:           Mach-O dynamically linked shared library i386
libgettextpo.dylib:             Mach-O dynamically linked shared library i386
libgettextsrc-0.18.1.dylib:     Mach-O dynamically linked shared library i386
libgettextsrc.dylib:            Mach-O dynamically linked shared library i386
libgio-2.0.0.dylib:             Mach-O dynamically linked shared library i386
libgio-2.0.dylib:               Mach-O dynamically linked shared library i386
libglib-2.0.0.dylib:            Mach-O dynamically linked shared library i386
libglib-2.0.dylib:              Mach-O dynamically linked shared library i386
libgmodule-2.0.0.dylib:         Mach-O dynamically linked shared library i386
libgmodule-2.0.dylib:           Mach-O dynamically linked shared library i386
libgobject-2.0.0.dylib:         Mach-O dynamically linked shared library i386
libgobject-2.0.dylib:           Mach-O dynamically linked shared library i386
libgthread-2.0.0.dylib:         Mach-O dynamically linked shared library i386
libgthread-2.0.dylib:           Mach-O dynamically linked shared library i386
libgtk-x11-2.0.0.dylib:         Mach-O universal binary with 2 architectures
libgtk-x11-2.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgtk-x11-2.0.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libgtk-x11-2.0.dylib:           Mach-O universal binary with 2 architectures
libgtk-x11-2.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libgtk-x11-2.0.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
libiconv.2.dylib:               Mach-O dynamically linked shared library i386
libiconv.dylib:                 Mach-O dynamically linked shared library i386
libintl.8.dylib:                Mach-O dynamically linked shared library i386
libintl.dylib:                  Mach-O dynamically linked shared library i386
libjasper.1.0.0.dylib:          Mach-O dynamically linked shared library i386
libjasper.1.dylib:              Mach-O dynamically linked shared library i386
libjasper.dylib:                Mach-O dynamically linked shared library i386
libjpeg.8.dylib:                Mach-O dynamically linked shared library i386
libjpeg.dylib:                  Mach-O dynamically linked shared library i386
libmenu.5.dylib:                Mach-O dynamically linked shared library i386
libmenu.dylib:                  Mach-O dynamically linked shared library i386
libmenuw.5.dylib:               Mach-O dynamically linked shared library i386
libmenuw.dylib:                 Mach-O dynamically linked shared library i386
libncurses.5.dylib:             Mach-O dynamically linked shared library i386
libncurses.dylib:               Mach-O dynamically linked shared library i386
libncursesw.5.dylib:            Mach-O dynamically linked shared library i386
libncursesw.dylib:              Mach-O dynamically linked shared library i386
libpanel.5.dylib:               Mach-O dynamically linked shared library i386
libpanel.dylib:                 Mach-O dynamically linked shared library i386
libpanelw.5.dylib:              Mach-O dynamically linked shared library i386
libpanelw.dylib:                Mach-O dynamically linked shared library i386
libpango-1.0.0.dylib:           Mach-O dynamically linked shared library i386
libpango-1.0.dylib:             Mach-O dynamically linked shared library i386
libpangocairo-1.0.0.dylib:      Mach-O dynamically linked shared library i386
libpangocairo-1.0.dylib:        Mach-O dynamically linked shared library i386
libpangoft2-1.0.0.dylib:        Mach-O dynamically linked shared library i386
libpangoft2-1.0.dylib:          Mach-O dynamically linked shared library i386
libpangox-1.0.0.dylib:          Mach-O dynamically linked shared library i386
libpangox-1.0.dylib:            Mach-O dynamically linked shared library i386
libpangoxft-1.0.0.dylib:        Mach-O dynamically linked shared library i386
libpangoxft-1.0.dylib:          Mach-O dynamically linked shared library i386
libpixman-1.0.dylib:            Mach-O dynamically linked shared library i386
libpixman-1.dylib:              Mach-O dynamically linked shared library i386
libpng.3.dylib:                 Mach-O dynamically linked shared library i386
libpng.dylib:                   Mach-O dynamically linked shared library i386
libpng12.0.dylib:               Mach-O dynamically linked shared library i386
libpng12.dylib:                 Mach-O dynamically linked shared library i386
libtiff.3.dylib:                Mach-O dynamically linked shared library i386
libtiff.dylib:                  Mach-O dynamically linked shared library i386
libtiffxx.3.dylib:              Mach-O dynamically linked shared library i386
libtiffxx.dylib:                Mach-O dynamically linked shared library i386
libxml2.2.dylib:                Mach-O dynamically linked shared library i386
libxml2.dylib:                  Mach-O dynamically linked shared library i386
libz.1.2.5.dylib:               Mach-O dynamically linked shared library i386
libz.1.dylib:                   Mach-O dynamically linked shared library i386
libz.dylib:                     Mach-O dynamically linked shared library i386


More information about the macports-users mailing list