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