caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] camomile question
@ 2013-11-18 15:51 Matej Kosik
  2013-11-18 16:21 ` Jacques-Pascal Deplaix
  0 siblings, 1 reply; 4+ messages in thread
From: Matej Kosik @ 2013-11-18 15:51 UTC (permalink / raw)
  To: OCaml

Hi,

When I took my native exectuable to a reasonably similar computer, albeit without Ocaml installation, I have noticed the following problem:

  ./main

     Fatal error: exception Failure("Cannot find camomile database directory,
     usually located here: '/usr/share/camomile/database'.
     Use environment variable CAMOMILE_DIR or CAMOMILE_DATADIR to locate it precisely.")

There are two solutions:
- sometimes I can install "libcamomile-ocaml-data" package
  (when I am lucky enough to have the root-access and when given package exists in a given distribution)
- or I can copy

    /usr/share/camomile

  from my system to the target system (somewhere) and set CAMOMILE_DIR on the target system to designate the root of the camomile directory.

Is there a way to compile my program so that the above problem would not arise at run-time?

Is it possible:

- to drop dependency on Camomile
  (if I do not need it -- the dependency was introduced by Batteries which I use)

if not, then:

- bundle that data with the executable? Is there an option for that?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] camomile question
  2013-11-18 15:51 [Caml-list] camomile question Matej Kosik
@ 2013-11-18 16:21 ` Jacques-Pascal Deplaix
  2013-11-18 16:31   ` Matthieu Dubuget
  0 siblings, 1 reply; 4+ messages in thread
From: Jacques-Pascal Deplaix @ 2013-11-18 16:21 UTC (permalink / raw)
  To: caml-list

Note that Batteries >= 2.0 doesn't depend anymore on Camomile.

On 11/18/2013 04:51 PM, Matej Kosik wrote:
> Hi,
>
> When I took my native exectuable to a reasonably similar computer, albeit without Ocaml installation, I have noticed the following problem:
>
>    ./main
>
>       Fatal error: exception Failure("Cannot find camomile database directory,
>       usually located here: '/usr/share/camomile/database'.
>       Use environment variable CAMOMILE_DIR or CAMOMILE_DATADIR to locate it precisely.")
>
> There are two solutions:
> - sometimes I can install "libcamomile-ocaml-data" package
>    (when I am lucky enough to have the root-access and when given package exists in a given distribution)
> - or I can copy
>
>      /usr/share/camomile
>
>    from my system to the target system (somewhere) and set CAMOMILE_DIR on the target system to designate the root of the camomile directory.
>
> Is there a way to compile my program so that the above problem would not arise at run-time?
>
> Is it possible:
>
> - to drop dependency on Camomile
>    (if I do not need it -- the dependency was introduced by Batteries which I use)
>
> if not, then:
>
> - bundle that data with the executable? Is there an option for that?
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] camomile question
  2013-11-18 16:21 ` Jacques-Pascal Deplaix
@ 2013-11-18 16:31   ` Matthieu Dubuget
  2013-11-18 16:44     ` Daniel Bünzli
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Dubuget @ 2013-11-18 16:31 UTC (permalink / raw)
  To: caml-list

Jacques-Pascal Deplaix (jp.deplaix@gmail.com) — 2013-11-18 17:21:19
> Note that Batteries >= 2.0 doesn't depend anymore on Camomile.

If you still need some more advanced unicode related functions, you'll
have to stay with camomile, and solve the problem of the needed
ressource files at run time.

You can also have a look at the string related module of ocamlnet:
according to the documentation
(http://projects.camlcity.org/projects/dl/ocamlnet-3.7.3/doc/html-main/Netconversion.html#linking)

`The lookup tables for the other encodings are usually loaded at
runtime, but it is also possible to embed them in the generated binary
executable. See the file |INSTALL| for details.`

Alas, I did not find anything in the |INSTALL| file.

Hoping this can help

Salutations

-- 
Matthieu Dubuget

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] camomile question
  2013-11-18 16:31   ` Matthieu Dubuget
@ 2013-11-18 16:44     ` Daniel Bünzli
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Bünzli @ 2013-11-18 16:44 UTC (permalink / raw)
  To: Matthieu Dubuget; +Cc: caml-list

Le lundi, 18 novembre 2013 à 17:31, Matthieu Dubuget a écrit :
> If you still need some more advanced unicode related functions, you'll
> have to stay with camomile, and solve the problem of the needed
> ressource files at run time.

If you are only looking for Unicode normalization you can also use Uunf [1] which embeds the needed data in the executable.  

Best,

Daniel

[1] http://erratique.ch/software/uunf



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-18 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 15:51 [Caml-list] camomile question Matej Kosik
2013-11-18 16:21 ` Jacques-Pascal Deplaix
2013-11-18 16:31   ` Matthieu Dubuget
2013-11-18 16:44     ` Daniel Bünzli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).