Opened 17 years ago

Closed 16 years ago

Last modified 8 years ago

#12966 closed defect (fixed)

BUG: avahi cannot find Python module gtk

Reported by: vinc17@… Owned by: rhwood@…
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc: amgine@…, vinc17@…, rhwood@…
Port:

Description

"sudo port -v install avahi" fails with:

[...]
checking for LIBDAEMON... yes
checking whether /opt/local/bin/python2.5 version >= 2.4... yes
checking for /opt/local/bin/python2.5 version... 2.5
checking for /opt/local/bin/python2.5 platform... darwin
checking for /opt/local/bin/python2.5 script directory... ${prefix}/lib/python2.5/site-packages
checking for /opt/local/bin/python2.5 extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking for python module gtk... no
configure: error: Could not find Python module gtk

All the python-related dependencies are installed and active:

$ port installed | grep py
  dbus-python25 @0.82.2_0 (active)
  py-bsddb @2.4.3_1
  py-bsddb @2.4.4_0 (active)
  py-libxml2 @2.6.23_0 (active)
  py-numeric @24.2_0+darwin_8+macosx (active)
  py-xml @0.8.4_0 (active)
  py25-bsddb @2.5.1_0 (active)
  py25-cairo @1.4.0_1 (active)
  py25-gdbm @2.5.1_0 (active)
  py25-gobject @2.12.3_0
  py25-gobject @2.14.0_0 (active)
  py25-gtk @2.12.0_0 (active)
  py25-hashlib @2.5.1_0 (active)
  py25-libxml2 @2.6.21_0
  py25-libxml2 @2.6.21_1 (active)
  py25-numeric @24.2_0+macosx
  py25-numeric @24.2_1+macosx (active)
  py25-wxpython @2.8.6.0_0 (active)
  py25-zlib @2.5.1_0 (active)
  python24 @2.4.3_1+darwin_8
  python24 @2.4.4_1+darwin_8 (active)
  python25 @2.5.1_1+darwin_8
  python25 @2.5.1_2+darwin_8 (active)

Attachments (2)

avahi.install.log.zip (32.7 KB) - added by amgine@… 16 years ago.
log as per instructions (compressed due to sized constraints)
avahi.install.log.2.zip (33.3 KB) - added by frstan@… 16 years ago.
avahi install debug output

Download all attachments as: .zip

Change History (21)

comment:1 Changed 17 years ago by afb@…

Try port contents py25-gtk, and see what that says (i.e. which version of Python it used).

If you it says "2.3", you need to install "python_select" port, run python_select python25

comment:2 Changed 17 years ago by vinc17@…

This gives files in /opt/local/lib/python2.5/site-packages/gtk-2.0 (no files with 2.3 in their component names).

comment:3 Changed 16 years ago by amgine@…

I'm experiencing the same error on Leopard after installing and running "python_select python25":

checking whether /opt/local/bin/python2.5 version >= 2.4... yes
checking for /opt/local/bin/python2.5 version... 2.5
checking for /opt/local/bin/python2.5 platform... darwin
checking for /opt/local/bin/python2.5 script directory... ${prefix}/lib/python2.5/site-packages
checking for /opt/local/bin/python2.5 extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking for python module gtk... no
configure: error: Could not find Python module gtk

What is the specific Python module gtk?

comment:4 Changed 16 years ago by rhwood@…

Cc: amgine@… added; vinc17@… removed
Status: newassigned

I am perpetually incapable of reproducing (or even producing) this error.

Can someone with the failure do the following: 1) sudo port clean --all avahi 2) sudo port -f uninstall py25-gtk 3) sudo port clean --all py25-gtk 4) sudo port -dv install avahi > ~/avahi.install.log 2>&1 5) attach the file avahi.install.log from your home directory to this ticket

comment:5 Changed 16 years ago by vinc17@…

With this, I no longer have the gtk problem. But see bug #13225.

Changed 16 years ago by amgine@…

Attachment: avahi.install.log.zip added

log as per instructions (compressed due to sized constraints)

comment:6 Changed 16 years ago by amgine@…

Attaching log file:

amgines-macbook:~ amgine$ sudo port -dv install avahi > ~/avahi.install.log 2>&1
amgines-macbook:~ amgine$ port installed avahi
None of the specified ports are installed.
amgines-macbook:~ amgine$ 

Changed 16 years ago by frstan@…

Attachment: avahi.install.log.2.zip added

avahi install debug output

comment:7 Changed 16 years ago by frstan@…

note that I still have the bug - Leopard/Intel

comment:8 Changed 16 years ago by mls@…

The problem is the Avahi configure script is failing on the pygtk test because that pygtk module fails to import in Python.

I don't know a solution however.


bash-3.2# /opt/local/bin/python2.5
Python 2.5.1 (r251:54863, Nov  8 2007, 16:01:30) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-gtk/work/destroot/opt/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 38, in <module>
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-gobject/work/destroot/opt/local/lib/python2.5/site-packages/gtk-2.0/gobject/__init__.py", line 30, in <module>
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-gobject/work/destroot/opt/local/lib/python2.5/site-packages/gtk-2.0/gobject/constants.py", line 22, in <module>
ImportError: dlopen(/opt/local/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so, 2): Symbol not found: _PyGBoxed_Type
  Referenced from: /opt/local/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so
  Expected in: flat namespace

>>> 

comment:9 Changed 16 years ago by brett@…

Confirming problem here. Same error when trying to import gtk in Python. Running Intel/Leopard. This broken port is stopping lots of other ports from installing as well. However this bug is probably not so much an Avahi bug as a py25-gtk one, I'd presume.

comment:10 Changed 16 years ago by conehead@…

See bug #13337.

comment:11 Changed 16 years ago by afb@…

Resolution: fixed
Status: assignedclosed

Fixed, r32470.

comment:12 Changed 16 years ago by amgine@…

afb:

checking for python module gtk... no configure: error: Could not find Python module gtk

The problem still exists, though it may not be sourced in the avahi port.

comment:13 Changed 16 years ago by afb@…

avahi should now configure, after installing:

  • py25-gobject @2.14.0_1+darwin_9
  • py25-gtk @2.12.0_1+darwin_9
  • dbus-python25 @0.82.2_1+darwin_9

(those all have the symbol export workaround)

comment:14 in reply to:  13 Changed 16 years ago by munsell@…

Resolution: fixed
Status: closedreopened

I'm still experiencing this problem with leopard and macports v.1.6.

I've installed and ran the python_select port (I'm assuming this is symbol export workround) and tried several times uninstalling and installing these packages - and every time avahi fails with the same error (cannot find python module gtk).

This is probably something simple I'm just overlooking ...

Replying to afb@macports.org:

avahi should now configure, after installing:

  • py25-gobject @2.14.0_1+darwin_9
  • py25-gtk @2.12.0_1+darwin_9
  • dbus-python25 @0.82.2_1+darwin_9

(those all have the symbol export workaround)

comment:15 Changed 16 years ago by rhwood@…

I am incapable of reproducing this issue. Can anyone still reproduce it, or is it OBE (overcome by events)?

comment:16 Changed 16 years ago by amgine@…

<shrug> I've given up on using macports with Leopard. Can't help.

comment:17 Changed 16 years ago by rhwood@…

Resolution: fixed
Status: reopenedclosed

Closing with comments from Guido Soronzio via email:

This problem has been solved some months ago and it is due to the new Apple's libtool in Leopard.

I applied a simple workaround to many python ports whose makefiles make use of the flag "-export-symbol-regex" by simply removing it and so making the missing symbols public again.

This rough trick works also with apache2 and the missing symbol "_ssl_cmd_SSLCACertificateFile" (#13182) but it has not been committed.

pogma is reporting on his blog that using the new libtool 1.5.26 instread of the Apple's one can alleviate such troubles: http://pogma.com/2008/02/13/nmedit-libtool-exported-symbols/.

comment:18 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:19 Changed 8 years ago by kenneth.f.cunningham@…

Cc: amgine@… vinc17@… rhwood@… added; amgine@… removed

Sorry to resurrect old, old bug, but I just ran into this installing avahi @0.6.31_13 on snow leopard with libc++. For those who may search here for information with the same issue, the problem in my case was cairo, which was installed without the +x11 variant.

cairo @1.14.6_0+quartz-x11 (active) platform='darwin 10' archs='x86_64'
Python 2.7.12 (default, Jul  5 2016, 21:21:28) 
[GCC 4.2.1 Compatible Clang 3.7.1 (tags/RELEASE_371/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 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
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/__init__.py", line 1, in <module>
    from _cairo import *
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so, 2): Symbol not found: _cairo_xlib_surface_get_depth
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so
  Expected in: /opt/local/lib/libcairo.2.dylib
 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cairo/_cairo.so

upgrading cairo to include the x11 variant

cairo @1.14.6_0+quartz+x11 platform='darwin 10' archs='x86_64'

solved the issue, python 2.7 then found the py-gtk module successfully, and the installation of avahi went along smoothly.

Note: See TracTickets for help on using tickets.