caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OASIS help: link stublib to system lib and another caml lib
@ 2016-05-26 20:11 Olaf Hering
  2016-05-26 20:58 ` Christophe Troestler
  0 siblings, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2016-05-26 20:11 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-01 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 20:11 [Caml-list] OASIS help: link stublib to system lib and another caml lib Olaf Hering
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

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