pygtk-2.4.1 does not create the neccessary .pth or .py files and it's simlinks. This leads to ImportErrors when trying to run python scripts against this. $ emerge pygtk [ snip ] make[2]: Leaving directory `/home/portage/tmp/portage/pygtk-2.4.1/work/pygtk-2.4.1/tests' make[1]: Leaving directory `/home/portage/tmp/portage/pygtk-2.4.1/work/pygtk-2.4.1/tests' mv: cannot stat `/home/portage/tmp/portage/pygtk-2.4.1/image//usr/lib/python2.3/site-packages/pygtk.py': No such file or directory mv: cannot stat `/home/portage/tmp/portage/pygtk-2.4.1/image//usr/lib/python2.3/site-packages/pygtk.pth': No such file or directory [ snip ] * Cleaning orphaned Python bytecode from /usr/share/pygtk/2.0/codegen .. * Cleaning orphaned Python bytecode from /usr/lib/python2.2/site-packages .. * Cleaning orphaned Python bytecode from /usr/lib/python2.3/site-packages .. * Unable to establish /usr/lib/python2.3/site-packages/pygtk.py symlink * Unable to establish /usr/lib/python2.3/site-packages/pygtk.pth symlink >>> original instance of package unmerged safely. * Byte compiling python modules for python-2.3 .. ... [ ok ] * Unable to establish /usr/lib/python2.3/site-packages/pygtk.py symlink * Unable to establish /usr/lib/python2.3/site-packages/pygtk.pth symlink * Unable to find /usr/lib/python2.3/site-packages/pygtk.py >>> Regenerating /etc/ld.so.cache... * Caching service dependencies ... [ ok ]>>> dev-python/pygtk-2.4.1 merged. # ls /usr/lib/python2.3/site-packages/pygtk* ls: /usr/lib/python2.3/site-packages/pygtk*: No such file or directory. Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.51-r8 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r1 x86_64) ================================================================= System uname: 2.6.10-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Sep 13 2004, 13:06:22)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O2 -pipe -fweb -ftracer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O2 -pipe -fweb -ftracer" DISTDIR="/mnt/nfs/home/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mir.zyrianes.net/gentoo/" LDFLAGS="" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/portage/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 S3TC X aalib acpi alsa avi berkdb bitmap-fonts cdr crypt cups curl dga dvd dvdr eds encode escreen etwin evo f77 faad fam fbcon flac flash fortran gd gdbm gif gimpprint gnome gphoto2 gpm gtk gtk2 gtkhtml hal imagemagick imap imlib ipv6 java javascript jp2 jpeg ldap libwww lzw lzw-tiff mad maildir mikmod motif mozaccess-builtin mozilla mozirc mozxmlterm multilib mysql ncurses nls nptl nvidia offensive oggvorbis opengl oss pam perl plotutils png python readline samba sdl slang speex ssl tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb userlocales xface xinerama xml xml2 xmms xpm xrandr xv xvid zlib"
weird portageroot. what filesys is it on ?
reiserfs (v3). I just have _TMPDIR there since there is more space than under /usr.
Same problem 'ebuild pygtk-2.4.1.ebuild compile' does create pygtk.py and pygtk.pth but 'install' does not put them in the '/usr/lib64/python2.3/site-packages' directory. If you copy them manually then pygtk works OK. I guess it must be a fault in the 'ebuild' when running 'amd64' I am running AMD64 on ASUS K8V SE Deluxe motherboard with 'nomultilib' use flag.
On closer inspection it seems that this is caused by the ebuild doing operations on ${D}/usr/lib/python${PYVER}/site-packages/pygtk* when on a 64bit system this file has been installed to ${D}/usr/lib64 (lines 47-50).
solution ?
Created attachment 48054 [details, diff] patch to fix installation of .pth files on 64bit systems Sorry I didn't have time to submit this on friday. Not sure if this is the most elegant solution but I hope you find it acceptable.
Patch works fine.
I don't understand this. I have the same problem on an x86: * Unable to establish /usr/lib/python2.3/site-packages/pygtk.py symlink * Unable to establish /usr/lib/python2.3/site-packages/pygtk.pth symlink The patch does not solve it. Perhaps this is a seperate issue?
marduk: if you scroll further up in the ebuild output, do you see any errors due to the mv lines?
i'm not familiar with the amd64 situation, is python installed in /usr/lib64 ? then i guess all the python eclasses need to use /usr/$(get_libdir) or similar .. can amd64 folks confirm this? i'm suprised that we've survived so long without knowing this.
Yes, python is installed in /usr/$(get_libdir)
On amd64 /usr/lib is a symlink to /usr/lib64 which is why this is not usually a problem. This issue only occurs due to operations on the fake root (which does not contain this symlink) prior to install.
as herbie said, /usr/lib is still (this will change sometimes) a symlink to /usr/lib64, but even when /usr/lib is an own directory, python libs should go there.
Looks like eradicator has tried to fix this at some point by replacing lib by $(get_libdir) (from line 51). This still fails for me right now as the shared libs seem to be installed in ${D}/usr/lib where they should get installed to ${D}/usr/$(get_libdir). Not sure why econf is putting them there...
It appears that although econf sets libdir correctly python extension module directory is set to ${exec_prefix}/lib/python2.3/site-packages and so the mv commands on ${D}/usr/$(get_libdir)/python2.3/site-packages fail.
there were some omissions in the ebuild regarding get_libdir esp in postinst and postrm functions. please try it out now.
still fails.. The problem is in src_install: (cut from output of emerge pygtk) mv: cannot stat `/var/tmp/portage/pygtk-2.4.1/image//usr/lib64/python2.3/site-packages/pygtk.py': No such file or directory mv: cannot stat `/var/tmp/portage/pygtk-2.4.1/image//usr/lib64/python2.3/site-packages/pygtk.pth': No such file or directory They exist in ${D}/usr/lib and not in ${D}/usr/lib64 where they are expected. The alternatives_auto_makesym calls in pkg_postinst then goes on to delete them later as these files are expected to be symlinks. The question is wheather python site-packages should get installed in lib or lib64 on amd64? If it's the former then the Makefile is correct and we just need to replace $(get_libdir) with lib in lines 51-54. If it's the latter then the the Makefile needs to get patched to install them to lib64 on amd64.
What's most annoying is that when I first submitted this bug report the files were getting installed into ${D}/usr/lib64 and the ebuild was expecting them to be in ${ D}/usr/lib and now the situation has reversed itself, ebuild got updated to use get_libdir but the files are now getting installed in ${D}/usr/lib - wtf?
The same here.(amd64, pygtk-2.6.0) There are some error messages during the compilation: Could not write method AtkObject.connect_property_change_handler: No ArgType for 'AtkPropertyChangeHandler*' Could not write method AtkObject.notify_state_change: No ArgType for 'AtkState' Warning: generating old-style constructor for atk_no_op_object_new Could not write method AtkRelation.get_target: No ArgType for 'GPtrArray*' Could not write method AtkStateSet.add_states: No ArgType for 'AtkStateType*' Could not write method AtkStateSet.contains_states: No ArgType for 'AtkStateType*' Could not write function add_focus_tracker: No ArgType for 'AtkEventListener' Could not write function focus_tracker_init: No ArgType for 'AtkEventListenerInit' Could not write function add_global_event_listener: No ArgType for 'GSignalEmissionHook' Could not write function add_key_event_listener: No ArgType for 'AtkKeySnoopFunc' and Could not write getter for PangoGlyphString.glyphs: No ArgType for 'PangoGlyphInfo*' Could not write getter for PangoGlyphString.log_clusters: No ArgType for 'gint*'Could not write method PangoLayoutIter.get_run: No ArgType for 'PangoLayoutRun*'Could not write method PangoLayoutIter.get_line: No ArgType for 'PangoLayoutLine*' Warning: generating old-style constructor for pango_fontset_simple_new Warning: generating old-style constructor for pango_layout_new Could not write method PangoLayout.get_line: No ArgType for 'PangoLayoutLine*' Could not write method PangoLayout.get_lines: No ArgType for 'GSList*' Could not write function find_paragraph_boundary: No ArgType for 'gint*' Could not write function get_log_attrs: No ArgType for 'PangoLogAttr*' Could not write function itemize: No ArgType for 'PangoAttrIterator*' Could not write function reorder_items: No ArgType for 'GList*' and Could not write method GtkAccelGroup.activate: No ArgType for 'GQuark' Could not write method GtkAccelGroup.find: No ArgType for 'GtkAccelKey*' Could not write method GtkAccelGroup.query: No ArgType for 'guint*' Could not write virtual accessor method GtkAccelGroup.accel_changed: No ArgType for 'GClosure*' Could not write virtual proxy GtkAccelGroup.accel_changed: No ArgType for 'GClosure*' Could not write method GtkAccelLabel.set_accel_closure: No ArgType for 'GClosure*' Could not write method GtkActionGroup.set_translate_func: No ArgType for 'GtkTranslateFunc' Could not write virtual accessor method GtkCellRenderer.get_size: No ArgType for 'gint*' Warning: generating old-style constructor for gtk_clipboard_get_for_display Could not write virtual accessor method GtkContainer.forall: No ArgType for 'GtkCallback' Could not write virtual accessor method GtkContainer.set_child_property: No ArgType for 'const-GValue*' Could not write virtual accessor method GtkContainer.get_child_property: No ArgType for 'GValue*' Could not write virtual proxy GtkContainer.forall: No ArgType for 'GtkCallback' Could not write virtual proxy GtkContainer.child_type: No ArgType for 'GType' Could not write virtual proxy GtkContainer.set_child_property: No ArgType for 'const-GValue*' Could not write virtual proxy GtkContainer.get_child_property: No ArgType for 'GValue*' Could not write method GtkCTree.set_drag_compare_func: No ArgType for 'GtkCTreeCompareDragFunc' Could not write method GtkDialog.set_alternative_button_order: varargs functions not supported Could not write method GtkDialog.set_alternative_button_order_from_array: No ArgType for 'gint*' Could not write virtual proxy GtkFrame.compute_child_allocation: No ArgType for 'GtkAllocation*' Could not write virtual accessor method GtkIMContext.get_preedit_string: No ArgType for 'gchar**' Could not write virtual accessor method GtkIMContext.get_surrounding: No ArgType for 'gchar**' Could not write virtual proxy GtkIMContext.get_preedit_string: No ArgType for 'gchar**' Could not write virtual proxy GtkIMContext.get_surrounding: No ArgType for 'gchar**' Could not write method GtkIMContextSimple.add_table: No ArgType for 'guint16*' Warning: generating old-style constructor for gtk_item_factory_new Could not write method GtkListStore.insert_with_values: varargs functions not supported Could not write method GtkListStore.insert_with_valuesv: No ArgType for 'gint*' Could not write virtual accessor method GtkMenuItem.toggle_size_request: No ArgType for 'gint*' Could not write virtual proxy GtkMenuItem.toggle_size_request: No ArgType for 'gint*' Could not write virtual accessor method GtkNotebook.switch_page: No ArgType for 'GtkNotebookPage*' Could not write virtual proxy GtkNotebook.switch_page: No ArgType for 'GtkNotebookPage*' Could not write virtual accessor method GtkObject.set_arg: No ArgType for 'GtkArg*' Could not write virtual accessor method GtkObject.get_arg: No ArgType for 'GtkArg*' Could not write virtual proxy GtkObject.set_arg: No ArgType for 'GtkArg*' Could not write virtual proxy GtkObject.get_arg: No ArgType for 'GtkArg*' Warning: generating old-style constructor for gtk_preview_new Could not write virtual accessor method GtkRcStyle.parse: No ArgType for 'GScanner*' Could not write virtual proxy GtkRcStyle.parse: No ArgType for 'GScanner*' Could not write virtual accessor method GtkScale.get_layout_offsets: No ArgType for 'gint*' Could not write virtual proxy GtkScale.get_layout_offsets: No ArgType for 'gint*' Could not write method GtkSettings.set_property_value: No ArgType for 'const-GtkSettingsValue*' Could not write virtual accessor method GtkSpinButton.input: No ArgType for 'gdouble*' Could not write virtual proxy GtkSpinButton.input: No ArgType for 'gdouble*' Could not write virtual accessor method GtkStyle.draw_polygon: No ArgType for 'GdkPoint*' Could not write virtual proxy GtkStyle.draw_polygon: No ArgType for 'GdkPoint*' Could not write virtual accessor method GtkTextTag.event: No ArgType for '/*' Could not write virtual proxy GtkTextTag.event: No ArgType for '/*' Could not write method GtkTextView.get_iter_at_position: No ArgType for 'gint*' Could not write method GtkTreeSelection.get_user_data: No ArgType for 'gpointer' (and some more line similar to the previous)
Let's see.... I'm not too happy that this screws up my gdesklets :-) But seriously, please test prior to commiting a change DEVs!
Created attachment 53184 [details, diff] python-2.3.5.ebuild multilib fixes finally got to the bottom of this. It seems that there are some multilib issues in the python-2.3.5.ebuild. It relies on CONF_LIBDIR being set but it's not. As a result the lib64 patch does not get applied. This patch fixes this by relying on get_libdir instead.
Created attachment 53185 [details, diff] python-2.3.5.ebuild multilib fixes Just found a few other lines where /usr/lib was defined explicitly. This new patch fixes those to use get_libdir too.
It works for me. (I apllied the patch, re-emerged python and pygtk).
i didn't realised that python 2.3.5 wasn't completely multilib-ified. committed the changes proposed and also cleaned up some more /usr/lib's in pygtk. please test if it works on amd64. (i can't test it since i don't actually have a multilib machine :P)
Tested this and all seems to work well here ;-) Marking fixed.
Please reopen. It's jacked again with 2.6.1!
Brendon, works fine here. The problem was in the python ebuild so make sure you re-emerge python and pygtk: # emerge sync # emerge --oneshot python pygtk
*** Bug 86557 has been marked as a duplicate of this bug. ***
Hi! I have the problem with dev-python/pygtk-2.6.1, e.g. calling 'meld' gives: gour@gaura-nitai ~ $ meld Traceback (most recent call last): File "/usr/bin/meld", line 69, in ? import gtk ImportError: No module named gtk The similar situation is with pybliographer which used to work on amd64, but it's again broken (see: #71529). So, pls. re-open this bug. I tried with re-emerging gtk+, python & pygtk, but no avail. Sincerely, Gour
Gour, give us the versions of python and pygtk you're using please. There are a few people in the forums reporting this same problem with python 2.3.5. I've mailed jhuebel about getting access to nemo (amd64 gentoo box) to try and fix this and verify 2.4 is multilib ready before unmasking it.
Hi! <quote>Gour, give us the versions of python and pygtk you're using please.</quote> Python 2.3.5 (#1, Apr 5 2005, 15:41:25) [GCC 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110-r1, ssp-3.4.3.20050110-0, pie- on linux2 dev-python/pygtk-2.6.1 Sincerely, Gour
*** Bug 88015 has been marked as a duplicate of this bug. ***
I think there are multiple bugs at work here. 1. the amd64 thing 2. Something different, that leads to what eg Gour reported (which ahppens to me too on i386). I have my cent to add for 2. Something is really weird (at least to me who is not fluent in the workings of shell/python). I get the same error as Gour for meld. If I copy and rename meld to meld.py, the error is gone and it works!
I reported the same bug as "Bug 88015" which was marked as duplicate of this bug. I too use i386 and have the meld (and denu) problem, so my problem is not a 64 bit problem
Python 2.3.5 (#1, May 2 2005, 02:01:43) pygtk-2.6.1 I too use i386 and have the denu problem also.
*** Bug 89519 has been marked as a duplicate of this bug. ***
*** Bug 89096 has been marked as a duplicate of this bug. ***
The origional probem I reported here is long since fixed. Is there anybody still having problems? this bug is very old and I'd like to close it.
No response from anybody, assuming fixed.
I get this again with python 2.6: >>> Installing (1 of 1) dev-python/pygtk-2.14.1-r1 * Cleaning orphaned Python bytecode from /usr/lib64/python2.5/site-packages/gtk-2.0 .. * Cleaning orphaned Python bytecode from /usr/lib64/python2.6/site-packages/gtk-2.0 .. * Unable to establish /usr/lib64/python2.6/site-packages/pygtk.py symlink * Unable to establish /usr/lib64/python2.6/site-packages/pygtk.pth symlink * Byte compiling python modules for python-2.6 .. ... [ ok ] * Messages for package dev-python/pygtk-2.14.1-r1: * Unable to establish /usr/lib64/python2.6/site-packages/pygtk.py symlink * Unable to establish /usr/lib64/python2.6/site-packages/pygtk.pth symlink I'm also on amd64, by my python is 2.6.2 and pygtk is 2.14.1-r1
I also have this problem on both an AMD64 box and two IA32 (i686) boxes. This is using Python 2.6.2-r1 and PyGtk 2.14.1-r1. None of these machines is using a multlib toolchain. I have to use a root console and create the sylinks by hand, each time PyGtk is emerged.