Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <Basile.Starynkevitch@wanadoo.fr>
To: Fabrice Le Fessant <fabrice.le_fessant@inria.fr>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Warning: gcc -O2 bad for compiling Ocaml
Date: Wed, 26 Apr 2000 10:48:51 +0200 (MEST)	[thread overview]
Message-ID: <14598.44403.723357.141282@amadeus.lesours.fr> (raw)

Hello All,

I compiled ocaml-2.99+18 (2000-04-14, from CVS). But I wanted to get a
little faster runtime (compiled with gcc-2.95.2 on a Linux Suse6.2
-glibc2- AMDK6 PC, my home machine). So I edited manually
config/Makefile to add -O2 at end of BYTECCCOMPOPTS and
NATIVECCCOMPOPTS.

This seems to work ok for Ocaml proper (make bootstrap runs ok, as
do make opt, make ocamlopt.opt etc...). 

But I tried to compile Fabrice Le Fessant latest patched efun editor 
"http://pauillac.inria.fr/efuns/ftp/efuns-017+1.src.tar.gz"

This does not work (in efuns/efuns, make opt fails), ending with:

ocamlopt.opt  -I ../ocamlsrc -I ../dynlink -I ../toolkit -I ../concur -I /h1/basile/ltmp/efuns/xlib -I /h1/basile/ltmp/efuns/common -c ebuffer.ml
The compiled interfaces keymap.cmi and ebuffer.cmi
make inconsistent assumptions over interface Efuns
make[1]: *** [ebuffer.cmx] Erreur 2

This is repeatable on other systems.

I thought there was a bug in Ocaml or Efuns. The bug was mine:

   DO NOT COMPILE OCAML WITH gcc -O2

(the same bug appears with other optimizations such as -Os or
-fomit-frame-ponter)


My public apologies to Fabrice (Le Fessant) and Xavier (Leroy) for
having lost their time.

I suggest adding in Ocaml INSTALL file the following line of advice:

  Warning: do not compile the Ocaml system with any other optimisation
  that gcc -O. On somes occasions, compiling Ocaml with gcc -O2 produces
  a buggy compiler or runtime.

################ résumé francais:

Il faut éviter de compiler l'environement OCaml avec gcc -O2 (ou toute
autre optimisation que -O). Dans certains cas, cela produit un
compilateur ou un système d'exécution incorrect.

Mes excuses publiques pour avoir fait perdre leur temps à Fabrice (Le
Fessant) and Xavier (Leroy) à ce propos.

################


-- 
Basile STARYNKEVITCH - 8 rue de la Faiencerie, 92340 BOURG LA REINE (France)
tel 01.46.65.45.53. email = basile point starynkevitch at wanadoo point fr
http://perso.wanadoo.fr/starynkevitch/basile 
antispam: <abuse@wanadoo.fr>




                 reply	other threads:[~2000-04-26 13:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14598.44403.723357.141282@amadeus.lesours.fr \
    --to=basile.starynkevitch@wanadoo.fr \
    --cc=caml-list@inria.fr \
    --cc=fabrice.le_fessant@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox