caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hans Ole Rafaelsen <hans@simula.no>
To: caml-list@inria.fr
Subject: [Caml-list] Problem with findlib and threads
Date: 14 Oct 2002 15:59:09 +0200	[thread overview]
Message-ID: <3az4rbpm89e.fsf@itherther.simula.no> (raw)

Hello,

I'm having trouble linking a library which uses threads, using
ocamlfind.  The library I'm having trouble with, is the xmlrpc
library.  (I have added a module which handles xmlrpc requests, and
this module uses threads.)

ocamlfind ocamlopt -linkpkg  -package "stew xmlrpc threads" -o server.opt   application_impl.cmx application_skeleton.cmx main_server.cmx
No implementations provided for the following modules:
  Thread referenced from /usr/local//lib/ocaml/site-lib/xmlrpc/xmlrpc.cmxa(XmlRPCServer)

If I remove threads form the package list, I get the same error,

ocamlfind ocamlopt -linkpkg  -package "stew xmlrpc" -o server.opt   application_impl.cmx application_skeleton.cmx main_server.cmx
No implementations provided for the following modules:
Thread referenced from
/usr/local//lib/ocaml/site-lib/xmlrpc/xmlrpc.cmxa(XmlRPCServer)

but removing another package, results in errors related to modules
defined in that package, and which is what you would expect.

ocamlfind ocamlopt -linkpkg  -package "xmlrpc threads" -o server.opt   application_impl.cmx application_skeleton.cmx main_server.cmx
No implementations provided for the following modules:
  Time referenced from /usr/local//lib/ocaml/site-lib/xmlrpc/xmlrpc.cmxa(XmlRPCServer)
  Thread referenced from /usr/local//lib/ocaml/site-lib/xmlrpc/xmlrpc.cmxa(XmlRPCServer)

Thus, it seems that trying to link with the threads library have no
effect.

I have a similar problem with the byte-code version, but I was able to
get round the problem by linking in the thread library while linking
the xmlrpc library.

ocamlfind ocamlc -cclib '-lstew' -thread -package "xstr threads netclient netstring equeue pxp pcre stew " -a -o xmlrpc.cma \
        -predicates "" threads.cma xmlRPCTypes.cmo xmlRPCDtd.cmo
xmlRPCNet.cmo xmlRPCClient.cmo xmlRPCServerMethods.cmo
xmlRPCServer.cmo

This is probably not the right way to do this, and trying the same
approach with the native-code version does not work.

ocamlfind ocamlopt -cclib '-lstew' -thread -package "xstr threads netclient netstring equeue pxp pcre stew " -a  -o xmlrpc.cmxa \
        -predicates "" threads.cmxa xmlRPCTypes.cmx xmlRPCDtd.cmx xmlRPCNet.cmx xmlRPCClient.cmx xmlRPCServerMethods.cmx xmlRPCServer.cmx  
/usr/local//lib/ocaml//threads/threads.cmxa
is not a compilation unit description.


I'm able to use native-threads if I don't compile it as a library, but
makes the module XmlRPCServer part of the test application I'm
creating.  So I would guess the problem is not that I have
native-threads incorrectly installed.

I'm runing debian-3 stable.  ocaml 3.06 compiled form sources, with
thread support.


Any suggestions on that I might be doing wrong?

Kindest regards,

Hans Ole Rafaelsen
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2002-10-14 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-14 13:59 Hans Ole Rafaelsen [this message]
2002-10-14 21:59 ` Gerd Stolpmann
2002-10-15  8:08   ` Hans Ole Rafaelsen

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=3az4rbpm89e.fsf@itherther.simula.no \
    --to=hans@simula.no \
    --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).