Version française
Home     About     Download     Resources     Contact us    
Browse thread
Native multithreaded LablGTK2?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julien Moutinho <julien.moutinho@g...>
Subject: Re: [Caml-list] Native multithreaded LablGTK2?
On Mon, Jul 30, 2007 at 10:22:17AM +0200, Kaspar Rohrer wrote:
> On 30.07.2007, at 07:40, Julien Moutinho wrote:
>
>> Check the META.lablgtk2 file:
>> $ ocamlfind query lablgtk2 -format "%A" -predicates native,mt
>> lablgtk.cmxa gtkThread.cmx
>>
>> If you get this, lablgtk2 is not likely to be guilty.
> Ok, I rechecked this: I think the lablgtk2 META file is the culprit:
> I'm using OpenGL. So if I add the lablGL predicate, I effectively get this:
>
> $ ocamlfind query lablgtk2 -format "%A" -predicates native,mt,lablGL
> lablgtk.cmxa lablgtkgl.cmxa lablglade.cmxa lablgnomecanvas.cmxa 
> lablgnomeui.cmxa lablpanel.cmxa gtkInit.cmx gtkThread.cmx gtkThread.cmx
>
> Which explains the error. But how would I fix this?

Perhaps, you can modify lablgtk2/META,
doing this:
	- archive(byte,mt) += "gtkThread.cmo"
	- archive(native,mt) += "gtkThread.cmx"
	+ archive(byte,mt,-lablGL) += "gtkThread.cmo"
	+ archive(native,mt,-lablGL) += "gtkThread.cmx"
or that:
	- archive(byte,lablGL,mt) += "gtkThread.cmo"
	- archive(native,lablGL,mt) += "gtkThread.cmx"
at your choice.

By the way, here are the METAS in Debian Sid:

	$ cat `ocamlc -where`/lablgtk2/META
	version="2.6.0"
	requires(mt) = "threads"
	requires(mt,mt_vm) = "threads.vm"
	requires(mt,mt_posix) = "threads.posix"
	directory="+lablgtk2"
	archive(byte) = "lablgtk.cma"
	archive(native) = "lablgtk.cmxa"
	archive(byte,mt) += "gtkThread.cmo"
	archive(native,mt) += "gtkThread.cmx"

	package "init" (
	  requires = "lablgtk2"
	  archive(byte) = "gtkInit.cmo"
	  archive(native) = "gtkInit.cmx"
	)

	package "glade" (
	  requires = "lablgtk2"
	  archive(byte) = "lablglade.cma"
	  archive(native) = "lablglade.cmxa"
	)

	package "gtkspell" (
	  requires = "lablgtk2"
	  archive(byte) = "lablgtkspell.cma"
	  archive(native) = "lablgtkspell.cmxa"
	)

	$ cat `ocamlc -where`/lablGL/META
	version="1.00"
	directory="+lablgl"
	archive(byte) = "lablgl.cma"
	archive(native) = "lablgl.cmxa"

	package "togl" (
	  requires = "labltk lablgl"
	  archive(byte) = "togl.cma"
	  archive(native) = "togl.cmxa"
	)

	package "glut" (
	  requires = "lablgl"
	  archive(byte) = "lablglut.cma"
	  archive(native) = "lablglut.cmxa"
	)

At first sight, they seem less comprehensive, but more accurate...