caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: Alain Frisch <alain@frisch.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Trying out Ocaml CVS HEAD
Date: Wed, 16 Apr 2008 22:23:40 +0100 (BST)	[thread overview]
Message-ID: <173750.43276.qm@web54605.mail.re2.yahoo.com> (raw)
In-Reply-To: <4805A2ED.7010606@frisch.fr>

> 
> I've been able to reproduce the problem in byte-code only, when the main 
> program is linked in -custom mode. The reason is that the -Wl,-E was not 
> passed to the linker. This is now fixed in the CVS. (For a quick test, 
> you can try to pass "-ccopt -Wl,-E" explicitly to ocamlc when linking.)
> 
> For the native-code, I don't know. Can you show me the command line 
> passed to the linker (ocamlopt -verbose)? You should see -Wl,-E.
> If you compile with -noautolink, you must add "-ccopt -Wl,-E" manually.
> 

Hi Alain,

Thanks for the help.  I have recompiled the Ocaml compiler using the latest
CVS, and bytecode now seems to work fine.  As for native code, I am still
having some problems.  There's a subset of modules that load fine, but
also one module that produces an error message when the main programme
attempts to load it.  As far as I can tell, what distinguishes this
problematic module from the ones that work fine is the fact that its cmxs
file is built from a large number of cmx files, whereas the cmxs from a
"good" module is built from a single cmx.

Here are the compiler lines that build the cmx and cmxs for a good module:
(note the "-dlcode" used to build the cmx and the "-dlcode -shared -linkall"
used to link the cmxs)

ocamlfind ocamlopt  -thread -package netstring,camlzip,sqlite3 -I ../lwt -I
../baselib -I ../http -I ../xmlp4 -I ../server -I ../extensions -I ../eliom 
-dlcode -c deflatemod.ml

ocamlfind ocamlopt  -thread -package netstring,camlzip,sqlite3 -I ../lwt -I
../baselib -I ../http -I ../xmlp4 -I ../server -I ../extensions -I ../eliom
-dlcode -shared -linkall -o deflatemod.cmxs deflatemod.cmx


The lines for the problematic module are (almost) identical, except that the
order of arguments is not the same, and the linking stage takes multiple cmx
arguments instead of just one:

ocamlfind ocamlopt -dlcode -verbose -thread -package netstring,cryptokit -I
../lwt -I ../baselib -I ../http -I ../xmlp4 -I
../server -I ../extensions -I ../eliom -shared -linkall -o eliom.cmxs \
        error_pages.cmx \
        eliommod_sessiongroups.cmx eliom_common.cmx \
        eliommod_gc.cmx eliommod_persess.cmx \
        eliommod_sessadmin.cmx eliommod_cookies.cmx  \
        eliommod_naservices.cmx eliommod_sersess.cmx eliommod_sessexpl.cmx \
        eliommod_datasess.cmx eliommod_pagegen.cmx \
        eliommod_services.cmx eliommod_timeouts.cmx \
        eliommod.cmx eliom_sessions.cmx \
        eliom_parameters.cmx eliom_services.cmx \
        eliom_mkforms.cmx eliom_mkreg.cmx eliom_predefmod.cmx \
        eliom_tools.cmx


As for the runtime error message, this is what is produced when the programme
attempts to load eliom.cmxs:

[errors.log] 2008-04-16 22:15:50 - Fatal - While loading
/home/dario/.local/lib/ocsigen/extensions/eliom.cmxs: Dynlink.Error: no
implementation available for Eliommod_persess

(note that Eliommod_persess.cmx is included in the list of modules that
are linked into eliom.cmxs)

Kind regards,
Dario Teixeira



      ___________________________________________________________ 
Yahoo! For Good helps you make a difference  

http://uk.promotions.yahoo.com/forgood/


  reply	other threads:[~2008-04-16 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 13:49 Dario Teixeira
2008-04-16  6:55 ` [Caml-list] " Alain Frisch
2008-04-16 21:23   ` Dario Teixeira [this message]
2008-04-17  8:28     ` Alain Frisch

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=173750.43276.qm@web54605.mail.re2.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=alain@frisch.fr \
    --cc=caml-list@yquem.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).