caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: caml-list@inria.fr
Subject: [Caml-list] OASIS help: link stublib to system lib and another caml lib
Date: Thu, 26 May 2016 22:11:10 +0200	[thread overview]
Message-ID: <20160526201110.GA14443@aepfle.de> (raw)

The ocaml-fuse package as is does not build for bytecode target. I
updated the _oasis file as shown below and everything worked great. But
when feeding the resulting package to google-drive-ocamlfuse I got link
errors because ocaml-fuse was not linked to -lfuse and -lcamlidl. I
figured out how to link to fuse, its in $libdir so the compiler picks it
up.

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.

Unfortunately I have not found the spot in the documentation where this
is explained. Appearently there is also no example covering such setup.

So how has the _oasis file to be changed to link to the system -lfuse
and to -lcamlidl in the ocaml installation path?

Olaf

$ cat ocaml-fuse/ocamlfuse-2.7.1_cvs2/_oasis:
OASISFormat:      0.4
Name:             ocamlfuse
Version:          2.7.1-cvs2
Synopsis:         OCaml bindings for FUSE (Filesystem in UserSpacE)
Description:      OCaml bindings for FUSE (Filesystem in UserSpacE)
Authors:          Vincenzo Ciancia
LicenseFile:      LICENSE
License:          GPL
OCamlVersion:     >= 3.12
FindlibVersion:   >= 1.5
Homepage:         http://sourceforge.net/apps/mediawiki/ocamlfuse
#
BuildTools:       ocamldoc, ocamlbuild

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


             reply	other threads:[~2016-05-26 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 20:11 Olaf Hering [this message]
2016-05-26 20:58 ` Christophe Troestler
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=20160526201110.GA14443@aepfle.de \
    --to=olaf@aepfle.de \
    --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).