* ocamlc vs ocamlc.opt?
@ 2007-01-31 22:16 Robert Roessler
2007-02-03 0:21 ` [Caml-list] " Aleksey Nogin
[not found] ` <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Robert Roessler @ 2007-01-31 22:16 UTC (permalink / raw)
To: Caml-list
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 ?
Robert Roessler
roessler@rftp.com
http://www.rftp.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocamlc vs ocamlc.opt?
2007-01-31 22:16 ocamlc vs ocamlc.opt? Robert Roessler
@ 2007-02-03 0:21 ` Aleksey Nogin
2007-02-03 8:56 ` Robert Roessler
[not found] ` <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Aleksey Nogin @ 2007-02-03 0:21 UTC (permalink / raw)
To: Robert Roessler; +Cc: Caml List
On 31.01.2007 14:16, 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's possible that there was some problem with how it was compiled. Feel
free to try my RPM from
http://rpm.nogin.org/MetaPRL/fc6/ocaml-3.09.3-1.rhfc6.i386.html (you
should be able to use http://rpmbin.nogin.org/MetaPRL/fedora-6/ in yum,
with http://rpmbin.nogin.org/GPG-PUBKEY.txt key, if you prefer
installing via yum).
Aleksey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocamlc vs ocamlc.opt?
2007-02-03 0:21 ` [Caml-list] " Aleksey Nogin
@ 2007-02-03 8:56 ` Robert Roessler
0 siblings, 0 replies; 5+ messages in thread
From: Robert Roessler @ 2007-02-03 8:56 UTC (permalink / raw)
To: Caml List
Aleksey Nogin wrote:
> On 31.01.2007 14:16, 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's possible that there was some problem with how it was compiled. Feel
> free to try my RPM from
> http://rpm.nogin.org/MetaPRL/fc6/ocaml-3.09.3-1.rhfc6.i386.html (you
> should be able to use http://rpmbin.nogin.org/MetaPRL/fedora-6/ in yum,
> with http://rpmbin.nogin.org/GPG-PUBKEY.txt key, if you prefer
> installing via yum).
Thanks - that is actually what I have been working on doing (I was
trying to get this far so I had something to reply to Olivier's and
now your suggestion)... ;)
Your package is the "gold standard" for Linux builds of OCaml, AFAICT.
But things are not quite as smooth as they could be - since Zod comes
with all this Yum[my goodness], I was trying to stick with it... which
is why I had it go ahead and install the "3.09.3" packages it said it
had in its repo, along with the offered lablgtk (I removed both of these).
Next I had difficulties with the key file you suggest, when I tried to
do an "rpm --install" with the key file... rpm would just appear to
hang with the key file as an argument after the --install.
So I just said (^*%^^%%^ and did an rpm -iv with your rpm sitting
around locally, which worked fine. Of course, Yum now shows it as
being installed, but is unable to reinstall lablgtk because it says
that it is unable to satisfy the "3.09.3" requirement. Sigh.
So much for the brave new world of automated package management. I
will just go ahead now and do a source build of lablgtk, which I know
to be easy (at least on Windows). ;)
Robert Roessler
roessler@rftp.com
http://www.rftp.com
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>]
* Re: [Caml-list] ocamlc vs ocamlc.opt?
[not found] ` <95513600702010017y2f4ab9eex18b2fa3a52c987e@mail.gmail.com>
@ 2007-02-14 0:31 ` Robert Roessler
2007-02-14 10:15 ` Robert Roessler
0 siblings, 1 reply; 5+ messages in thread
From: Robert Roessler @ 2007-02-14 0:31 UTC (permalink / raw)
To: Caml-list
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocamlc vs ocamlc.opt?
2007-02-14 0:31 ` Robert Roessler
@ 2007-02-14 10:15 ` Robert Roessler
0 siblings, 0 replies; 5+ messages in thread
From: Robert Roessler @ 2007-02-14 10:15 UTC (permalink / raw)
To: Caml-list
Robert Roessler wrote:
> ...
> 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.
I performed further tests and gathered more data on this. I verified
that the cmo and cmi files produced by the two versions of ocamlc are
identical - they are (well, at least their md5 hashes are). So this
would suggest that it is not the COMPILE portions of the two ocamlc
versions that are causing this - which leaves how the BYTECODE-mode
executable is produced.
Covering even more bases, I pulled the CVS version of the OCaml source
tree and built it on the target FC6/gcc 4.1.1 box... NO change.
Again, what IS the difference in operation between the two versions of
ocamlc, one built as a BYTECODE executable, the other built NATIVE?
Robert Roessler
roessler@rftp.com
http://www.rftp.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-14 10:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 22:16 ocamlc vs ocamlc.opt? 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
2007-02-14 10:15 ` Robert Roessler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox