Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116843 - dev-lang/gprolog-1.2.19 version bump
Summary: dev-lang/gprolog-1.2.19 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Prolog project
URL:
Whiteboard:
Keywords: EBUILD
: 65076 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-26 22:51 UTC by Keri Harris
Modified: 2006-03-21 02:54 UTC (History)
2 users (show)

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


Attachments
gprolog-1.2.19.ebuild (gprolog-1.2.19.ebuild,1.61 KB, text/plain)
2005-12-26 22:52 UTC, Keri Harris
Details
gprolog-1.2.19-CFLAGS.patch (gprolog-1.2.19-CFLAGS.patch,1.31 KB, patch)
2005-12-26 22:52 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-CFLAGS.patch (gprolog-1.2.19-CFLAGS.patch,980 bytes, patch)
2005-12-30 21:47 UTC, Keri Harris
Details | Diff
gprolog-1.2.19.ebuild.patch (gprolog-1.2.19.ebuild.patch,1.02 KB, patch)
2005-12-30 21:48 UTC, Keri Harris
Details | Diff
stack_test.pl (ex.pl,24 bytes, text/plain)
2005-12-30 21:49 UTC, Keri Harris
Details
stack_test.c (ex.c,849 bytes, text/plain)
2005-12-30 21:53 UTC, Keri Harris
Details
gprolog-1.2.19.ebuild (gprolog-1.2.19.ebuild,1.57 KB, text/plain)
2006-01-09 02:27 UTC, Keri Harris
Details
gprolog-1.2.19-pl2wam-no-fast-call.patch (gprolog-1.2.19-pl2wam-no-fast-call.patch,20.34 KB, patch)
2006-01-13 03:37 UTC, Keri Harris
Details | Diff
gprolog-1.2.19.ebuild.patch (gprolog-1.2.19.ebuild.patch,1.17 KB, patch)
2006-01-22 19:44 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-gcc4.patch (gprolog-1.2.19-gcc4.patch,11.66 KB, patch)
2006-01-22 19:45 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-test.patch (gprolog-1.2.19-test.patch,5.27 KB, patch)
2006-01-22 19:45 UTC, Keri Harris
Details | Diff
gprolog-1.2.19.ebuild.patch (gprolog-1.2.19.ebuild.patch,1.16 KB, patch)
2006-01-23 02:10 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-test.patch (gprolog-1.2.19-test.patch,5.72 KB, patch)
2006-01-23 02:11 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-noexecstack.patch (gprolog-1.2.19-noexecstack.patch,672 bytes, patch)
2006-03-04 13:24 UTC, Keri Harris
Details | Diff
gprolog-1.2.19-bootstrap.batch (gprolog-1.2.19-bootstrap.batch,3.97 KB, patch)
2006-03-04 13:27 UTC, Keri Harris
Details | Diff
gprolog-1.2.19.ebuild (gprolog-1.2.19.ebuild,1.83 KB, text/plain)
2006-03-04 13:31 UTC, Keri Harris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keri Harris gentoo-dev 2005-12-26 22:51:27 UTC
Find attached an ebuild and patch for the latest upstream release of GNU Prolog.
Comment 1 Keri Harris gentoo-dev 2005-12-26 22:52:08 UTC
Created attachment 75583 [details]
gprolog-1.2.19.ebuild
Comment 2 Keri Harris gentoo-dev 2005-12-26 22:52:50 UTC
Created attachment 75584 [details, diff]
gprolog-1.2.19-CFLAGS.patch
Comment 3 George Shapovalov (RETIRED) gentoo-dev 2005-12-29 01:28:51 UTC
Hi Keri.

Sorry, I did not get to your ebuilds earlier - I was tying up some staff in Ada land, but now the "small" stuff is done and I'll take at prolog, before going back :).

Thanks for the submission. I have couple of questions though.
But first: it is usually better to submit diffs when you post a new version of ebuild or whatever - makes the changes immediately visible..

But is the package already released? I see on the gprolog homepage that they advertise only 1.2.16 so far, plus I cannot fetch sources for this one, does not look like it is on gnu's mirrors..

This, below, is just from looking at the changes in ebuild

src_unpack
1.
># Fix gplc executable stack creation
>sed -i -e "s/EXE_FILE_ASM, \" \", \"-o/EXE_FILE_ASM, \" \", \"--noexecstack -o/" TopComp/top_comp.c

I presume this is in the responce to those annoying QA messages? However is this safe for gprolog? I am not sure whether nested functions make any sense in prolog land (one of the things this might interfer with), but the major reason for killing the execution of stack was to guard C/C++, which is not as a severe problem with pretty much all other languages. Anyway, the only way to know is to test. Are there any comprehensive test suits that would pick something like that up?

2.
CFLAGS_MACHINE="`get-flag -march`"
CFLAGS_MACHINE="${CFLAGS_MACHINE} `get-flag -mcpu`"
CFLAGS_MACHINE="${CFLAGS_MACHINE} `get-flag -mtune`"

Does gprolog have any relation to gcc? If yes, then 2nd and 3rd lines may not be necessary, -march is supposed to imply the others. However I see you filter them later from CFLAGS, so this is probably necessary for that (and it does not heart to have them anyway).

src_compile
3. 
cd "${S}"
at the beginning of src_compile and src_install is not necessary.

4.
It is probably better to move definition of CFLAGS_MACHINE and filter-flags here - they do not touch sources, so technically they do not deal with unpacking but have a logical relationship with compiling..

George

PS
I see it is not that easy to intersect on irc for us, as you are in NZ and I am in Europe, but feel free to ping me (just join #gentoo)or /msg me directly if you have any questions. I'll try to find you after I'll go through all the prolog bugs..
Comment 4 George Shapovalov (RETIRED) gentoo-dev 2005-12-29 01:31:26 UTC
Oh, forgot one more thing:

in the provided patch, these lines:
+echo $CFLAGS
+echo $CF1
+echo $CFLAGS_MACHINE

Are they necessary for something or are they leftover debug output?
If you want to keep them it is usefull to add a comment as of their effect in the code..

George
Comment 5 Keri Harris gentoo-dev 2005-12-30 21:47:26 UTC
Created attachment 75845 [details, diff]
gprolog-1.2.19-CFLAGS.patch
Comment 6 Keri Harris gentoo-dev 2005-12-30 21:48:33 UTC
Created attachment 75846 [details, diff]
gprolog-1.2.19.ebuild.patch

I've tidied up the ebuild and patch, correcting SRC_URI and removing the superfluous echos in the patch.

gprolog makes a firm distinction between machine-specific CFLAGS (-march, -mcpu and -mtune) and architecture independent CFLAGS. Any machine-specific CFLAGS are filtered from $CFLAGS and passed to the configure script via $CFLAGS_MACHINE.

Regarding gplc generating binaries with an executable stack - gplc essentially acts as a wrapper for 'gcc' and 'as' when dealing with imported c predicates. (gplc can even be used to compile and link standalone c programs). Thus it inherits all the problems with safeguarding the stack for imported c code.

To illustrate, here's an example of running a prolog program with c bindings that will execute /bin/sh from the stack (the programs are attachments to follow):

$ ls
stack_test.c  stack_test.pl
$ gplc stack_test.pl stack_test.c
$ ls
stack_test  stack_test.c  stack_test.pl
$ ./stack_test
GNU Prolog 1.2.19
By Daniel Diaz
Copyright (C) 1999-2005 Daniel Diaz
| ?- stack_test.
sh-3.00$ exit
exit

What is problematic is that the binary generated by gplc always has its stack marked as executable:

$ scanelf -e ./stack_test
 TYPE   STK/REL/PTL FILE
ET_EXEC RWX --- RW- ./ex

I'm not aware of GNU Prolog's resolution engine requiring an executable stack, but have nevertheless raised the issue of executable stacks with upstream and am awaiting a reply. In the meantime I'm happy to let the ebuild go with the QA warnings. :)
Comment 7 Keri Harris gentoo-dev 2005-12-30 21:49:32 UTC
Created attachment 75847 [details]
stack_test.pl
Comment 8 Keri Harris gentoo-dev 2005-12-30 21:53:07 UTC
Created attachment 75848 [details]
stack_test.c

The above two attachment comprise a prolog program with c bindings.

To compile:
$ gplc stack_test.pl stack_test.c

To execute:
$ ./stack_test

When in the prolog interpreter, the dodgy c code can be called via the predicate 'stack_test':
| ?- stack_test.
Comment 9 George Shapovalov (RETIRED) gentoo-dev 2006-01-08 08:16:27 UTC
Thanks for an update Keri.

Here is what I get on amd64:
[ ! -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.19/work/gprolog-1.2.19/src/Pl2Wam'
make[1]: Entering directory `/var/tmp/portage/gprolog-1.2.19/work/gprolog-1.2.19/src/Fd2C'
gplc -c --fast-math fd2c.pl

Fatal Error: Segmentation Violation
compilation failed
make[1]: *** [fd2c.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/gprolog-1.2.19/work/gprolog-1.2.19/src/Fd2C'
make: *** [all] Error 1

!!! ERROR: dev-lang/gprolog-1.2.19 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! emake failed

This does not seem to depend on CFLAGS or MAKEOPTS (it just -jX now - for parallel build).
But then, amd64 was not in KEYWORDS, I just added it to test, since there were no apparent arch restrictions (and configure did not complain either). Well, looks like there are problems on this arch..

Other than that, it compiled fine in 32bit chroot, but I have a complaint about installation phase:
files COPYING, ChangeLog, NEWS, VERSION are installed plain under /usr.
This is not the dodoc doing, as that one installs them (additionally) where they should be, but rather this happens during make install-system. Here is the relevant output of emerge install:
for i in `echo "COPYING VERSION NEWS ChangeLog"`; do /bin/install -c -m 644 ../$i /var/tmp/portage/gprolog-1.2.19/image//usr;done

Otherwise the image looks fine..
One small tip: you may easily miss stuff like that if you simply run "emerge package" when you test, for this reason I prefer to do:
cd category/pkgname
ebuild pkg-PV.ebuild digest unpack setup compile install

Then you can cd /var/tmp/portage/package/image
and look around - you will see all the files that will be installed during the (next) qmerge step by portage. This also helps a lot if you need to figure out how to move stuff around if there is a need, or what cruft can be removed..

To fix this you can simply add 
rm -f "${D}"/usr/{COPYING,ChangeLog,NEWS,VERSION}
to src_istall, although it is better to disable installing these files in Makefile

With above rm it installs and seems to work fine, although I do not know nearly enough prolog to do any sensible testing..

George
Comment 10 George Shapovalov (RETIRED) gentoo-dev 2006-01-08 14:44:58 UTC
*** Bug 65076 has been marked as a duplicate of this bug. ***
Comment 11 Keri Harris gentoo-dev 2006-01-09 02:27:58 UTC
Created attachment 76602 [details]
gprolog-1.2.19.ebuild

Find attached an updated ebuild properly respecting sane install locations for documentation.

With regards to gprolog not compiling on AMD64 - this is most certainly due to gcc-3.4 not ensuring gprolog's trail stack is byte-aligned on 64-bit architectures. gprolog-1.2.17 was the first release to introduce support for x86_64, but only when compiled with <=gcc-3.3.3. gprolog-1.2.19 provided fixes for gcc-3.4 on 32-bit architectures, but 64-bit architectures have been left largely unsupported.

I'll poke around a little and see what the likelihood of a fix for x86_64 with gcc-3.4 will be.
Comment 12 Keri Harris gentoo-dev 2006-01-13 03:37:02 UTC
Created attachment 76980 [details, diff]
gprolog-1.2.19-pl2wam-no-fast-call.patch

Furthur investigations show that gprolog's finite domain constraint handler appears to be quite unsupported on x86_64 architectures when built with >=gcc-3.4. It may be possible to build it with a version of pl2wam that does not use fast-math calls, but this is pure speculation and I'm not confident that this will fix the build problems; in any case, I've attached a patch that can be applied to see if this is the case. ('--disable-fast-call' will also need to be passed to econf).

If the build still fails, then an strace of '../Pl2Wam/pl2wam fd2c.pl' from within the directory gprolog-1.2.19/src/Fd2C/ may provide some insight into why the build is failing.

If this fails to resolve this issue, then an interim solution is to simply disable gprolog's finite domain solver (which is not part of the core distribution) for amd64.
Comment 13 Keri Harris gentoo-dev 2006-01-22 19:44:22 UTC
Created attachment 77876 [details, diff]
gprolog-1.2.19.ebuild.patch

Find attached an ebuild patch for gprolog-1.2.19 that addresses several issues:

1) The gprolog build does not parallelize well. I've dialed back to -j1 in MAKEOPTS.

2) I'm attaching a patch that enables gprolog to build with gcc-4.x. gprolog is horribly broken with gcc-4. This is due to gprolog using a rather strange symbol-address scheme: when a gplc-compiled binary calls a prolog predicate, the executable file is searched, looking for obj_chain structures. As these structures are found, the requested predicate initialization is called. Unfortunately, at link-time the obj_chain *relied* on earlier versions of gcc allowing us to mix extern and static definitions in header files. The patch renames the start and end of each obj_chain structure approprately, ensuring that initialization routines are called. (This area of gprolog is nasty to look at!)

3) gprolog built with gcc-4 cannot take advantage of fast-calls. In particular foreign_double calls are not byte-aligned and will break any code relying to them. fast-math calls are now disabled on gcc-4 builds.

4) when building with gcc-4, gprolog cannot use -O optimizations, and "-O0" must be used. Even "-O1 -fno-everthing-enabled-by-O1" causes the gprolog build to fail - this is an indication of just how dependent upon specific compiler and linker behaviour gprolog's obj_chain is.

5) With "maketest" in FEATURES, foreign call_c test routines and obj_chain tests are now conducted. These provide a good indication of gprolog's ability. (patch to follow).

(The gcc patch has been sent upstream). 

George, your error with building fd2c on amd64 may be the same as the issue raised in point 1); the build is failing at the same place. I'm interested to see how it builds with the updated ebuild and patches. :)
Comment 14 Keri Harris gentoo-dev 2006-01-22 19:45:12 UTC
Created attachment 77877 [details, diff]
gprolog-1.2.19-gcc4.patch
Comment 15 Keri Harris gentoo-dev 2006-01-22 19:45:36 UTC
Created attachment 77878 [details, diff]
gprolog-1.2.19-test.patch
Comment 16 Keri Harris gentoo-dev 2006-01-23 02:10:36 UTC
Created attachment 77891 [details, diff]
gprolog-1.2.19.ebuild.patch

A slight modification to fast-call checking on non-x86 architectures.
Comment 17 Keri Harris gentoo-dev 2006-01-23 02:11:58 UTC
Created attachment 77892 [details, diff]
gprolog-1.2.19-test.patch

A slight modification to fast-call checking on non-x86 architectures.
Comment 18 Ernestas Liubarskij 2006-03-04 06:58:23 UTC
It emerged for me on 2 PCs, but with QA exec-stacks notice (same on both PCs):

man:
prepallstrip:
strip: i686-pc-linux-gnu-strip --strip-unneeded
   /usr/bin/fd2c
   /usr/bin/gplc
   /usr/bin/ma2asm
   /usr/bin/pl2wam
   /usr/bin/gprolog
   /usr/bin/hexgplc
   /usr/bin/wam2ma

QA Notice: the following files contain executable stacks
 Files with executable stacks will not work properly (or at all!)
 on some architectures/operating systems.  A bug should be filed
 at http://bugs.gentoo.org/ to make sure the file is fixed.
 Please include this file in your report:
 /var/tmp/portage/gprolog-1.2.19/temp/scanelf-exec.log
RWX --- --- usr/bin/fd2c
RWX --- --- usr/bin/pl2wam
RWX --- --- usr/bin/gprolog
!WX --- --- usr/lib/all_fd_bips.o
!WX --- --- usr/lib/top_level.o
!WX --- --- usr/lib/all_pl_bips.o
!WX --- --- usr/lib/debugger.o

>>> Completed installing gprolog-1.2.19 into /var/tmp/portage/gprolog-1.2.19/image/


the 1st PC's # emerge --info

Portage 2.1_pre5-r3 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7 i686)
=================================================================
System uname: 2.6.15-gentoo-r7 i686 Intel(R) Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
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-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.dtiltas.lt/mirror/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/"
LC_ALL="lt_LT.utf8"
LINGUAS="lt"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi alsa apm artworkextra asf audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cdb cdparanoia cdr chroot crypt curl dbus dri dv dvd dvdread eds emboss encode exif expat fam fat ffmpeg firefox flac foomaticdb fortran gd gdbm gif glut gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal howl idn imagemagick imlib irssi java javascript jpeg lame lcms libg++ libwww live logrotate mad matroska mikmod mjpeg mmx mmxext mng motif mozilla mp3 mpeg mplayer nautilus ncurses network nls nptl nptlonly nsplugin ntfs numeric nvidia offensive ogg oggvorbis openal opengl oss pam pdf pdflib perl pic png python quicktime readline real reiser4 reiserfs sdl shorten spell sqlite sse sse2 ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vidix vorbis win32codecs wxwindows xchat xine xml xml2 xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_lt userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LDFLAGS, PORTDIR_OVERLAY

the 2nd PC's # emerge --info

Portage 2.1_pre5-r3 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7 i686)
=================================================================
System uname: 2.6.15-gentoo-r7 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
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-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -pipe -Os -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -pipe -Os -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.dtiltas.lt/mirror/gentoo/              http://pandemonium.tiscali.de/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi alsa apm artworkextra asf audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cdb cdparanoia cdr chroot crypt curl dbus dri dv dvd dvdr dvdread eds emboss encode exif expat fam fat ffmpeg firefox flac foomaticdb fortran gd gdbm gif glut gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal howl idn imagemagick imlib irssi javascript jpeg lame lcms libg++ libwww live logrotate mad matroska mikmod mjpeg mmx mmxext mng motif mozilla mp3 mpeg mplayer nautilus ncurses network nls nptl nptlonly nsplugin ntfs numeric nvidia offensive ogg oggvorbis openal opengl oss pam pdf pdflib perl pic png python quicktime readline real reiser4 reiserfs sdl shorten spell sqlite sse sse2 ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vidix vorbis win32codecs wxwindows xchat xine xml xml2 xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY


Comment 19 Keri Harris gentoo-dev 2006-03-04 13:24:51 UTC
Created attachment 81345 [details, diff]
gprolog-1.2.19-noexecstack.patch

Thanks for the update Ernestas.

I've had a good look at gprolog's implementation of the Warren Abstract Machine. It does not use nested functions so ma2asm can append a .note.GNU-stack ELF section to the generated .s files. Find attached a patch that will do this on x86 and ppc architectures.

It should be noted that when gplc is ever used as a wrapper for 'as' then generated binaries will default to having executable stacks; '-A noexecstack' can be set as a assembler option to gplc if required.

You can ignore the last paragraph is you are only interested in using the prolog interpreter or using gplc to compile prolog programs. :)

Keri.
Comment 20 Keri Harris gentoo-dev 2006-03-04 13:27:06 UTC
Created attachment 81346 [details, diff]
gprolog-1.2.19-bootstrap.batch

This patch ensures that the bootstrap compiler is used to compile gplc and associated tools.
Comment 21 Keri Harris gentoo-dev 2006-03-04 13:31:07 UTC
Created attachment 81347 [details]
gprolog-1.2.19.ebuild

Updated ebuild to incorparate bootstrap and noexecstack patches.
Comment 22 Ernestas Liubarskij 2006-03-05 04:01:40 UTC
Now everything's OK. Thanks for the patches.
Comment 23 George Shapovalov (RETIRED) gentoo-dev 2006-03-20 06:08:43 UTC
bugs.g.o. seems to be responding again :), so on with the gprolog package.
However it still fails on amd64, although in a somewhat different place. Well, I'll have to do a full test later at home in 32bit chroot..

Right now I just wanted to point at his block of code in ebuild:

    if [[ $(gcc-major-version) == "4" ]] ; then
        append-flags "-O0"
    fi

    local myconf

    if [[ $(gcc-major-version) == "4" ]] ; then
        myconf="${myconf} --disable-fast-call"
    fi

There are two checks for exactly the same condition. Perhaps the "local myconf" can be moved above and both of them combined? This seemingly would produce the same effect. Otherwise the ebuild looks quite clean. I'll let you know how it tested on x86 a bit later.

George
Comment 24 George Shapovalov (RETIRED) gentoo-dev 2006-03-20 12:00:09 UTC
Builds fine in 32bit chroot, as before. You can add it now an close a slew of gprolog related bugs :). One last minor thing:
All the patchess that are applied end in .patch, while gprolog-1.2.19-bootstrap.batch ends in .batch. Is this on purpose or simple typo?

George
Comment 25 Keri Harris gentoo-dev 2006-03-21 02:54:09 UTC
Thanks for the comments george. I've tidied up the two checks for gcc-4.* into one, and correctly named the bootstapping patch. And I've committed this to cvs :)