English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Ocaml and OpenBSD's port system
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-08 (10:53)
From: Bruce O'Neel <ocaml@p...>
Subject: Ocaml and OpenBSD's port system

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

but it might be better to say:

case "$host" in

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

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

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

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!