Building Erlang R9C2 under OpenBSD 3.6-current (Sept 26,2006)
Geoff White
geoffw@REDACTED
Mon Sep 27 16:43:00 CEST 2004
Greeting.
I tried to build R9C2 from the source and ran into a couple of minor
problems. When I built it on the bleeding edge OpenBSD.
1) OpenBSD comes preloaded with OpenSSL but it is not where the configure
script for R9C2 expects it to be. Furthermore, neither the UNIX readme nor
the help from configure --help , list the required option to configure
erlang with ssl & crypto support., I stumbled upon the right option by
accidentally listing the README.win32, so, you must do ...
/configure --with-ssl-includes=/usr/include/openssl
--with-ssl-libraries=/usr/lib
Make sure you have done a "gmake clean", if you forget to do this, you
will never get this to compile,even if you do enter the correct options!!
2) There doesn't seem to be a compile flag for OpenBSD and configure
deduces that it is a BSD4_4 system. This creates a problem when compiling
the file .../lib/os_mon/c_src/memsup.c. OpenBSD does not use
vm/vm_param.h, it used sys/vmmeter.h, like FreeBSD. To get it to compile,
I just added this include into the #ifdef as so...
#ifdef BSD4_4
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
/* #include <vm/vm_param.h> */
#ifdef __FreeBSD__
#include <sys/vmmeter.h>
#endif
#endif
this is not the production solution but it got me going, I leave it to the
erlang release crew to figure out the *right thing*. Maybe an
__OpenBSD__ flag ;-)
3) Had a minor problem at the very end, with catman. catman doesn't seem to
be installed by default under OpenBSD, even though there is a copy in the
source distribution under /usr/src/usr.sbin/catman.
A quick "make; make install", places catman in /usr/sbin/catman.
Unfortunately the script that actually uses this program doesn't know about
openbsd, it tests for "BSDness" by testing for /vmunix, which does not
exist on OpenBSD, and would set the path to catman incorrectly anyway, the
work around is to execute the last command by hand...
cd /usr/local/lib/erlang/misc; /usr/sbin/catman -M
/usr/local/lib/erlang/man > /dev/null 2>&1
4) A better location to install erlang by default (for OpenBSD) would be
/usr/local instead of /usr/local/lib
cheers,
geoffw
More information about the erlang-bugs
mailing list