Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144665 - swi-prolog-5.6.17 tests fail trying to connect to X
Summary: swi-prolog-5.6.17 tests fail trying to connect to X
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal
Assignee: Gentoo Prolog project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-21 10:50 UTC by Harald van Dijk (RETIRED)
Modified: 2006-08-30 00:59 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 Harald van Dijk (RETIRED) gentoo-dev 2006-08-21 10:50:00 UTC
gmake[2]: Entering directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src/xpce.sh -q -g "['../src/test.pl'],test,halt" -t 'halt(1)'
XPCE/SWI-Prolog test suite. (XPCE version 6.6.17, July 2006)
To run all tests run ?- test.

Running test set "name" . done.
Running test set "wname" ... done.
Running test set "wstring" ......... done.
Running test set "fmt" ...... done.
Running test set "srcsink" .. done.
Running test set "file" ..... done.
Running test set "dir" ........ done.
Running test set "bom" Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

[PCE fatal: @display/display: Failed to connect to X-server at `:0.0': malformed address: :0.0
*********************************************************************
* You MUST be running the X11 Windowing environment.  If you are,   *
* check the setting of your DISPLAY environment variable as well    *
* the access rights to your X11 server.  See xauth(1) and xhost(1). *
*********************************************************************
        in:     <No exception goal>
]
Host stack:
     [12] new(_L361, view)
     [11] bom(bom-1)
     [10] catch(bom(bom-1), _L312, true)
      [9] runtest(bom)
    <Alien goal>
      [8] send(@prolog/host, runtest(bom))
gmake[2]: *** [check] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
gmake[1]: *** [check] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce'
make: *** [check] Error 1

!!! ERROR: dev-lang/swi-prolog-5.6.17 failed.
Call stack:
  ebuild.sh, line 1543:   Called dyn_test
  ebuild.sh, line 986:   Called src_test
  swi-prolog-5.6.17.ebuild, line 140:   Called die

!!! make check failed. See above for details.
!!! If you need support, post the topmost build error, and the call stack if relevant.

$ emerge -pv swi-prolog

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-lang/swi-prolog-5.6.17  USE="X readline ssl -berkdb -doc -gmp -java -minimal -odbc -static -tetex -threads" 0 kB 

Total size of downloads: 0 kB
$ emerge --info
Portage 2.1.1_pre5-r2 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17.7 i686)
=================================================================
System uname: 2.6.17.7 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.12.4
Last Sync: Unknown
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: [Not Present]
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer"
DISTDIR="/var/dist"
FEATURES="assume-digests autoconfig autopatch collision-protect cvs distlocks metadata-transfer notitles parallel-fetch sandbox sfperms sign strict test userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Xlinker --as-needed"
LINGUAS="en_GB en"
PKGDIR="/var/pkg"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cvs/gentoo-x86"
PORTDIR_OVERLAY="/etc/portage/overlay /etc/portage/overlay/enlightenment"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X alsa bindist cairo cdparanoia cjk cups debugger dri elibc_glibc ftp gcc-libffi gif gpgme graphviz gtk iconv idn immqt input_devices_keyboard input_devices_mouse ipv6 ithreads jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux linguas_en linguas_en_GB lynxkeymap mbox mmx mmxext mozdevelop mudflap ncurses nethack nls no-old-linux nocxx nptl nptlonly offensive ogg opengl pango paste64 pcre pdf perl png ppds qt3 readline rtc ssl svg tcl test theora truetype unicode userland_GNU video_cards_radeon vim-pager vorbis win32codecs xim xine xorg"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Keri Harris (RETIRED) gentoo-dev 2006-08-22 02:07:42 UTC
The easy fix would be to inherit virtualx and use Xmake where appropriate in src_test. But I'm a little hesitant to do this - I don't want to pull in an X server dep just for the test-suite. Instead I'll look at rewritting the XPCE test-suite to check for Xvfb and only run the offending tests if Xvfb is found.

Thanks,

Keri.
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2006-08-23 11:14:13 UTC
While xorg-server would be a bad hard dependency, perhaps with a conditional on USE=test it would be acceptable without needing to rewrite anything? (Your suggestion would work too, of course, and I have no problems with it.)
Comment 3 Keri Harris (RETIRED) gentoo-dev 2006-08-23 12:23:25 UTC
Since it's possible to run XPCE without an X server installed locally, alas even USE="X test" would bring in a superfluous dependency. Instead, I've patched the XPCE testsuite to now run in a chroot environment with USE="X".

Thanks for the bug report!

Keri
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2006-08-23 13:09:46 UTC
Thanks, but I updated, and it still fails with the exact same error. The logic that if DISPLAY is set, an X server is available, is not safe: something as simple as running emerge using sudo is enough to break it.
Comment 5 Keri Harris (RETIRED) gentoo-dev 2006-08-24 00:52:26 UTC
I've committed parte deux that uses XPCE's @display object itself to test for a usable X server. This should prove more robust.

Thanks,

Keri
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2006-08-24 02:10:23 UTC
I'm really sorry, but... it still fails:

gmake[2]: Entering directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src/xpce.sh -q -g "['../src/test.pl'],test,halt" -t 'halt(1)'
XPCE/SWI-Prolog test suite. (XPCE version 6.6.17, July 2006)
To run all tests run ?- test.

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

gmake[2]: *** [check] Error 1
gmake[2]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
gmake[1]: *** [check] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce'
make: *** [check] Error 1

!!! ERROR: dev-lang/swi-prolog-5.6.17 failed.
Call stack:
  ebuild.sh, line 1543:   Called dyn_test
  ebuild.sh, line 986:   Called src_test
  swi-prolog-5.6.17.ebuild, line 140:   Called die

!!! make check failed. See above for details.
!!! If you need support, post the topmost build error, and the call stack if relevant.

It's with a better error message, though, so it's going in the right direction :)
Comment 7 Keri Harris (RETIRED) gentoo-dev 2006-08-24 04:04:37 UTC
Thanks for bearing with me on this. Can you outline how you are running the XPCE tests? I can't seem to reproduce your error. Running 'FEATURES="test" USE="X" sudo emerge swi-prolog' produces the following for me:


gmake[2]: Entering directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src/xpce.sh -q -g "['../src/test.pl'],test,halt" -t 'halt(1)'
XPCE/SWI-Prolog test suite. (XPCE version 6.6.17, July 2006)
To run all tests run ?- test.

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

No X server found. Some tests are disabled.

Running test set "name" . done.
Running test set "wname" ... done.
Running test set "wstring" ......... done.
Running test set "fmt" ...... done.
Running test set "srcsink" .. done.
Running test set "file" ..... done.
Running test set "dir" ........ done.
Disabling test set "bom"
Running test set "plterm" . done.
Running test set "textbuffer" .... done.
Running test set "asfile" .... done.
Disabling test set "selection"
Disabling test set "image"
Running test set "regex" ...................... done.
Running test set "type" .. done.

All tests passed
gmake[2]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce/src'
gmake[1]: Leaving directory `/var/tmp/portage/swi-prolog-5.6.17/work/pl-5.6.17/packages/xpce'


In any case, I'll keep digging with this bug.

Keri.
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2006-08-24 04:08:36 UTC
(In reply to comment #7)
> Thanks for bearing with me on this. Can you outline how you are running the
> XPCE tests? I can't seem to reproduce your error. Running 'FEATURES="test"
> USE="X" sudo emerge swi-prolog' produces the following for me:

I'm simply running `sudo emerge swi-prolog`. The output of `sudo env` is as follows:

TERM=xterm
CONFIG_PROTECT_MASK=/etc/eselect/compiler /etc/terminfo /etc/texmf/web2c /etc/revdep-rebuild
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/intel/compiler90/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin
LANG=en_GB.UTF-8
DISPLAY=:0.0
CONFIG_PROTECT=/usr/share/X11/xkb /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown /usr/share/config
HOME=/home/harald
SHELL=/bin/bash
LOGNAME=root
USER=root
SUDO_COMMAND=/bin/env
SUDO_USER=harald
SUDO_UID=1000
SUDO_GID=100

I have FEATURES="test" USE="X test" enabled in /etc/make.conf
Comment 9 Keri Harris (RETIRED) gentoo-dev 2006-08-28 03:38:32 UTC
I've determined the cause of the test-suite failing - fatal XPCE errors will cause single-threaded prolog engines to bail out to the top-level; multi-threaded engines will only lose the XPCE-executing thread.

This is now fixed in cvs.
Comment 10 Harald van Dijk (RETIRED) gentoo-dev 2006-08-28 05:01:17 UTC
Just to confirm, its tests pass without a problem now, thanks a lot.