Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#31148 closed defect (fixed)

gtk2 +quartz requires pango -x11

Reported by: macports.org@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.2
Keywords: quartz Cc: ryandesign (Ryan Carsten Schmidt), nonstop.server@…, cooljeanius (Eric Gallager)
Port: gtk2

Description

To update to Lion I uninstalled and cleaned all ports:

# port -fp uninstall --follow-dependents installed
Error: No ports matched the given expression
# port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.0.2 installed,
MacPorts base version 2.0.2 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
# port upgrade outdated
Error: No ports matched the given expression

So after wiping the slate clean, I started to install perl and then gimp

bash-3.2# port install perl5
...
bash-3.2# port install gimp +animation +quartz
--->  Computing dependencies for gimp
--->  Dependencies to be installed: gimp-app gimp2 aalib autoconf help2man gettext expat expat libiconv gperf libiconv ncurses ncursesw gettext p5.12-locale-gettext m4 automake libtool curl curl-ca-bundle libidn openssl zlib pkgconfig glib2 glib2 gegl babl librsvg cairo fontconfig freetype bzip2 fontconfig libpixman libpng xorg-xcb-util xorg-libxcb python27 db46 python_select readline sqlite3 python27 xorg-libXau xorg-xproto xorg-libXdmcp xorg-libpthread-stubs xorg-xcb-proto libxml2 libxml2 xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto gtk2 atk gtk-doc docbook-xml docbook-xml-4.1.2 xmlcatmgr docbook-xml-4.2 docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 docbook-xml-5.0 docbook-xsl docbook-xsl gnome-doc-utils intltool gnome-common p5.12-getopt-long p5.12-pathtools p5.12-scalar-list-utils p5.12-xml-parser iso-codes iso-codes libxslt libxslt py27-libxml2 rarian getopt gdk-pixbuf2 jasper jpeg tiff pango Xft2 shared-mime-info libart_lgpl libcroco libgsf gconf dbus-glib dbus orbit2 libidl policykit eggdbus gnome-vfs desktop-file-utils popt gnome-mime-data libbonobo w3m boehmgc ffmpeg XviD dirac cppunit faad2 gmake lame libogg libsdl xorg-libXext xorg-libXrandr xorg-randrproto libtheora libvorbis libvpx yasm schroedinger orc speex texi2html x264 graphviz gd2 xpm xorg-libXt xorg-libsm xorg-libice ghostscript libpaper gts netpbm jbigkit libLASi cmake urw-fonts xorg-libXaw groff psutils xorg-libXmu libopenraw boost icu libspiro lua openexr ilmbase gsed lcms libexif libgnomeui libbonoboui libgnome esound audiofile libgnomecanvas libglade2 libgnome-keyring gnome-keyring libgcrypt libgpg-error libtasn1 libmng libwmf poppler openjpeg lcms2 poppler-data py27-gtk py27-cairo py27-numpy fftw-3 py27-nose py27-distribute py27-py py27-gobject libffi gimp2 gimp2 gimp-gap MPlayer libmad lzo2 faac gimp-jp2 gimp-lqr-plugin liblqr gtk-nodoka-engine coreutils gmp gutenprint icns-gimp xsane sane-backends libusb-compat libusb

Perl went through like a charm, but gimp failed with error when compiling dependency "gtk2" with the following error message:

--->  Fetching gtk2
Error: Please install pango without the x11 variant, by running 'port install pango -x11'.
Error: Target org.macports.fetch returned: pango must be installed with the x11 variant disabled
Error: Failed to install gtk2
Log for gtk2 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_gtk2/gtk2/main.log
Error: The following dependencies were not installed: gimp-app gimp2 gegl babl librsvg gtk2 libart_lgpl libcroco libgsf gconf dbus-glib dbus orbit2 libidl policykit eggdbus gnome-vfs desktop-file-utils popt gnome-mime-data libbonobo w3m boehmgc ffmpeg XviD dirac cppunit faad2 gmake lame libogg libsdl xorg-libXext xorg-libXrandr xorg-randrproto libtheora libvorbis libvpx yasm schroedinger orc speex texi2html x264 graphviz gd2 xpm xorg-libXt xorg-libsm xorg-libice ghostscript libpaper gts netpbm jbigkit libLASi cmake urw-fonts xorg-libXaw groff psutils xorg-libXmu libopenraw boost icu libspiro lua openexr ilmbase gsed lcms libexif libgnomeui libbonoboui libgnome esound audiofile libgnomecanvas libglade2 libgnome-keyring gnome-keyring libgcrypt libgpg-error libtasn1 libmng libwmf poppler openjpeg lcms2 poppler-data py27-gtk py27-cairo py27-numpy fftw-3 py27-nose py27-distribute py27-py py27-gobject libffi gimp2 gimp2 gimp-gap MPlayer libmad lzo2 faac gimp-jp2 gimp-lqr-plugin liblqr gtk-nodoka-engine coreutils gmp gutenprint icns-gimp xsane sane-backends libusb-compat libusb
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

It seems that gtk2 complains about "pango" that has been installed as a gimp dependency prior to gtk2:

--->  Fetching archive for pango
--->  Attempting to fetch pango-1.28.4_1+quartz+x11.darwin_11.x86_64.tgz from http://packages.macports.org/pango
--->  Fetching pango
--->  Attempting to fetch pango-1.28.4.tar.bz2 from http://lil.fr.distfiles.macports.org/pango
--->  Verifying checksum(s) for pango
--->  Extracting pango
--->  Applying patches to pango
--->  Configuring pango
--->  Building pango
--->  Staging pango into destroot
--->  Installing pango @1.28.4_1+quartz+x11
--->  Activating pango @1.28.4_1+quartz+x11
--->  Cleaning pango

The conflict here is that "pango" was installed with variant +x11, however "gtk2" wants "pango" installed with variant -x11.

Attachments (2)

main.log (2.6 KB) - added by macports.org@… 13 years ago.
Log for gtk2
shell output.txt (40.8 KB) - added by macports.org@… 13 years ago.
output of "port install gimp +animation +quartz"

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

Changed 13 years ago by macports.org@…

Attachment: main.log added

Log for gtk2

Changed 13 years ago by macports.org@…

Attachment: shell output.txt added

output of "port install gimp +animation +quartz"

comment:2 in reply to:  description Changed 13 years ago by macports.org@…

In "main.log" from gtk2 compile, I found the lines pointing to a HTTP 404 "file not found error":

:msg:archivefetch --->  Attempting to fetch gtk2-2.24.5_0+no_x11+quartz.darwin_11.x86_64.tgz from http://packages.macports.org/gtk2
:debug:archivefetch Fetching archive failed:: The requested URL returned error: 404

Could it be that gtk2 was not downloaded at all in the first place?

However, a few lines later this situation seems to have been resolved:

:debug:fetch fetch phase started at Tue Sep  6 23:46:51 CEST 2011
:notice:fetch --->  Fetching gtk2

Maybe someone aquainted with the ports internals can shed light on this?

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; macports.org@… removed
Keywords: gimp gkt2 pango removed
Port: gtk2 added
Summary: gimp @2.6.11 +animation +quartz: compiling gtk2 failedgtk2 +quartz requires pango -x11

The "file not found" error is not a problem. MacPorts 2 tries to fetch pre-compiled packages from our build server. If the package doesn't exist there, it is built locally on your machine. This is normal.

Possibly, gtk2 is wrong for asking you to install pango without the x11 variant. I think all gtk2 wants in this case is that you install pango with the quartz variant, which you did. Years ago, it didn't used to be possible to install pango with both the x11 and the quartz variants simultaneously; I think this gtk2 error message may date from that time and have been written with that restriction in mind.

Then again, it appears that in gtk2, you must choose either x11 or quartz support; unlike with pango, you cannot have both. And in order to build gtk2 with quartz support, and therefore without x11 support, you must build pango without x11 support as well. At least, that appears to be the logic that was used when writing the current gtk2 portfile.

Testing whether this is still accurate would involve someone editing the gtk2 portfile to remove this check, then trying to install gtk2 +quartz while pango +quartz +x11 is installed, and then verifying that gtk2 did in fact get built without any x11 support (i.e. is not linked with any x11 libraries). The gtk2 port has no maintainer, so someone would have to volunteer to do this work.

comment:4 Changed 13 years ago by macports.org@…

What can I do to remedy the situation?

comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

If you just want to work around the problem, you can do what the message says and install the pango port with only quartz support and no x11 support, something like:

sudo port install pango +quartz -x11

Or if you want to help us fix the problem for everyone, you can do the testing I described above and tell us what happens, possibly even write a patch to fix it.

comment:6 Changed 13 years ago by macports.org@…

See also comment in ticket #14305 and ticket #27990

comment:7 Changed 12 years ago by nonstop.server@…

Cc: nonstop.server@… added

Cc Me!

comment:8 in reply to:  3 Changed 12 years ago by bob@…

Replying to ryandesign@…:

Testing whether this is still accurate would involve someone editing the gtk2 portfile to remove this check, then trying to install gtk2 +quartz while pango +quartz +x11 is installed, and then verifying that gtk2 did in fact get built without any x11 support (i.e. is not linked with any x11 libraries).

I ran into this problem trying to install gimp2. I removed the check in the gtk2 portfile as suggested and was able to successfully build and run gimp2. Gimp runs without starting X11, although otool -L libgtk-quartz-2.0.dylib shows that it references several x11 libraries.

So far I haven't built anything else that uses gtk2, but at least Gimp works OK.

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

comment:10 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.