Version française
Home     About     Download     Resources     Contact us    
Browse thread
Batteries and portability
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Edgar Friendly <thelema314@g...>
Subject: Re: [Caml-list] Batteries and portability
Tiphaine Turpin wrote:
> Dear list,
> 
> When trying to execute a compiled program on another machine, I get the
> following error:
> 
> Fatal error: exception
> Sys_error("/usr/share/camomile/database/general_category.mar: No such
> file or directory")
> 
> I don't think I'm using camomille and I'm not compiling with -linkall,
> however linking takes a lot of time in my opinion (~15 seconds for about
> 2000loc). Is it the expected behavior of batteries to always expect this
> file (and maybe others) to be present ?
> 
> 
> Tiphaine
> 
Batteries uses camomile (one L) for its UTF8 ropes.  It is the expected
behavior for it to load those files on startup even if one doesn't use
ropes.  We'd love for this kind of thing to be optimized out by the
compiler, but this might be one case where the compiler can't tell
whether the side-effects of module initialization (reading from files)
can be elided.

If someone has a solution for this, we'd love to solve this problem in a
not-too-hackish way, but I worry that a non-camomile build of batteries
is the only way to eliminate this dependency.  Of course it's possible
to depend on files stored elsewhere, but camomile is quite set up to use
external files for its unicode conversion tables.

E