Trying to emerge avahi-0.6.25 fails in configure due to not finding "Python module gtk". Error: configure:26455: checking for a Python interpreter with version >= 2.4 configure:26470: python -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('2.4', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex) configure:26473: $? = 0 configure:26480: result: python configure:26488: checking for python configure:26506: found /usr/bin/python configure:26518: result: /usr/bin/python configure:26538: checking for python version configure:26545: result: 2.6 configure:26557: checking for python platform configure:26564: result: linux2 configure:26571: checking for python script directory configure:26579: result: ${prefix}/lib/python2.6/site-packages configure:26588: checking for python extension module directory configure:26596: result: ${exec_prefix}/lib/python2.6/site-packages configure:26627: checking for python module gtk configure:26656: result: no configure:26658: error: Could not find Python module gtk Reproducible: Always Steps to Reproduce: 1. emerge avahi with "gtk" USE flag Actual Results: Emerge fails during configuration process. Expected Results: Should emerge properly. The version of pygtk which is installed is pygtk-2.14.1. python-updater has been run.
Created attachment 191223 [details] config.log file for failed emerge of avahi-0.6.25 Bug report documents the problematic lines of the configure file. I have a very poor understanding of python and thus cannot determine the exact problem.
Seeing your bug 269779, you're well on your way to break your system. But perhaps, in spite of your effort, it can still be saved. When you start python, what's the result of: import gtk (a hint - there should be no output, any raised exception is a bug) ?
Here are the results from "import gtk": # python Python 2.6.2 (r262:71600, May 10 2009, 11:10:28) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 38, in <module> import gobject as _gobject ImportError: No module named gobject As previously stated I don't do python. But if "gobject" is part of the standard "glib" data types then it sounds like this may be another instance of "emerge pygtk" updating the proper python2.6 subdirectory but putting the symbolic links into the python2.5 main directory.
One solution to this problem was to change the USE flags to -gtk -bookmarks which will allow avahi to build. The second (and real) solution is to make sure that pygtk is installed properly with the current version of python. After upgrading to python2.6 and running python-updater *AND* emerging pygtk I was still having problems. Emerging pygtk updates the top level gtk files in /usr/lib/python2.5 for some reason. Correcting this problem by creating the files in /usr/lib/python2.6 corrects the problem with the avahi configure.
(In reply to comment #4) > Correcting this problem by creating the files in /usr/lib/python2.6 corrects > the problem with the avahi configure. > So, in order to fix it, you've broke it even more. You've never found out what was the reason of your problem. That exception meant simply that pygobject was not correctly emerged. And as for your claim from bug 269779 comment 5, there's nothing to fix. More exactly, this is the way that macro works - to "fix" it, you'd have to rerun autoconf for the package and that's not really needed, as if you have a /usr/bin/python symlink, it's found anyway. site-packages dir is found by python anyway, by 'from distutils import sysconfig;print sysconfig.get_python_lib(0,0)'.