To: lebotlan at beaune.inria.fr Cc: lablgtk at kaba.or.jp Subject: Re: Build and thread problem. In-Reply-To: <3CC961AF.2076EFF2 at beaune.inria.fr> References: <3CC961AF.2076EFF2 at beaune.inria.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20020427000319V.garrigue at kurims.kyoto-u.ac.jp> Date: Sat, 27 Apr 2002 00:03:19 +0900 From: Jacques Garrigue Lines: 58 From: Didier Le Botlan > 1 - Thread problem : > When I use 'Thread.create myfunction myarg', it takes from 30 seconds > to 1 minute for the launched thread to start. It is very likely to be > related to lablgtk since launching a thread in a simple test code not > using lablgtk takes a few milliseconds. If you create a thread in a callback, it will have to wait until the next iteration of GTK's main loop before starting. You can see how it work in works ing src/gtkThread.ml. Normally it should be almost immediate, but note that if there are lots of pending events, threads are only checked every 100 iterations. Still I cannot see how it can take up to 30 seconds! By the way, do you use bytecode threads of pthreads? I have done virtually no testing with bytecode threads. Also, you may try the camlirc application in lablgtk-2002025, since it uses threads, seemingly without problems. > I thought that upgrading lablgtk might be useful. There has been no change concerning threads for more than a year. > 2 - Multiple build problems. > > I tried 'lablgtk-20020225.tar.gz': > > 'make' works, but 'make opt' fails: > > 'make && make opt' produces > [compiling...] > ocamlopt -w s -c gtkArgv.ml > ocamlopt -w s -c gtkSignal.ml > The compiled interfaces gaux.cmi and gtkSignal.cmi > make inconsistent assumptions over interface Gaux This often means that the versions of your ocamlc and ocamlopt do not match. This can happen when compiling ocaml from CVS. > 'make clean && make opt' produces > [compiling...] > ocamlc -w s -c gToolbox.mli > ocamlc -w s -c gToolbox.ml > ./varcc gdk_tags.var > make[1]: ./varcc : Command not found. OK, one dependency is missing... But you just have to do 'make clean && make varcc opt'. And yes, it will recompile everything with ocamlc first, because lablgtk.cmxa depends on lablgtk.cma, the latter target being responsible for building C libraries too. This could be improved. Cheers, Jacques