Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35248 - There are some problems with pygtk, bonobo-python, gnome-python and net-www/straw
Summary: There are some problems with pygtk, bonobo-python, gnome-python and net-www/s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-07 04:22 UTC by Valentino Volonghi
Modified: 2003-12-09 15:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentino Volonghi 2003-12-07 04:22:25 UTC
When I try to use straw (rss reader written in pygtk) I get "ImportError: could
not import bonobo.ui", then when I try to merge bonobo-python I get this:

checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared
libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for python... /usr/bin/python
checking if Python version >= 1.5... okay
checking local Python configuration... looks good
checking for headers required to compile python extensions... found
checking for python... (cached) /usr/bin/python
checking for GtkObject in python module gtk... no
configure: error: Can't find pygtk

!!! ERROR: dev-python/bonobo-python-0.2.0-r3 failed.
!!! Function econf, Line 338, Exitcode 1
!!! econf failed

Then I try to install pygtk and it does with no problems, then I also install
gnome-python and it goes well with no problem. I then tried to import the same
thing that straw does and here's the output:

In [1]: import gnome.ui
Fatal Python error: could not import _gtk

But I can do a "import gtk" without problems and it says that _gtk is non-existant.

I'm using the latest python-2.3.2 in portage and straw always ran well till today.

Reproducible: Always
Steps to Reproduce:
1. emerge bonobo-python
2.
3.

Actual Results:  
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared
libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for python... /usr/bin/python
checking if Python version >= 1.5... okay
checking local Python configuration... looks good
checking for headers required to compile python extensions... found
checking for python... (cached) /usr/bin/python
checking for GtkObject in python module gtk... no
configure: error: Can't find pygtk

!!! ERROR: dev-python/bonobo-python-0.2.0-r3 failed.
!!! Function econf, Line 338, Exitcode 1
!!! econf failed

Expected Results:  
straw should run after I installed bonobo-python

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test9-mm5)
=================================================================
System uname: 2.6.0-test9-mm5 i686 mobile AMD Athlon(tm) XP 1600+ 
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1
/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http:
//212.219.247.21/sites/www.ibiblio.org/gentoo/ ftp://sunsite.cnlab-switch.ch/mir
ror/gentoo/"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi acpi4linux alsa apm arts avi berkdb bluetooth bonobo cdr
 crypt cups directfb dnd dv dvd dvdr emacs encode esd expat faad fbcon fbdev ffm
peg flac foomaticdb gdbm gif gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 gtkhtm
l imlib java joystick jpeg lcd leim libg++ libgda libwww mad matroska mbox mikmo
d mmx motif mpeg mule music ncurses nls nptl oggvorbis openssh oss pam pdflib pe
rl pic plotutils png pnp postgres ppds python qt quicktime readline samba sdl sl
ang spell sse ssl svga tcltk tcpd tiff transcode truetype usb v4l videos wxwin w
xwindows x86 xfs xine xinerama xml2 xmms xosd xv xvid zlib"
Comment 1 Stephane Loeuillet 2003-12-07 04:37:44 UTC
did you install python-2.3.2-r2 recently ? (emerge -s "^python$")

at the end of its merge, it warns you to launch a script that would recompile a bunch of packages using python against the new 2.3

portage still uses 2.2, so do not uninstall 2.2

launch the following script now to recompile those : (straw is in the list)

/usr/portage/dev-lang/python/files/python-updater


please report if it fixed the problem

++
Comment 2 Valentino Volonghi 2003-12-07 14:05:39 UTC
No, I installed python a lot of time ago and I ran python-updater.

straw worked correctly for a good month before this problem...
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2003-12-07 16:58:18 UTC
what does "etcat files pygtk" say? are they installed in /usr/lib/python2.3/site-packages? 

Comment 4 Valentino Volonghi 2003-12-07 18:46:50 UTC
Yes, they are all installed in the right path.

/usr/lib/python2.3/site-packages/
Comment 5 Valentino Volonghi 2003-12-07 18:52:50 UTC
And in case you were asking I did env-update and ldconfig without any success...
It seems that or straw is not using the libraries in the right way or the libraries have some conflicts between them...

I think that I always ran straw without bonobo-python installed but since that time it required me to install it, Ihad allthese problems. I did not have written this before since I didn't noticed it, but now that I'm thinking... this should help a bit, i hope.
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2003-12-08 02:32:03 UTC
you have two different problems here. bonobo-python isn't needed by straw at all, and that is failing for you. bonobo-python needs pygtk-0.6* rather than pygtk2.

the bonobo.ui is part of gnome-python. usually this means there is some seperate error has occured when you import gtk. can you give me the full output of:

python -c "import gtk"
Comment 7 Valentino Volonghi 2003-12-08 13:39:20 UTC
I already said that importing gtk does give me no errors at all, so there is absolutely no output.

Anyway here is the "full" output of the verbose mode:
python -v -c "import gtk"

Python 2.3.2 (#1, Dec  5 2003, 22:32:37) 
[GCC 3.3.2 20031022 (Gentoo Linux 3.3.2-r3, propolice)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import gtk # directory /usr/lib/python2.3/site-packages/gtk-2.0/gtk
# /usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.pyc matches /usr/lib/pyt
hon2.3/site-packages/gtk-2.0/gtk/__init__.py
import gtk # precompiled from /usr/lib/python2.3/site-packages/gtk-2.0/gtk/__ini
t__.pyc
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/gobject.so", 2);
import gobject # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2.
0/gobject.so
# /usr/lib/python2.3/site-packages/gtk-2.0/gtk/keysyms.pyc matches /usr/lib/pyth
on2.3/site-packages/gtk-2.0/gtk/keysyms.py
import gtk.keysyms # precompiled from /usr/lib/python2.3/site-packages/gtk-2.0/g
tk/keysyms.pyc
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/gtk/_gtk.so", 2);
# /usr/lib/python2.3/encodings/utf_8.pyc matches /usr/lib/python2.3/encodings/ut
f_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.3/encodings/utf_8.pyc
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/pango.so", 2);
import pango # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2.0/
pango.so
dlopen("/usr/lib/python2.3/site-packages/gtk-2.0/atk.so", 2);
import atk # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2.0/at
k.so
dlopen("/usr/lib/python2.3/site-packages/Numeric/_numpy.so", 2);
import _numpy # dynamically loaded from /usr/lib/python2.3/site-packages/Numeric
/_numpy.so
import gtk._gtk # dynamically loaded from /usr/lib/python2.3/site-packages/gtk-2
.0/gtk/_gtk.so
Comment 8 Valentino Volonghi 2003-12-08 14:18:39 UTC
Ok, now I got it to work again. I think that all the *.pyc were the responsible for this mess...

I unmerged everything, removed all the remaining .pyc and then reemerged everything and now it works again.

Thx for all your help guys. You've been very helpful :)
Comment 9 Alastair Tse (RETIRED) gentoo-dev 2003-12-09 15:43:23 UTC
actually, it wasn't your fault. there was a problem with bonobo-python because it was errorneously detecting the pygtk-2 modules rather than the pygtk-0.6 ones.

i've fixed that, however, ive found that nothing in portage depends on bonobo-python anymore.