Dear ciao-users, we have realised that some versions of gcc (in particular, gcc2.96, which is shipped with at least Red Hat 7.1), seem to produce incorrect code for Ciao Prolog. This can be tested simply by issuing the query
?- X = 1.0.
at the toplevel. If the answer comes wrong, then you have been hit.
I found the problem on my Redhat 7.1 Linux on an Athlon system, with ciao1.6p1. Together with gcc 2.96, kgcc (which is gcc 2.91.66) is shipped with that distribution to be used for kernel compilation, since gcc 2.96 causes many known problems if used for that purpose. I compiled ciao with kgcc, leaving the optimization level at "optimized", and everything seems to work fine (or at least it passes the "X=1.0." test :) ). To compile with kgcc instead of gcc, simply edit the makefile-sysdep/mkf-LINUXi86 file, substituting "kgcc" to "gcc" in the lines beginning with "CC=" and "LD="
Regards,
Marco
Marco Alberti wrote:
Together with gcc 2.96, kgcc (which is gcc 2.91.66) is shipped with that distribution to be used for kernel compilation,
Many thanks, Marco. These problems will hopefully go away with the upcoming release of gcc 3.0 (scheduled to be released on June 15th, IIRC). We have filed a bug to the gcc development team.
However, I tried to locate kgcc in my 7.1 box, and it is not installed. Do you remember which package is it bundled with?
Many thanks,
MCL & The Ciao Prolog Development Mob