English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-23 (07:37)
From: David McClain <dbm@r...>
Subject: Threads?

It's been about 5 years since I faced this situation. I'm trying to  
link my program against the Thread module. Things go well until I do  
the ocamlopt compilation, then it aborts the make with the message:

ocamlfind ocamlopt -thread -o sdsp.opt   -package camlp4 -package  
threads -package unix -I ../src -I /usr/local/lib/ocaml/threads  \
	-thread -cclib threads.a  nums.cmxa sdsp.cmxa threads/threads.cmxa   \
	 readline.cmx scmMain.cmx

File "_none_", line 1, characters 0-1:
Error: No implementations provided for the following modules:
          Thread referenced from ../src/sdsp.cmxa(SdlPrims)
make[1]: *** [sdsp.opt] Error 2
make: *** [subdirs] Error 2

Forgive the excessive number of -thread flags in there... this has  
been trial and error.

I understand that it can't seem to find a .ml file to go along with  
the thread.mli, because there isn't one provided by the distribution.  
I also understand that the functionality of the thread module is made  
up largely of the posix threads C-code in the otherlibs directory.  
Somehow the system needs to be coaxed to look into the threads  
subdirectory in the lib/ocaml folder, but I am at wits end at this  

This make is proceeding on Mac OS X 10.4

I'm sure it is possible to do this, because I have an ancient  
(unreadable) make script that does so for another system. Surely  
there is a very simple solution here, short of my inventing an entire  
Makefile script for this project. Eh?

Thanks in advance...

Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com