[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

advice need on how to avoid -custom



I'd like to avoid building approx with the deprecated -custom flag on
bytecode-only platforms, but I don't know how to make it work.

The problem is that approx uses libraries with C stubs, like
pcre-ocaml.  In the native code case, it build-depends on
libpcre-ocaml-dev.  The resulting package depends on libpcre3 (picked
up automatically by the shlibs machinery), but it doesn't depend on
any OCaml libraries.

In the bytecode case, if I don't specify -custom, then the user needs
to have the libpcre-ocaml library installed; otherwise the program
will fail with 
    Fatal error: cannot load shared library dllpcre_stubs

I only see a couple of solutions:

1. Always depend on the runtime versions of the OCaml libraries that I
build-depend on.  This is "safe", but results in a bloated install on
native code archs.

2. Figure out "by hand" which OCaml libraries need to be installed for
their runtime DLLs, and use conditional Makefile hackery to add them
to the Depends on bytecode-only archs.  This is "optimal" but very
error-prone.

3. Find or write an automated tool to accomplish (2).

Am I missing anything?

-- 
Eric Cooper             e c c @ c m u . e d u


Reply to: