Calibre won't finish build Takes forever during install phase "Setting up desktop integration..." Reproducible: Always Steps to Reproduce: emerge calibre Actual Results: Install progress stops (not crash or exit !) at "Setting up desktop integration..." cpc ~ # emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo-r1-cpc i686) ================================================================= System uname: Linux-2.6.31-gentoo-r1-cpc-i686-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.0.1 Timestamp of tree: Wed, 30 Sep 2009 08:30:01 +0000 app-shells/bash: 4.0_p33 dev-java/java-config: 2.1.9-r1 dev-lang/python: 2.6.2-r2 dev-util/cmake: 2.6.4-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.1 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer -fno-ident -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer -fno-ident -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="de_DE" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,--as-needed" LINGUAS="de" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip X a52 aac acl acpi alsa berkdb bluetooth boost bzip2 cairo cleartype cli consolekit cracklib crypt cups curl dbus djvu dri exif expat fam ffmpeg fftw flac fontconfig gcj gif glib gnutls hal hunspell iconv imagemagick inotify isdnlog java6 jpeg jpeg2k kde kdehiddenvisibility lame lcms libffi lm_sensors lua lzma lzo mad minimal mmap mmx mmxext mng modules mp3 mtp musepack nptl nptlonly ogg openal opencore-amr opengl openmp pam pcre pdf png pppd qt3support readline reflection rle rtc samba sdl sensord session slang smp sndfile speex spell spl sqlite sse sse2 ssl ssse3 svg sysfs threads tiff truetype unicode usb v4l2 vdpau vorbis webkit wmf x264 x86 xattr xcb xcomposite xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2 digigr8 directory" DVB_CARDS="usb-dtt200u" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" QEMU_SOFTMMU_TARGETS="mips i386 x86_64" QEMU_USER_TARGETS="mips i386 x86_64" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="nv nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
It calls a bunch of scripts from x11-misc/xdg-utils there. What version of x11-misc/xdg-utils do you have? It worked for me with xdg-utils-1.0.2-r3. Can you reproduce the hang and use `pstree` or similar to find out which one of the xdg-* programs is hung?
I use version 1.0.2-r3 too. cpc ~ # emerge -Cp x11-misc/xdg-utils >>> These are the packages that would be unmerged: x11-misc/xdg-utils selected: 1.0.2-r3 protected: none omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. It hangs at ... Installing lrfviewer script to /var/tmp/portage/app-text/calibre-0.6.11/image/usr/bin Installing calibre script to /var/tmp/portage/app-text/calibre-0.6.11/image/usr/bin Setting up desktop integration... process is : /usr/bin/python2.6 /var/tmp/portage/app-text/calibre-0.6.11/work/calibre-0.6.11/src/calibre/linux.py --use-destdir --do-not-reload-udev-hal --group-file=//etc/group --dont-check-root
Maybe this is deprecated, i see that you released a new ebuild. It compiles well but crashes at install phase ... i686-pc-linux-gnu-g++ /var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/build/pyqt/pictureflow/qt/moc_pictureflow.o /var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/build/pyqt/pictureflow/qt/pictureflow.o -Wl,--as-needed -shared -Wl,-rpath,/usr/lib/qt4 -Wl,--version-script=pictureflow.exp -o pictureflow.so sippictureflowcmodule.o sippictureflowPictureFlow.o sippictureflowFlowImages.o -L/usr/lib/qt4 -L/usr/X11R6/lib -lQtCore -L/usr/lib/qt4 -L/usr/lib/qt4 -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread -ldl -lQtGui -L/usr/lib/qt4 -L/usr/X11R6/lib -L/usr/lib/qt4 -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -lQtCore -lz -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread -lXrender -lXrandr -lfontconfig -lXext -lX11 -lm -ldl -lXext -lX11 -lm -lpthread >>> Source compiled. >>> Test phase [not enabled]: app-text/calibre-0.6.14-r1 >>> Install calibre-0.6.14-r1 into /var/tmp/portage/app-text/calibre-0.6.14-r1/image/ category app-text python setup.py install --root=/var/tmp/portage/app-text/calibre-0.6.14-r1/image/ --no-compile --bindir=/var/tmp/portage/app-text/calibre-0.6.14-r1/image/usr/bin --sharedir=/var/tmp/portage/app-text/calibre-0.6.14-r1/image/usr/share /usr/lib/python2.6/site-packages/Pyrex/Compiler/Errors.py:17: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 self.message = message Dropping privileges to those of erik: 1000 Traceback (most recent call last): File "setup.py", line 99, in <module> sys.exit(main()) File "setup.py", line 85, in main command.run_all(opts) File "/var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/setup/__init__.py", line 158, in run_all File "/var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/setup/__init__.py", line 149, in run_cmd File "/var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/setup/install.py", line 127, in pre_sub_commands ImportError: No module named calibre.utils.config * * ERROR: app-text/calibre-0.6.14-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_install * environment, line 3029: Called distutils_src_install '--bindir=/var/tmp/portage/app-text/calibre-0.6.14-r1/image/usr/bin' '--sharedir=/var/tmp/portage/app-text/calibre-0.6.14-r1/image/usr/share' * environment, line 769: Called die * The specific snippet of code: * ${python} setup.py "${DISTUTILS_GLOBAL_OPTIONS[@]}" install --root="${D}" --no-compile "$@" || die "Installation failed"; * The die message: * Installation failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/app-text/calibre-0.6.14-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-text/calibre-0.6.14-r1/temp/environment'. * >>> Failed to emerge app-text/calibre-0.6.14-r1, Log file: Some python (V 2.6.2-r2) related stuff is going wrong on my system. I will do a revdep-rebuild dev-lang/python.
(In reply to comment #3) > File > "/var/tmp/portage/app-text/calibre-0.6.14-r1/work/calibre/setup/install.py", > line 127, in pre_sub_commands > ImportError: No module named calibre.utils.config This is strange because the ebuild sets PYTHONPATH right there order to avoid this type of error. Can you add --debug to your emerge options, try again, and post the output?
Created attachment 205879 [details] calibre-0.6.16 (debug) build log
Created attachment 205880 [details] emerge --info
I updated python, problem still the same
(In reply to comment #5) > Created an attachment (id=205879) [edit] > calibre-0.6.16 (debug) build log The log shows PYTHONPATH=/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src is set as it's supposed to. Can you check if /var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/utils/config.py exists as it's supposed to?
config.py is in place. cpc ~ # file /var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/utils/config.py /var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/utils/config.py: ASCII Java program text
Please test this command to see if it produces the same ImportError: env PYTHONPATH=/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src \ python -c "import calibre.utils.config as c"
Also, which version of dev-python/setuptools do you have? I have setuptools-0.6.1-r1 here.
thanks for the help so far, here is the output : cpc ~ # env PYTHONPATH=/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src python -c "import calibre.utils.config as c" Traceback (most recent call last): File "<string>", line 1, in <module> File "/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/__init__.py", line 16, in <module> from calibre.startup import plugins, winutil, winutilerror File "/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/startup.py", line 19, in <module> from calibre.constants import iswindows, preferred_encoding, plugins File "/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/constants.py", line 70, in <module> plugins = load_plugins() File "/var/tmp/portage/app-text/calibre-0.6.16/work/calibre/src/calibre/constants.py", line 54, in load_plugins plugin_path = sys.extensions_location AttributeError: 'module' object has no attribute 'extensions_location' cpc ~ # emerge -pv setuptools These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-python/setuptools-0.6.3-r3 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB
The same thing, install phase dies with this message (I used setuptools-0.6.1-r3 and 0.6-r1): calibre successfully installed. You can start it by running the command calibre >>> Completed installing calibre-0.6.16-r1 into /var/tmp/portage/app-text/calibre-0.6.16-r1/image/ --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE "/var/log/sandbox/sandbox-302.log" VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: kbuildsycoca F: unlink S: deny P: /root/.kde/tmp-3lp A: /root/.kde/tmp-3lp R: /root/.kde/tmp-3lp C: /usr/kde/3.5/bin/lnusertemp tmp F: symlink S: deny P: /root/.kde/tmp-3lp A: /root/.kde/tmp-3lp R: /root/.kde/tmp-3lp C: /usr/kde/3.5/bin/lnusertemp tmp F: unlink S: deny P: /root/.kde/tmp-3lp A: /root/.kde/tmp-3lp R: /root/.kde/tmp-3lp C: /usr/kde/3.5/bin/lnusertemp tmp F: symlink S: deny P: /root/.kde/tmp-3lp A: /root/.kde/tmp-3lp R: /root/.kde/tmp-3lp C: /usr/kde/3.5/bin/lnusertemp tmp F: unlink S: deny P: /root/.kde/socket-3lp A: /root/.kde/socket-3lp R: /root/.kde/socket-3lp C: /usr/kde/3.5/bin/lnusertemp socket F: symlink S: deny P: /root/.kde/socket-3lp A: /root/.kde/socket-3lp R: /root/.kde/socket-3lp C: /usr/kde/3.5/bin/lnusertemp socket F: unlink S: deny P: /root/.kde/socket-3lp A: /root/.kde/socket-3lp R: /root/.kde/socket-3lp C: /usr/kde/3.5/bin/lnusertemp socket F: symlink S: deny P: /root/.kde/socket-3lp A: /root/.kde/socket-3lp R: /root/.kde/socket-3lp C: /usr/kde/3.5/bin/lnusertemp socket F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: dcopserver --nosid --suicide F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: klauncher [kdeinit] --new-startup F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: kded --new-startup F: open_wr S: deny P: /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock A: /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock R: /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock C: kded --new-startup F: open_wr S: deny P: /usr/qt/3/etc/settings/.kstylerc.lock A: /usr/qt/3/etc/settings/.kstylerc.lock R: /usr/qt/3/etc/settings/.kstylerc.lock C: kded --new-startup F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: kded --new-startup F: open_wr S: deny P: /usr/qt/3/etc/settings/.qtrc.lock A: /usr/qt/3/etc/settings/.qtrc.lock R: /usr/qt/3/etc/settings/.qtrc.lock C: kbuildsycoca --incremental --checkstamps -------------------------------------------------------------------------------- >>> Failed to emerge app-text/calibre-0.6.16-r1, Log file: >>> '/var/tmp/portage/app-text/calibre-0.6.16-r1/temp/build.log'
(In reply to comment #13) > --------------------------- ACCESS VIOLATION SUMMARY This sandbox violation is a different problem, so please file a new bug.
(In reply to comment #14) > (In reply to comment #13) > > --------------------------- ACCESS VIOLATION SUMMARY > > This sandbox violation is a different problem, so please file a new bug. > I think that the sandbox violation will go away if we unset the DISPLAY environment variable. Please test: env -u DISPLAY emerge calibre
Yes! This helps fine! Should I open a new bug with it?
(In reply to comment #16) > Yes! This helps fine! Should I open a new bug with it? No thanks, it's fixed in cvs now. Thanks for reporting.
(In reply to comment #12) > Dropping privileges to those of erik: 1000 > Traceback (most recent call last): I'm pretty sure the "Dropping privileges" thing is what's triggering the problem for you, so I've updated the ebuild to disable that. Please test and let me know if it's fixed.
>I'm pretty sure the "Dropping privileges" thing is what's triggering the >problem for you, so I've updated the ebuild to disable that. Please test and >let me know if it's fixed. That does the trick, thanks a lot. But i don't get it, how does he get my username while running in a sandbox ?
It uses SUDO_* environment variables.
>It uses SUDO_* environment variables. Ok so it was just this, i commented out the privilege dropping patch #sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ # -i setup/install.py || die "sed'ing in the IMAGE path failed" And installed it sucessfully, doing su instead of sudo to become root.