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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 90615BC0A for ; Sat, 3 Feb 2007 10:13:22 +0100 (CET) Received: from smtp105.sbc.mail.mud.yahoo.com (smtp105.sbc.mail.mud.yahoo.com [68.142.198.204]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l139DJ6M032328 for ; Sat, 3 Feb 2007 10:13:22 +0100 Received: (qmail 35338 invoked from network); 3 Feb 2007 09:13:19 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.187.64 with plain) by smtp105.sbc.mail.mud.yahoo.com with SMTP; 3 Feb 2007 09:13:19 -0000 X-YMail-OSG: esMh_U8VM1nQO27ED10z6_1Y7lO7SrF6HJXVcCKobs4.7FAgN8M8WSu8Yg6E7SQzy.xGVyLiN8WqG7gQ6ze9m5h9rVhL5wZAcqHdyyLzRa9BhrQMPU7RJrb2VK_CMuYOzIZwsYod.mtKPfw- Message-ID: <45C45229.5030208@rftp.com> Date: Sat, 03 Feb 2007 01:13:13 -0800 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070201 Mnenhy/0.7.4.0 SeaMonkey/1.5a MIME-Version: 1.0 To: Caml-list Subject: Re: [Caml-list] Undefined symbols error (Was: ocamlc vs ocamlc.opt?) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45C4522F.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 Nathaniel Gray wrote: > 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: I am more inclined to believe that there is something weird about the ocamlc.opt build or packaging in the FC6 Yum repo, since my problem clears up if I keep what I am trying to build constant and just change which version of the OCaml compiler I invoke. > 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. And libcamlrun.a is sitting right there on the command line - or at least an instance of this library is... OTOH, are you sure you want to build the DLL this way? I build the static lib with libasmrun, but supply the ocamlrun lib to the DLL build. Check the lib$(PACKAGE).$(A) and dll$(PACKAGE).$(SO) targets in the Makefile. > [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. So you had to build on the platform I can't test on. ;) When you get something going, I would like to integrate it into my Makefile as the "macosx" case. Robert Roessler roessler@rftp.com http://www.rftp.com