Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111789 - Portage prolog fails to emerge without prolog problems
Summary: Portage prolog fails to emerge without prolog problems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Prolog project
URL:
Whiteboard:
Keywords:
: 118756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-07 09:15 UTC by Stefan de Konink
Modified: 2006-01-19 17:36 UTC (History)
3 users (show)

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


Attachments
Working ebuild (swi-prolog-lite-5.5.36.ebuild,1.13 KB, text/plain)
2005-11-07 09:16 UTC, Stefan de Konink
Details
patch for dev-lang/swi-prolog-lite-5.5.39.ebuild (swi-prolog-lite.patch,749 bytes, patch)
2006-01-12 05:31 UTC, Christoph Jacob
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2005-11-07 09:15:58 UTC
The current ebuild generates errors while building prolog. Though it is more
advanced than the last one, functionality is more important to me.

Attached is a working ebuild for 5.5.36.
Comment 1 Stefan de Konink 2005-11-07 09:16:39 UTC
Created attachment 72386 [details]
Working ebuild
Comment 2 SpanKY gentoo-dev 2005-12-01 00:18:07 UTC
Comment on attachment 72386 [details]
Working ebuild

this ebuild isnt even close to correct you cut out so many things
Comment 3 SpanKY gentoo-dev 2005-12-01 00:44:51 UTC
no real info as to *what* errors occur
Comment 4 Stefan de Konink 2005-12-01 06:01:40 UTC
gmake[1]: Leaving directory `/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-
5.5.39/packages/nlp'
gmake[1]: Entering directory `/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-
5.5.39/packages/chr'
../pl.sh -q -f chr_swi_bootstrap.pl \
      -g "chr_compile_step1
('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
              -t 'halt(1)'
[PROLOG SYSTEM ERROR:
        After trail: relocation cells = 6; relocated_cells = 5

[While in 1-th garbage collection]


PROLOG STACK:
_L9
 (39): system:=/2
_L9
_L9
 (38): chr_translate:reorder_heads1/5
_L9
_L9
 (35): chr_translate:simpagation_head2_code/12
_L9
_L9
 (33): chr_translate:heads2_code/15
_L9
_L9
 (31): chr_translate:rules_code/11
_L9
_L9
 (20): chr_translate:constraint_code/8
_L9
_L9
 (19): chr_translate:constraints_code/8
_L9
_L9
 (9): chr_translate:constraints_code/4
_L9
_L9
 (8): chr_translate:chr_translate/2
_L9
_L9
 (7): chr:chr_compile/3
_L9
]

Action?


And yes since I am a student of the University of Amsterdam I rather have a 
working 'development' version with some working code instead of having to type 
a or e, and have nothing.
Comment 5 SpanKY gentoo-dev 2005-12-01 07:36:32 UTC
what about `emerge info` ?
Comment 6 Stefan de Konink 2005-12-01 13:21:03 UTC
The holy grail:

Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14-
gentoo i686)
=================================================================
System uname: 2.6.14-gentoo i686 AMD Athlon(tm) processor
Gentoo Base System version 1.12.0_pre11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable
d]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.14
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-tbird -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X1
1/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-tbird -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sfperms strict"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://sunsite.infor
matik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/ge
ntoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac acl alsa apm audiofile avi bitmap-fonts bmp bp
m bzip2 cdr crypt cups curl divx4linux dv dvd eds emboss encode ethereal exif ex
pat f77 fam ffmpeg flac foomaticdb fortran gd gif glitz glut gmp gnutls gstreame
r gtk gtk2 idn imagemagick ipv6 jack joystick jpeg junit lcms ldap libcaca libg+
+ libsamplerate libwww lirc mad mhash mikmod mmx mmxext mng motif mp3 mpeg ncurs
es nls nptl nptlonly nsplugin nvidia odbc ogg oggvorbis openal opengl oss pam pc
re php pic png postgres quicktime readline recode scanner sdl slang softmmu spee
x spell sqlite ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev
 usb userlocales vorbis win32codecs wmf xine xml xml2 xprint xv xvid zlib userla
nd_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 7 Stefan de Konink 2005-12-01 13:23:13 UTC
This is me with -O2:

( cd ../lib/i686-linux-gnu && rm -f libpl.so && ln -s libpl.so.5.5.39 libpl.so )
i686-pc-linux-gnu-gcc -c -I.
-I/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/src
-I/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/src/rc  -O2
-march=athlon-tbird -pipe -fomit-frame-pointer -O2 -march=athlon-tbird -pipe
-fomit-frame-pointer -fPIC pl-extend.c -o pl-extend.o
i686-pc-linux-gnu-gcc -export-dynamic 
-Wl,-rpath=/usr/lib/pl-5.5.39/lib/i686-linux-gnu -o pl pl-extend.o
-L../lib/i686-linux-gnu -lpl -lpl
./pl.sh -O -o pl.prc -b ../boot/init.pl
Loading boot file ...
Loading Prolog startup files
ERROR: Out of global stack
[PROLOG SYSTEM ERROR:
        Undefined predicate: system:print_message/2

PROLOG STACK:
  (47) system: <meta-call>((print_message(error, $aborted), fail))
^ (46) system:catch($consult_stream2($stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl),
$aborted, (print_message(error, $aborted), fail))
  (45) system:$consult_stream($stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl)
  (44) system:$load_module(license, [license/1, license/2, eval_license/0], all,
$stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl)
^ (41) system:catch($load_file($stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl, all,
false, license), _G432, (print_message(error, _G432), fail))
  (40)
system:$open_source_call(/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl,
$stream(89882), $load_file($stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl, all,
false, license), _L718)
  (39)
system:$open_source(/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl,
default, $stream(89882), $load_file($stream(89882),
/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl, all,
false, license))
  (38)
system:$consult_file_2(/var/tmp/portage/swi-prolog-lite-5.5.39/work/pl-5.5.39/boot/license.pl,
default, system, all, false, boot compiled, license)
^ (36) system:$load_file(license, system, [expand(false)])
  (34) system:$load_files([license], system, [expand(false)])
]
make: *** [pl.prc] Error 1

!!! ERROR: dev-lang/swi-prolog-lite-5.5.39 failed.
!!! Function src_compile, Line 51, Exitcode 2
!!! make dev failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 8 Stefan de Konink 2005-12-01 13:33:08 UTC
Going back to -O1 works.
Comment 9 Stefan de Konink 2005-12-04 08:11:20 UTC
Though triple20 doesn't work anymore:
skinkie@nemesis /usr/src/Triple20/src $ ./triple20.pl 
ERROR: (/usr/src/Triple20/src/triple20.pl:23):
        rdf_cache:rdf_cache_create_update_thread/0: Undefined procedure:
rdf_cache:current_thread/2
^  Exception: (37) with_mutex(rdf_cache, rdf_cache:rdf_cache2(_G2580,
t20_explorer:property(_G2580), _G2587)) ? 
Comment 10 Keri Harris (RETIRED) gentoo-dev 2005-12-23 23:05:18 UTC
Have another go with -fno-strict-aliasing in your CFLAGS. swi-prolog's stack-memory management takes advantage of type-pruning which strict-aliasing (enabled in -O2 and -O3) doesn't cope with very well.
Comment 11 Luke Maurer (Jyrinx) 2005-12-27 23:45:03 UTC
I'm getting a very similar error; adding -fno-strict-aliasing to CFLAGS does indeed fix it.

jyrinx@mythrilspoon ~ $ emerge --info
Portage 2.1_pre2 (default-linux/amd64/2005.0, gcc-4.0.2, glibc-2.3.6-r1, 2.6.14-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre12
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -g -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/lib/games/*.scores /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/X11/app-defaults /etc/gconf /etc/gconf/schemas/ /etc/init.d/ /etc/sound/events/ /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O3 -g -pipe -fomit-frame-pointer"
DISTDIR="/var/portage/distfiles"
FEATURES="autoconfig distlocks nostrip sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/usr/local/var/portage /home/jyrinx/var/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib acpi4linux aim alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts blas bonobo bzip2 bzlib cairo caps cdb cdda cddb cdio cdparanoia cdr crypt cscope ctype cups curl dba dbus dlloader doc dri dvd dvdr dvdread eds emboss encode esd exif expat fam fbcon ffmpeg firefox flac flash foomaticdb fortran ftp gb gd gdbm gif glitz glut gmp gnome gnuplot gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal haskell icq idn imagemagick imap imlib ipv6 jack java javascript jpeg junit ladcca lcms ldap libgda libwww lzw lzw-tiff mhash ming mng motif mozilla mp3 mpeg mysql ncurses nls nptl nsplugin offensive ogg oggvorbis openal opengl pam pcre pda pdflib pear perl php pic png pnp python quicktime readline samba sdk sdl slang sockets socks5 spell ssl subversion svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales utf8 vorbis wmf wxwindows xine xinerama xml xml2 xosd xpm xprint xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS

Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-01-12 04:07:24 UTC
*** Bug 118756 has been marked as a duplicate of this bug. ***
Comment 13 Christoph Jacob 2006-01-12 05:29:58 UTC
The problem I reported in Bug 118756 is also solved by
adding -fno-strict-aliasing to my CFLAGS.

I have made a patch to do this automatically in the ebuild
Comment 14 Christoph Jacob 2006-01-12 05:31:04 UTC
Created attachment 76903 [details, diff]
patch for dev-lang/swi-prolog-lite-5.5.39.ebuild
Comment 15 SpanKY gentoo-dev 2006-01-19 17:36:33 UTC
thanks for the hint, fixed in cvs