From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CBC47BC0A for ; Wed, 14 Feb 2007 01:31:50 +0100 (CET) Received: from smtp106.sbc.mail.re2.yahoo.com (smtp106.sbc.mail.re2.yahoo.com [68.142.229.99]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l1E0VmpE007751 for ; Wed, 14 Feb 2007 01:31:50 +0100 Received: (qmail 45870 invoked from network); 14 Feb 2007 00:31:48 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.182.109 with plain) by smtp106.sbc.mail.re2.yahoo.com with SMTP; 14 Feb 2007 00:31:47 -0000 X-YMail-OSG: H2ysgKcVM1kxRhrhD15Xuzs0AbddyzLCG1WZFQ7kRHo4lRMWay6N7kPneXMoc1Ylonp55LhPj.xDX72TFfdm9GZKSe6OOTzoB6KsMEzPC7Ap6rGYAiVEOU3fN4ZtmMZGtzkiszUMcKHAiXHUbj0o3ru2Cvg870HNqg-- Message-ID: <45D25864.2050307@rftp.com> Date: Tue, 13 Feb 2007 16:31:32 -0800 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070209 Mnenhy/0.7.4.0 SeaMonkey/1.5a MIME-Version: 1.0 To: Caml-list Subject: Re: [Caml-list] ocamlc vs ocamlc.opt? References: <45C11557.10704@rftp.com> <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com> In-Reply-To: <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45D25874.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlc:01 ocamlc:01 andrieu:01 bytecode:01 findlib:01 ocamlfind:01 lablgtk:01 -thread:01 threads:01 lablgtk:01 gtkinit:01 cmo:01 usr:01 lib:01 ocaml:01 Olivier Andrieu wrote: > Hi, > > On 1/31/07, Robert Roessler wrote: >> I just ran into a problem where building a bytecode executable failed >> with findlib ("ocamlfind ocamlc ...") but the equivalent non-findlib >> command worked. Then I saw that I could force the same error message >> in my non-findlib build by just matching findlib's ocamlc.opt, while I >> had used ocamlc. >> >> The command line is: >> ocamlc -o bait -I +lablgtk2 -I +lablscintilla -thread threads.cma >> lablgtk.cma gtkInit.cmo scintilla.cma bait.ml >> >> which works fine. Changing ocamlc to ocamlc.opt yields: >> Error on dynamically loaded library: >> /usr/lib/ocaml/stublibs/dlllablscintilla.so: undefined symbol: >> caml_names_of_builtin_cprim >> >> This is on FC6, with a Yum-installed OCaml 3.09.3 package. Both of >> the versions of the compiler identify themselves as 3.09.3 with the >> same standard library location, and both were built on Dec 2 of 2006. > > It might be an issue with the RPM packaging process : it must be > stripping an executable or a .so where it shouldn't. > > You should try with a manually compiled ocaml. All right. After getting back to this, I 1. removed all yum packages and rpms that were caml-related 2. built ocaml 3.09.3 from source - NO weirdness or errors 3. built lablgtk2 (September snapshot) from source - NO errors 4. built lablscintilla-0.9pre1 from source - NO errors I am STILL getting "Error on dynamically loaded library: /usr/lib/ocaml/stublibs/dlllablscintilla.so: undefined symbol: caml_names_of_builtin_cprim" if I use ocamlc.opt instead of ocamlc when I execute my compile ocamlc -o bait -I +lablgtk2 -I +lablscintilla -thread threads.cma lablgtk.cma gtkInit.cmo scintilla.cma bait.ml ocamlc functions flawlessly, ocamlc.opt yields the above error. Given "Compatibility with the bytecode compiler is extremely high: the same source code should run identically when compiled with ocamlc and ocamlopt." in Chapter 11 of the OCaml manual, I am really not expecting ocamlc and ocamlc.opt to function any differently. Choosing either of the commands from a cleanly built OCaml installation should be a matter of taste or personal preference, NOT correctness. What could be (or is likely to) be going wrong? Is it related to the gcc 4.11? I will note that I had difficulties with doing a source build of lablgtk2 WITH Aleksey Nogin's RPM of OCaml for FC6 (funny errors about "deprecated -mcpu switches)... but all of these went away after doing a local full build of OCaml 3.09.3. Robert Roessler roessler@rftp.com http://www.rftp.com