From: Christophe Troestler <Christophe.Troestler@umons.ac.be>
To: Olaf Hering <olaf@aepfle.de>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] OASIS help: link stublib to system lib and another caml lib
Date: Thu, 26 May 2016 22:58:54 +0200 [thread overview]
Message-ID: <87twhkk035.fsf@poincare3.umons.ac.be> (raw)
In-Reply-To: <20160526201110.GA14443@aepfle.de>
Hi,
On 2016-05-26, Olaf Hering wrote:
>
> But I can not figure out a generic way to link against -lcamlidl. This
> package is in $libdir/ocaml, so I would have to exent CCLib: with
> something like '-L $libdir/ocaml -lcamlidl'. This works if I force it
> to be '-L/usr/lib64/ocaml -lcamlidl' for a 64bit build. But this would
> break for 32bit builds.
> [...]
> Library Fuse
> Path: lib
> BuildDepends: unix, threads, bigarray, camlidl
> FindlibName: Fuse
> Modules: Fuse, Fuse_bindings, Fuse_lib, Result, Unix_util
> CSources: Fuse_util.c, Unix_util_stubs.c,
> Fuse_bindings_stubs.c, Fuse_bindings.h
> CCOpt: -g -O2 -fPIC -DPIC -w
> CCLib: -lfuse -L/usr/lib64/ocaml -lcamlidl
"-lfuse" is needed because it is the library you bind to but
"-L/usr/lib64/ocaml -lcamlidl" should be handled by "camlidl"
(specifically by `ocamlfind query camlidl`/com.cma).
Otherwise, if you have a way of detecting the right path, you can add
some code in setup.ml that define a variable (that will end up in
setup.data) and get its value back in myocamlbuild.ml to add some flags.
See the following example that detects the path to give to clang so that
it links the gfortran library:
https://github.com/Chris00/ocaml-odepack/blob/master/setup.ml#L68
https://github.com/Chris00/ocaml-odepack/blob/master/myocamlbuild.ml#L7
https://github.com/Chris00/ocaml-odepack/blob/master/myocamlbuild.ml#L36
If you have time to distill this example into some generic instructions
and submit a PR, that would be nice. https://github.com/ocaml/oasis
Best,
C.
next prev parent reply other threads:[~2016-05-26 20:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 20:11 Olaf Hering
2016-05-26 20:58 ` Christophe Troestler [this message]
2016-05-27 8:14 ` Olaf Hering
2016-05-27 23:22 ` Christophe Troestler
2016-06-01 16:25 ` Olaf Hering
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=87twhkk035.fsf@poincare3.umons.ac.be \
--to=christophe.troestler@umons.ac.be \
--cc=caml-list@inria.fr \
--cc=olaf@aepfle.de \
/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