Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87184 - dev-lang/gprolog-1.2.19 fails to build
Summary: dev-lang/gprolog-1.2.19 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Prolog project
URL:
Whiteboard:
Keywords:
: 110835 (view as bug list)
Depends on:
Blocks: 110835
  Show dependency tree
 
Reported: 2005-03-29 16:15 UTC by postmodern
Modified: 2006-03-31 11:52 UTC (History)
3 users (show)

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


Attachments
gprolog-1.2.19-noexecstack.patch (gprolog-1.2.19-noexecstack.patch,374 bytes, patch)
2006-03-31 03:11 UTC, Keri Harris (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description postmodern 2005-03-29 16:15:58 UTC
After unmasking gprolog for ppc and emerging I got these weird errors.

Reproducible: Always
Steps to Reproduce:
1. echo "dev-lang/gprolog ~ppc" >> /etc/portage/package.keywords
2. emerge gprolog
3.

Actual Results:  
system_error(cannot_catch_throw(error(domain_error('',fx),op/3)))
warning: /home/diaz/GP/src/src/Pl2Wam/read_file.pl:106: system directive failed
fatal error: exception raised:
error(domain_error('',prolog_name),current_prolog_flag/2)
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: *** Waiting for unfinished jobs....

system_error(cannot_catch_throw(error(domain_error('',fx),op/3)))
warning: /home/diaz/GP/src/src/Pl2Wam/read_file.pl:106: system directive failed
fatal error: exception raised:
error(domain_error('',prolog_name),current_prolog_flag/2)
compilation failed
make[1]: *** [read_file.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Fd2C'
make: *** [all] Error 1


Expected Results:  
success

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (default-linux/ppc/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r1,
2.6.10-gentoo-r6 ppc)
=================================================================
System uname: 2.6.10-gentoo-r6 ppc 750FX
Python:              dev-lang/python-2.2.3-r6,dev-lang/python-2.3.4-r1 [2.3.4
(#1, Feb 23 2005, 01:42:26)]
dev-lang/python:     2.2.3-r6, 2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.90.0.3-r3
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CFLAGS="-mcpu=750 -O3 -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=750 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa berkdb bitmap-fonts crypt curl dvd emboss esd fam flac font-server
fortran gdbm gif gstreamer gtk gtk2 imlib java jpeg mozilla mp3 ncurses network
nls oggvorbis opengl pam perl png ppc python readline samba softmmu speex spell
sqlite ssl theora tiff truetype truetype-fonts type1-fonts unicode xml2 xprint
xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2005-09-16 20:01:23 UTC
most more of the actual error message
Comment 2 Fabian Groffen gentoo-dev 2005-10-30 13:35:38 UTC
I experience the same problem.  On x86:

[snip]
gplc -c reg_alloc.wam
gplc -c inst_codif.wam
gplc -c first_arg.wam
gplc -c indexing.wam
gplc -c wam_emit.wam
[ ! -f  pl2wam ] || cp pl2wam pl2wam0
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o
syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o
indexing.o wam_emit.o
make[1]: Leaving directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Pl2Wam'
make[1]: Entering directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Fd2C'
gplc -c --fast-math fd2c.pl
fatal error: exception raised: error(domain_error(io_mode,read),open/3)
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Fd2C'
make: *** [all] Error 1

!!! ERROR: dev-lang/gprolog-1.2.16 failed.
!!! Function src_compile, Line 31, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.


on ppc-macos:

[snip]
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o
syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o
indexing.o wam_emit.o
gplc -c --fast-math fd2c.pl
gplc -c --fast-math read_file.pl


system_error(cannot_catch_throw(error(domain_error('',fx),op/3)))
warning: /home/diaz/GP/src/src/Pl2Wam/read_file.pl:106: system directive failed
system_error(cannot_catch_throw(error(domain_error('',fx),op/3)))
warning: /home/diaz/GP/src/src/Pl2Wam/read_file.pl:106: system directive failed
fatal error: exception raised: error(domain_error('',read),open/3)
fatal error: exception raised: error(domain_error('',read),open/3)
compilation failed
compilation failed
make[1]: *** [read_file.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [fd2c.o] Error 1
make: *** [all] Error 1

!!! ERROR: dev-lang/gprolog-1.2.16 failed.
!!! Function src_compile, Line 31, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 3 Patrick ALLAERT 2005-12-06 00:52:28 UTC
PLEASE: mark this as a x86 bug too => Hardware: All

Also fails to compile (gprolog-1.2.16) on x86 with:

-------------------------------------------------------
[ ! -f  pl2wam ] || cp pl2wam pl2wam0
gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o
syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o
indexing.o wam_emit.o
make[1]: Leaving directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Pl2Wam'
make[1]: Entering directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Fd2C'
gplc -c --fast-math fd2c.pl
fatal error: exception raised: error(domain_error(io_mode,read),open/3)
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/gprolog-1.2.16/work/gprolog-1.2.16/src/Fd2C'
make: *** [all] Error 1
-------------------------------------------------------

emerge info:

-------------------------------------------------------
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2,
2.6.12-gentoo-r10 i686)
=================================================================
System uname: 2.6.12-gentoo-r10 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer -march=pentium3 "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer -march=pentium3 "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="fa fr"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.be.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apache2 apm arts audiofile avi bash-completion berkdb
bitmap-fonts browserplugin bzip2 cdr crypt cups curl curlwrappers dbus directfb
divx4linux doc dri dvd eds emacs emacs-w3 emboss encode esd exif expat fam
ffmpeg firefox foomaticdb fortran ftp gd gdbm gif glut gnome gpm gstreamer gtk
gtk2 hal howl idn imagemagick imap imlib innodb ipv6 java javascript jpeg junit
kde kdeenablefinal lcms ldap libg++ libwww mad matroska mhash mikmod mmx mng
motif mozcalendar mozdevelop mozilla mozsvg mp3 mpeg mule mysql mysqli ncurses
nls ogg oggvorbis opengl oss pam pcmcia pcre pda pdflib perl php pic png
postgres python qt quicktime readline real samba sdl simplexml soap spell spl
ssl svg tcpd tetex tidy tiff tokenizer truetype truetype-fonts type1-fonts udev
unicode usb utf8 vhosts vim-with-x vorbis win32codecs wmf xml xml2 xmms xprint
xsl xv xvid zlib linguas_fa linguas_fr userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, MAKEOPTS, PORTDIR_OVERLAY
-------------------------------------------------------
Comment 4 postmodern 2005-12-06 09:00:04 UTC
Sorry about the delay.
Comment 5 Keri Harris (RETIRED) gentoo-dev 2006-01-06 18:32:25 UTC
This looks to be caused by gcc-3.4 not correctly handling gprolog's object chains. For later versions of gcc, it's important that __attribute__((used)) be declared so that unused static variables are still emitted. There's a patch attached to bug 104482 that should resolve this on ppc.
Comment 6 Keri Harris (RETIRED) gentoo-dev 2006-03-21 02:38:24 UTC
gprolog-1.2.19 has been committed to cvs. It contains a rewrite of it's object chaining mechanism that is compatible with later versions of gcc.
Comment 7 Fabian Groffen gentoo-dev 2006-03-29 23:29:37 UTC
bc_supp.c: In function 
Comment 8 Fabian Groffen gentoo-dev 2006-03-29 23:29:37 UTC
bc_supp.c: In function BC_Emit_Inst_1:
bc_supp.c:575: warning: pointer targets in passing argument 2 of BC_Arg_Func_Arity differ in signedness
bc_supp.c:607: warning: pointer targets in passing argument 2 of BC_Arg_Func_Arity differ in signedness
../TopComp/gplc -c foreign.wam
/var/tmp/portage/gprolog-1.2.19/temp/gplcaMXXEc.s:125:unknown section type:
/var/tmp/portage/gprolog-1.2.19/temp/gplcaMXXEc.s:125:Rest of line ignored. 1st junk character valued 112 (p).
compilation failed
make[1]: *** [foreign.o] Error 1
make: *** [all] Error 1

Any idea?
Comment 9 Fabian Groffen gentoo-dev 2006-03-29 23:29:38 UTC
*** Bug 110835 has been marked as a duplicate of this bug. ***
Comment 10 Keri Harris (RETIRED) gentoo-dev 2006-03-30 00:32:55 UTC
Fabian, can you provide 'emerge --info'?

I have a suspicion that you are on some form of powerpc architecture (darwin/macos?), and the noexecstack patch causing you grief.
Comment 11 Fabian Groffen gentoo-dev 2006-03-30 00:41:27 UTC
hehe...  yep, here you go: (OSX/PPC)

!!! Relying on the shell to locate gcc, this may break
!!! DISTCC, installing gcc-config and setting your current gcc
!!! profile will fix this
Portage 2.1_pre7-r1 (default-darwin/macos/10.4, gcc-4.0.1, libsystem-7.1-r0, 8.5.0 Power Macintosh)
=================================================================
System uname: 8.5.0 Power Macintosh powerpc
macos-20041118
distcc 2.18.3-Apple powerpc-apple-darwin8.0 (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     [Not Present]
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  [Not Present]
sys-devel/automake:  [Not Present]
sys-devel/binutils:  [Not Present]
sys-devel/libtool:   [Not Present]
virtual/os-headers:  7.1
ACCEPT_KEYWORDS="ppc-macos"
AUTOCLEAN="yes"
CBUILD="powerpc-apple-darwin8"
CFLAGS="-O3 -pipe"
CHOST="powerpc-apple-darwin8"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg collision-protect cvs distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_GB.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/nfs/poseidon/export/home/gentoo/gentoo-x86"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc emboss ffcall nls opengl ppc-macos elibc_Darwin kernel_Darwin userland_Darwin"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 12 Keri Harris (RETIRED) gentoo-dev 2006-03-31 03:11:03 UTC
Created attachment 83492 [details, diff]
gprolog-1.2.19-noexecstack.patch

The attached patch should avoid generating the GNU.stack section on powerpc*darwin* hosts. But is this what you want? Does ppc-macos suffer from the assembler generating executable stacks? Or is this strictly a GNU binutils concern?
Comment 13 Fabian Groffen gentoo-dev 2006-03-31 03:34:13 UTC
I just temporarily disabled the noexecstack patch in the files dir, and that seems to compile fine at least.  Your patch only disabled one block.

My prolog skills are far away so I can't get it to do anything but giving expections and quitting.  The readline/whatever support seems to be superb, so I think it's functional.
Comment 14 Keri Harris (RETIRED) gentoo-dev 2006-03-31 04:16:12 UTC
The patch should still work on ppc-macos. It contains two chunks - one for x86 architectures; another for powerpc architectures. Only the chunk for powerpc will end up being compiled on macos.

Let me know if the patch is satisfactory; if it works ok on ppc-macos then I'll commit it. And if you're happy with the behaviour of GNU prolog on macos, then I'm happy for it to be marked ~ppc-macos. :)
Comment 15 Fabian Groffen gentoo-dev 2006-03-31 04:46:56 UTC
Ah, sorry, you are right.  I misread the patch.

Anyway, with this change (as given by you) in the patch, it works fine for me, so you have my blessings to add keyword ~ppc-macos in the same commit if you change the patch.

-@@ -161,6 +161,9 @@
+@@ -161,6 +161,11 @@
  void
  Asm_Stop(void)
  {
++#ifndef M_powerpc_darwin
 +  Label_Printf("#ifdef __ELF__");
 +  Label_Printf(".section .note.GNU-stack,\"\",@progbits");
 +  Label_Printf("#endif");
++#endif
Comment 16 Keri Harris (RETIRED) gentoo-dev 2006-03-31 11:52:07 UTC
Thanks Fabian.

Closing this bug; I've committed a macos-friendly patch and marked gprolog as ~ppc-macos.