From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA26692; Mon, 14 Oct 2002 15:59:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA26378 for ; Mon, 14 Oct 2002 15:59:13 +0200 (MET DST) Received: from mons.uio.no (mons.uio.no [129.240.130.14]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9EDxC513639 for ; Mon, 14 Oct 2002 15:59:12 +0200 (MET DST) Received: from itherther.simula.no ([129.240.228.187]) by mons.uio.no with esmtp (Exim 2.12 #7) id 1815kU-0003lK-00 for caml-list@inria.fr; Mon, 14 Oct 2002 15:59:10 +0200 Received: from hans by itherther.simula.no with local (Exim 3.36 #1) id 1815kT-0001s5-00 for caml-list@inria.fr; Mon, 14 Oct 2002 15:59:09 +0200 To: caml-list@inria.fr Subject: [Caml-list] Problem with findlib and threads From: Hans Ole Rafaelsen Date: 14 Oct 2002 15:59:09 +0200 Message-ID: <3az4rbpm89e.fsf@itherther.simula.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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