caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Robert Roessler <roessler@rftp.com>
To: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlc vs ocamlc.opt?
Date: Tue, 13 Feb 2007 16:31:32 -0800	[thread overview]
Message-ID: <45D25864.2050307@rftp.com> (raw)
In-Reply-To: <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>

Olivier Andrieu wrote:
> Hi,
> 
> On 1/31/07, Robert Roessler <roessler@rftp.com> 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


  parent reply	other threads:[~2007-02-14  0:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 22:16 Robert Roessler
2007-02-03  0:21 ` [Caml-list] " Aleksey Nogin
2007-02-03  8:56   ` Robert Roessler
     [not found] ` <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>
2007-02-14  0:31   ` Robert Roessler [this message]
2007-02-14 10:15     ` Robert Roessler

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=45D25864.2050307@rftp.com \
    --to=roessler@rftp.com \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).