From: "Olivier Andrieu" <oandrieu@nerim.net>
To: "Basile STARYNKEVITCH" <basile@starynkevitch.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] mostly static ocaml binaries
Date: Fri, 25 May 2007 09:32:42 +0200 [thread overview]
Message-ID: <95513600705250032n4d6bef24vcac6a69e61f6a972@mail.gmail.com> (raw)
In-Reply-To: <464DCE27.9000705@starynkevitch.net>
Hi,
On 5/18/07, Basile STARYNKEVITCH <basile@starynkevitch.net> wrote:
> Dear All
>
> I would like to know how to make ocaml with mostly static binaries.
>
> My motivation is the following: I want to code some dynamic web site but
> my small hosting company provide only a very basic linux system. In
> particular even the /usr/lib/libpcre.so is not available.
>
> So I would like to develop an application which only has as dynamic
> library the very common ones like libc.so libm.so libdl.so and no much more.
>
> I know that the request is not very common, I am not familiar enough
> with Ocaml linking of C libraries ...
it's possible: when you're building the library, instead of specifying
the C library to link as -lpcre, specify the static lib directly, eg:
ocamlopt -a -o pcre.cmxa ... -cclib /usr/lib/libpcre.a
and then link your application as usual (and add the -verbose flag to
ocamlopt to check what's going on exactly).
If you don't want to re-build the caml pcre library, you could also
use the -noautolink flag I think:
ocamlopt -o my_app pcre.cmxa -noautolink -cclib /usr/lib/libpcre.a
my_app.cmx ...
HTH,
--
Olivier
prev parent reply other threads:[~2007-05-25 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 16:02 Basile STARYNKEVITCH
2007-05-18 16:47 ` [Caml-list] " Richard Jones
2007-05-25 7:32 ` Olivier Andrieu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95513600705250032n4d6bef24vcac6a69e61f6a972@mail.gmail.com \
--to=oandrieu@nerim.net \
--cc=basile@starynkevitch.net \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox