From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA26121 for caml-redist; Wed, 26 Apr 2000 15:37:27 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA20419 for ; Wed, 26 Apr 2000 10:51:48 +0200 (MET DST) Received: from apeiba.wanadoo.fr (smtp-rt-2.wanadoo.fr [193.252.19.154]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id KAA09371; Wed, 26 Apr 2000 10:51:46 +0200 (MET DST) Received: from amyris.wanadoo.fr (193.252.19.150) by apeiba.wanadoo.fr; 26 Apr 2000 10:50:11 +0200 Received: from amadeus.lesours.fr (164.138.134.74) by amyris.wanadoo.fr; 26 Apr 2000 10:49:51 +0200 Received: by amadeus.lesours.fr (Postfix, from userid 12752) id 011625F7A1; Wed, 26 Apr 2000 10:48:51 +0200 (MEST) From: Basile STARYNKEVITCH MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <14598.44403.723357.141282@amadeus.lesours.fr> Date: Wed, 26 Apr 2000 10:48:51 +0200 (MEST) To: Fabrice Le Fessant To: Xavier Leroy Cc: caml-list@inria.fr Subject: Warning: gcc -O2 bad for compiling Ocaml X-Mailer: VM 6.75 under 21.1 (patch 9) "Canyonlands" XEmacs Lucid Sender: weis 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: