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
Findlib: subpackage parent package semantics
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-05-31 (17:46)
From: Chris Campbell <cyberdanx@g...>
Subject: Findlib: subpackage parent package semantics

I noticed a problem when using ocamlconf to build some executables which 
depend on subpackages and am wondering why Findlib behaves as it does. It 
appears that for subpackages where no version is explicitly specified using 
Findlib.package_property [] ... "version" ... does not return the version of 
the parent package. This cause ocamlconf to choke on the Not_found exception 
which relates to package properties.

For example, the META file for lablgl on this Debian (Kubunutu) box is as 

danx@arwen:~$ more /usr/lib/ocaml/3.08/lablgl/META
archive(byte) = "lablgl.cma"
archive(native) = "lablgl.cmxa"

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

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

but the glut subpackage doesn't "inherit" the parents' (lablgl) version. i.e. 
Findlib.package_property [] "lablgl.glut" "version" ... results in a 
Not_found exception.

Before I send off a quick patch to the ocamlconf developer handling this, is 
the behaviour of Findlib a "bug" or the desired semantics?


p.s. should findlib problems be reported on the godi list? I looked for an 
email address for problems relating to findlib but couldn't find one (though 
perhaps I didn't look long enough).