Opened 13 years ago

Closed 2 years ago

#30072 closed defect (worksforme)

terminator does not work

Reported by: f.calboli@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: terminator

Description (last modified by mf2k (Frank Schima))

:~$ terminator 
You need to install the python bindings for gobject, gtk and pango to run Terminator.

I do have gobject, gtk and pango in my /opt tree

:~$ port installed |grep gobj
  py27-gobject @2.26.0_1 (active)
:~$ port installed |grep pang
  pango @1.28.4_0 (active)
:~$ port installed |grep gtk
  gtk-doc @1.17_0+python27 (active)
  gtk2 @2.24.4_0+x11 (active)
  py27-gtk @2.22.0_1 (active)

Change History (5)

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…

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

Resolution: fixed
Status: newclosed

Fixed in r80839 by adding python variants to terminator, as was recently done to vte. You must ensure the python variant you select for terminator matches the python variant you selected for vte.

comment:3 Changed 12 years ago by agwblack@…

Resolution: fixed
Status: closedreopened

I do not believe this issue is fixed. I am having the same problem as originally described. I believe that I have the python27 versions of all the relevant packages installed.

for i in {terminator,python,vte,gtk,pango,gobj}; do port installed | grep $i; done
  terminator @0.96_0+python27 (active)
  gnome-doc-utils @0.20.6_0+python27 (active)
  gtk-doc @1.17_0+python27 (active)
  python27 @2.7.2_0
  python27 @2.7.2_0+universal
  python27 @2.7.2_4+universal (active)
  python_select @0.3_1 (active)
  terminator @0.96_0+python27 (active)
  vte @0.28.2_0+python27 (active)
  xorg-libxcb @1.7_0+python27
  xorg-libxcb @1.7_0+python27+universal (active)
  xorg-xcb-proto @1.6_0+python27 (active)
  vte @0.28.2_0+python27 (active)
  gtk-doc @1.17_0+python27 (active)
  gtk2 @2.24.4_0+x11 (active)
  py27-gtk @2.22.0_1+x11 (active)
  pango @1.28.4_0+x11 (active)
  py27-gobject @2.26.0_1 (active)

python --version
  Python 2.7.2

terminator 
  You need to install the python bindings for gobject, gtk and pango to run Terminator.

Some investigation suggests that the python script that launches Terminator is failing to import gtk and pango. Attempting to import these in the python interpreter yields the following:

>>> import pango
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/pango.so, 2): Library not loaded: /opt/local/lib/libgobject-2.0.0.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/pango.so
  Reason: Incompatible library version: pango.so requires version 3001.0.0 or later, but libgobject-2.0.0.dylib provides version 2801.0.0
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
    from gtk import _gtk
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.so, 2): Library not loaded: /opt/local/lib/libatk-1.0.0.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
  Reason: Incompatible library version: _gtk.so requires version 20210.0.0 or later, but libatk-1.0.0.dylib provides version 3210.0.0

Installing pango-devel through macports seemed to fix the import pango call (although this has some pretty hefty dependencies - not sure precisely which package was responsible for the actual fix). Installing atk and gdk-pixbuf2 fixed the call to import gtk. I suggest these 3 packages are added to the dependencies of terminator.

comment:4 Changed 7 years ago by jmroot (Joshua Root)

Is this still a problem with the current version?

comment:5 in reply to:  3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: reopenedclosed

This is a very old ticket and you've probably moved on from this by now, but for anyone reading, I wanted to try to analyze what happened.

I don't think there's anything for us to fix here. I can't reproduce this problem with terminator 1.0 now.

Replying to agwblack@…:

>>> import pango
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/pango.so, 2): Library not loaded: /opt/local/lib/libgobject-2.0.0.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/pango.so
  Reason: Incompatible library version: pango.so requires version 3001.0.0 or later, but libgobject-2.0.0.dylib provides version 2801.0.0

This seems to indicate that at the time you installed py27-pygtk, you had a glib2 or glib2-devel that provided library version 3001.0.0 of libgobject-2.0.0.dylib, but then you later downgraded to libgobject-2.0.0.dylib 2801.0.0. MacPorts doesn't support downgrading libraries and it shouldn't happen in the normal course of using MacPorts. Maybe this happened because you switched from glib2-devel to an earlier version of glib2, or maybe it happened because a third-party installer overwrote your MacPorts glib2 or glib2-devel files with an earlier version. Hard to know at this point.

>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
    from gtk import _gtk
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.so, 2): Library not loaded: /opt/local/lib/libatk-1.0.0.dylib
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
  Reason: Incompatible library version: _gtk.so requires version 20210.0.0 or later, but libatk-1.0.0.dylib provides version 3210.0.0

Same story, except here with atk. We've never had an atk-devel port, so that tells me it's the other scenario, where a third-party installer overwrote your MacPorts files. The solution in that case is to deactivate forcibly any affected ports (i.e. sudo port -f deactivate atk) and then activate them again (sudo port activate atk—if you have multiple versions installed you may need to specify which one, and you probably want the latest one). This will unpack the correct files from the archive again. If you don't know the full set of ports that were affected, uninstalling all ports and reinstalling them can be an effective solution. In the future, this problem can be avoided by not running installers that overwrite MacPorts files. The Apple Installer has a Show Files menu option which shows you what files will be installed where. I recommend using this before running unfamiliar installers, though it doesn't always tell you the parent directory that the files will go into. Sometimes the installer's readme or introductory message will tell you. If you ever encounter an installer that you can prove overwrote MacPorts files, please report that problem to whoever made the installer so they can issue a corrected installer that installs its files into a different place.

Note: See TracTickets for help on using tickets.