Building R13B04 on OpenBSD 4.6

David N Murray dmurray@REDACTED
Thu Mar 25 23:18:17 CET 2010


Hi,

I'm trying to build R13B04 on OpenBSD 4.6.  I ran into a similar problem
when I built Gambit Scheme on this box a while back:

checking sys/sysctl.h usability... no
checking sys/sysctl.h presence... yes
configure: WARNING: sys/sysctl.h: present but cannot be compiled
configure: WARNING: sys/sysctl.h:     check for missing prerequisite
headers?
configure: WARNING: sys/sysctl.h: see the Autoconf documentation
configure: WARNING: sys/sysctl.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: sys/sysctl.h: proceeding with the preprocessor's
result
configure: WARNING: sys/sysctl.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##
checking for sys/sysctl.h... yes

I generated a fix for Gambit, but I'm not sure how to apply it to Erlang
(there's no configure.ac):

--- configure.ac.~1~	Thu Jan  7 14:58:50 2010
+++ configure.ac	Sat Jan 30 15:32:36 2010
@@ -622,7 +622,21 @@
   AC_CHECK_HEADERS(sys/socket.h)
   AC_CHECK_HEADERS(strings.h)
   AC_CHECK_HEADERS(memory.h)
-  AC_CHECK_HEADERS(sys/sysctl.h)
+  case "$target_os" in
+
+       openbsd*) # needs param.h
+           AC_CHECK_HEADERS(sys/param.h)
+           AC_CHECK_HEADERS(sys/sysctl.h,,,
+[#ifdef HAVE_PARAM_H
+# include <sys/param.h>
+#endif
+])
+	   ;;
+
+       *)
+           AC_CHECK_HEADERS(sys/sysctl.h)
+	   ;;
+  esac

   if test "$C_COMP_VISUALC" != yes; then

I haven't tried to 'make' yet.  I'm not sure if sys/sysctl.h is really
required or can be worked around.

Thoughts?

TIA,
Dave



More information about the erlang-questions mailing list