caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Bruce O'Neel" <ocaml@pckswarms.ch>
To: caml-list@inria.fr, Anil Madhavapeddy <avsm@openbsd.org>
Subject: Ocaml and OpenBSD's port system
Date: Thu, 08 Feb 2007 11:53:02 +0100	[thread overview]
Message-ID: <1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch> (raw)

Hi,

Ocaml installs very nicely from the OpenBSD ports system, with one small glitch.

ocaml believes that it can't load dynamic librarys in OpenBSD and therefore 
doesn't let you load .cma files.  `This is slightly annoying just because I 
wanted to play around with sockets and this means I can't do it interactivly
at the ocaml prompt.

It turns out this is quite easy to solve.  Ocaml doesn't think it can load 
dynamic librarys on it's own because it hasn't been told so.  Around line 486 of
configure the list of OSes that can do dynamic loading is checked, and 
OpenBDS just has to be added.  I changed my line to:  

case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-openbsd[3-9]*|*-*-gnu*)

but it might be better to say:

case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd[3-4]*|*-*-gnu*)

The whole sequence for my installation from ports is more complex than needed
just because I don't understand ports very well yet:

make fetch
make checksum
make depends
make extract
make patch

vi w-ocaml-3.09.2/ocaml-3.09.2/configure 

Change around line 486 from freebsd to openbsd  

if test $withsharedlibs = "yes"; then
  case "$host" in
      *-*-linux-gnu|*-*-linux|*-*-openbsd[3-9]*|*-*-gnu*)


make configure
make build
make fake
make package
make install

ln ./w-ocaml-3.09.2/fake-macppc/usr/local/lib/ocaml/stublibs/dll* /usr/local/lib
/ocaml/stublibs/

Note that the stublibs won't be known by the package system.

tar czvf /usr/ports/packages/powerpc/all/ocaml-3.09.2-stublibs.tgz /usr/local/li
b/ocaml/stublibs/

I tested this on sparc, macppc, and sparc64.  I assume that it works on x86 as well. 

Thanks for ocaml and thanks for a nice OpenBSD port of it!

cheers

bruce


             reply	other threads:[~2007-02-08 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 10:53 Bruce O'Neel [this message]
2007-02-08 11:07 ` Anil Madhavapeddy

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=1170931982-adbcea581cc1da11920658d8c44695a9@pckswarms.ch \
    --to=ocaml@pckswarms.ch \
    --cc=avsm@openbsd.org \
    --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).