You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 325 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
I had trouble getting ocaml 3.01 compiled on my system.
The compiler is gcc 2.7.2.3, the CPU is Pentium II.
[hanauma] 109 > gdb boot/ocamlrun ocamlrun.core
GNU gdb 4.18
(gdb) backtrace
#0 0x804b0f2 in copy_double ()
#1 0x804b84e in float_of_bytes ()
#2 0x805382c in interprete ()
#3 0x8054c98 in caml_main ()
#4 0x8049377 in main ()
#5 0x8049309 in _start ()
Then I restored the last couple of lines from
ocaml-3.00/byterun/floats.c:
/* The init_ieee_float function should initialize floating-point hardware
so that it behaves as much as possible like the IEEE standard.
In particular, return special numbers like Infinity and NaN instead
of signalling exceptions. So far, only the Intel 386 under
FreeBSD is not in IEEE mode at program startup. */
#ifdef __i386__
#ifdef __FreeBSD__
#include <floatingpoint.h>
#endif
#endif
void init_ieee_floats(void)
{
#ifdef __i386__
#ifdef __FreeBSD__
fpsetmask(0);
#endif
#endif
}
This change works for me and the compiler bootstraps successfully.
-Peter
The text was updated successfully, but these errors were encountered:
I had trouble getting ocaml 3.01 compiled on my system.
The compiler is gcc 2.7.2.3, the CPU is Pentium II.
Then I restored the last couple of lines from
ocaml-3.00/byterun/floats.c:
Hi Peter,
You have done the right thing, but Xavier also solved this problem in
a more fundamental way. See #2706.
Thank you for informing us that it also happens on 3.x, since I had wrong
information that it had been solved with 3.1R.
FreeBSD since 4.0R masks floating point exceptions, and ocaml-3.01 compiles
ok there. Upgrading to 4.2R (or 4.3R very soon) is a good idea anyway.
Then I restored the last couple of lines from
ocaml-3.00/byterun/floats.c:
This change works for me and the compiler bootstraps successfully.
Yes, I wrongly assumed that all versions of FreeBSD in current use
were already in "non trapping" floating-point mode at start-up.
You and Jacques Garrigue proved me wrong.
In the working sources, Jacques resurrected the IEEE initialization
for FreeBSD, and I also made sure that the initialization of the
standard library no longer causes special numbers (infinities, NaN) to
be loaded by the floating-point unit. So, this problem should be
fixed for good.
Original bug ID: 325
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
I had trouble getting ocaml 3.01 compiled on my system.
The compiler is gcc 2.7.2.3, the CPU is Pentium II.
After
./configure -prefix /home/proglang/packages/ocaml-3.01 -tkdefs
"-I/usr/local/include/tcl8.0 -I/usr/local/include/tk8.0" -tklibs
"-L/usr/local/lib -ltcl80 -ltk80"
the
make world
grinds to a stop when it tries to run the bytecode interpreter for the
first time:
Running it by hand yields
I looked at the core with gdb
Then I restored the last couple of lines from
ocaml-3.00/byterun/floats.c:
This change works for me and the compiler bootstraps successfully.
-Peter
The text was updated successfully, but these errors were encountered: