[erlang-questions] R11 configuration problem

Mikael Pettersson <>
Tue Nov 3 18:45:13 CET 2009


=?UTF-8?B?R8O2cmFuIELDpWdl?= writes:
 > Hello,
 > 
 > I tried to install R11R-5 on my new Imac running Snow Leopard and
 > got this trying to configure:
 > ...
 > checking for IP version 6 support... yes
 > checking for multicast support... rm: conftest.dSYM: is a directory
 > yes
 > checking how to correct for time adjustments... none
 > checking if gethrvtime works and how to use it... not working
 > checking if clock_gettime can be used to get process CPU time... not working
 > checking for unreliable floating point execptions...
 > 
 > and there it gets stuck, hangs forever (or a very long time).
 > Anyone out there know what the problem is?
 > No problems with R12, R13, and yes I need R11 as we have customer installations
 > using R11 that we need to maintain.

There are two main changes related to that test between R11B-5 and R12B-5,
the first is surrounding logic to only run the test if HiPE is enabled or
the user requested the feature, the second is a check in the test itself
against infinite SIGFPE loops. I suspect the latter is what's happening to
you. The patch below backports that one fix to R11B-5, apply it and try
./configure again.

--- otp_src_R11B-5/erts/configure.in.~1~	2007-06-11 14:53:45.000000000 +0200
+++ otp_src_R11B-5/erts/configure.in	2009-11-03 18:41:17.000000000 +0100
@@ -1674,6 +1674,19 @@ AC_TRY_RUN([
 
 volatile int erl_fp_exception;
 
+/*
+ * We expect a single SIGFPE in this test program.
+ * Getting many more indicates an inadequate SIGFPE handler,
+ * e.g. using the generic handler on x86.
+ */
+static void new_fp_exception(void)
+{
+    if (++erl_fp_exception > 50) {
+	fprintf(stderr, "SIGFPE loop detected, bailing out\n");
+	exit(1);
+    }
+}
+
 /* Is there no standard identifier for Darwin/MacOSX ? */
 #if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
 #define __DARWIN__ 1
@@ -2017,7 +2030,7 @@ static void fpe_sig_action(int sig, sigi
     fpstate->mxcsr = 0x1F80;
     fpstate->sw &= ~0xFF;
 #endif
-    erl_fp_exception = 1;
+    new_fp_exception();
 }
 
 static void do_init(void)
@@ -2034,7 +2047,7 @@ static void do_init(void)
 
 static void fpe_sig_handler(int sig)
 {
-    erl_fp_exception = 1;
+    new_fp_exception();
 }
 
 static void do_init(void)
--- otp_src_R11B-5/erts/configure.~1~	2007-06-11 19:16:18.000000000 +0200
+++ otp_src_R11B-5/erts/configure	2009-11-03 18:42:20.000000000 +0100
@@ -18197,6 +18197,19 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 volatile int erl_fp_exception;
 
+/*
+ * We expect a single SIGFPE in this test program.
+ * Getting many more indicates an inadequate SIGFPE handler,
+ * e.g. using the generic handler on x86.
+ */
+static void new_fp_exception(void)
+{
+    if (++erl_fp_exception > 50) {
+	fprintf(stderr, "SIGFPE loop detected, bailing out\n");
+	exit(1);
+    }
+}
+
 /* Is there no standard identifier for Darwin/MacOSX ? */
 #if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
 #define __DARWIN__ 1
@@ -18540,7 +18553,7 @@ static void fpe_sig_action(int sig, sigi
     fpstate->mxcsr = 0x1F80;
     fpstate->sw &= ~0xFF;
 #endif
-    erl_fp_exception = 1;
+    new_fp_exception();
 }
 
 static void do_init(void)
@@ -18557,7 +18570,7 @@ static void do_init(void)
 
 static void fpe_sig_handler(int sig)
 {
-    erl_fp_exception = 1;
+    new_fp_exception();
 }
 
 static void do_init(void)


More information about the erlang-questions mailing list