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=1.2 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 1E2DABC0B for ; Fri, 2 Feb 2007 23:51:41 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l12MpeOx007745 for ; Fri, 2 Feb 2007 23:51:40 +0100 Received: by ug-out-1314.google.com with SMTP id k3so855329ugf for ; Fri, 02 Feb 2007 14:51:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=FpKoh4H/VqlckcBF5TyDC7pWsoXhcBgEUFYkB2ZdNXVtkpYA9zYe3NA5fJoU8ZhqCF9PYMNevOQycnn6oYeubcxGhoKbhXljh3d3eP5mFnAwO5V+6aSXO6dKKA3pFLa5r3dffQzetUKzlQIoNVXNqJgPVLwiAxy/fde69c7xfkA= Received: by 10.78.166.7 with SMTP id o7mr873196hue.1170456700125; Fri, 02 Feb 2007 14:51:40 -0800 (PST) Received: by 10.78.198.12 with HTTP; Fri, 2 Feb 2007 14:51:40 -0800 (PST) Message-ID: Date: Fri, 2 Feb 2007 14:51:40 -0800 From: "Nathaniel Gray" To: "Robert Roessler" Subject: Undefined symbols error (Was: ocamlc vs ocamlc.opt?) Cc: Caml-list MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 45C3C07C.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45C3C07C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlc:01 ocamlc: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 stublibs:01 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. > > So should the versions of ocamlc behave the same excepting performance > issues, or ? I'm getting this error on a g++ build step: g++ -L/sw/lib/ -o dlllablscintilla.so ml_scintilla.o liblablscintilla.a "/usr/local/godi/lib/ocaml/std-lib"/libcamlrun.a "/usr/local/godi/lib/ocaml/std-lib"/lablgtk2/liblablgtk2.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpango-1.0 -lfreetype.6 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lgthread-2.0 /usr/bin/ld: Undefined symbols: _caml_names_of_builtin_cprim _caml_builtin_cprim It may or may not be a coincidence, but I'm trying to build your lablscintilla package. This is on OS X 10.4 with godi-installed OCaml 3.09.3. FWIW, these symbol references appear to come from libcamlrun.a. They don't appear in libasmrun. [n8gray@golux n8gray]$ nm -a /usr/local/godi/lib/ocaml/std-lib/libcamlrun.a | grep builtin_cprim U _caml_names_of_builtin_cprim U _caml_builtin_cprim U _caml_names_of_builtin_cprim [n8gray@golux n8gray]$ nm -a /usr/local/godi/lib/ocaml/std-lib/libasmrun.a | grep builtin_cprim Building the native-code version works fine. Cheers, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu -->