From: Mark Shinwell <mshinwell@janestreet.com>
To: Andreea Costea <andre.costea@gmail.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] static linking
Date: Fri, 6 Jun 2014 18:33:51 +0100 [thread overview]
Message-ID: <CAM3Ki74ZdeKtgK0QN=wZqULjHzyVrh7a12RYdCTBSZTmkYL8gQ@mail.gmail.com> (raw)
In-Reply-To: <CADxQj2dH_biWDvDnrhho4paV7cf8tVWyepe0cLo9ujbTAJZKvA@mail.gmail.com>
On 6 June 2014 16:43, Andreea Costea <andre.costea@gmail.com> wrote:
> I'm trying to build a rather big system written in Ocaml, using ocamlbuild.
> I managed to set all the needed flags nicely, so that the resulted binaries
> can run on any Unix machine, independent on their Ocaml distribution.
> However, on certain machines I have problems with the compatibility between
> the C libraries. Hence, I tried using "-ccopt -static" for the -lflags and
> -cflags, respectively, in order to produce the desired statically linked
> binaries while building the project.
My advice would be to reconsider carefully why you want to statically
link. Read this:
http://www.akkadia.org/drepper/no_static_linking.html
The most important point is: if you're using a glibc or eglibc-based
system, you should not statically link the C library. (The advice is
probably similar for other platforms.)
You don't say exactly which libraries are causing the compatibility
problems, but if it is indeed glibc, then one solution might be to
spin up some virtual machines to use when you need to build your
system against older versions.
Mark
next prev parent reply other threads:[~2014-06-06 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 15:43 Andreea Costea
2014-06-06 16:14 ` Török Edwin
2014-06-06 17:33 ` Mark Shinwell [this message]
2014-06-06 20:24 ` Gerd Stolpmann
2014-06-07 9:55 ` Andreea Costea
-- strict thread matches above, loose matches on Subject: below --
2005-11-09 17:14 Static linking Maurizio Colucci
2005-11-09 17:28 ` [Caml-list] " Basile STARYNKEVITCH
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='CAM3Ki74ZdeKtgK0QN=wZqULjHzyVrh7a12RYdCTBSZTmkYL8gQ@mail.gmail.com' \
--to=mshinwell@janestreet.com \
--cc=andre.costea@gmail.com \
--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