caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OASIS help: link stublib to system lib and another caml lib
Date: Fri, 27 May 2016 10:14:29 +0200	[thread overview]
Message-ID: <20160527081429.GA18793@gmail.com> (raw)
In-Reply-To: <87twhkk035.fsf@poincare3.umons.ac.be>

On Thu, May 26, Christophe Troestler wrote:

> "-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).

Are you saying that something should automatically generate and pass the
-L option to the compiler with the provided _oasis file? For me nothing
like that happens if I add just '-lfuse -lcamlidl' to CcOpt:
execve("/usr/bin/gcc", ["gcc", "-shared", "-o", "lib/dllFuse_stubs.so",
"lib/Fuse_util.o", "lib/Unix_util_stubs.o", "lib/Fuse_bindings_stubs.o",
"-lfuse", "-lcamlidl"]

For the time being my workaround is to use '-L/usr/lib64/ocaml
-L/usr/lib/ocaml' which appearently fixes 32 and 64bit builds.

To me it looks like "OCamlbuild additional flags:" needs to be set.
Is there a way to pass this via 'ocaml setup.ml -configure'?

> 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

I think thats a very bad advice. Are you suggesting to ignore the 'DO
NOT EDIT' of each generated setup.ml? Being able to regenerate the files
required for building from scratch is essential.

Olaf

  reply	other threads:[~2016-05-27  8:14 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
2016-05-27  8:14   ` Olaf Hering [this message]
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=20160527081429.GA18793@gmail.com \
    --to=olaf@aepfle.de \
    --cc=Christophe.Troestler@umons.ac.be \
    --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;
as well as URLs for NNTP newsgroup(s).