* guile-1.8.5 test failures
@ 2008-05-29 21:45 Peter O'Gorman
2008-06-02 19:49 ` Ludovic Courtès
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Peter O'Gorman @ 2008-05-29 21:45 UTC (permalink / raw)
To: bug-guile; +Cc: pogma
[-- Attachment #1: Type: text/plain, Size: 6231 bytes --]
Hi,
We built guile-1.8.5 on multiple machines with the native compilers and
these patches:
http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00020.html
http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00017.html
(attached patch)
The attached patch does these things:
1. Fix a build failure on hppa-hpux11.23 due to core dump during configure
with -luca
2. Don't detect the non-posix gmtime_r and readdir_r on hpux10.20
3. Fix build error on Tru64 Unix with the DEC compiler, which does not like
the non-constant expression in case: statements, and on irix which does
not like the non-constant expression in the initializers in read.c and
print.c. (yes, I know - yuck).
4. #define LONG_LONG_MIN and LONG_LONG_MAX id the are not available
(unfortunately I can not remember which system this was on).
5. Some older systems have inttypes.h that does not define PRIiMAX.
6. xlc on AIX 4.3 does not like 'static const char s_scm_hash_fold[];', we
moved the code around to make it unnecessary.
7. Tru64 Unix has headers that #define except, change it to something else
in deprecated.c.
8. Small patch to guile-config.in to put -lguile after -L/path/to/lib (we
did not have a problem with this yet, but the linker on at least HP-UX
requires the order be correct).
With all of these patches we did not have too much trouble except for
ia64-hp-hpux11.23 and Tru64 Unix 5.1.
On Tru64 Unix, it looks like we have a choice of building with gcc and
the tests failing with:
/opt/fsw/bash30/bin/bash: line 1: 186300 Floating point exception(core dumped) "../../pre-inst-guile-env" ${dir}$tst
FAIL: test-conversion
[snip]
/opt/fsw/bash30/bin/bash: line 1: 186527 Floating point exception(core dumped) ${dir}$tst
FAIL: check-guile
Or building with the native compiler and the tests failing with:
PASS: test-list
Assertion failed: WINDER_P (entry), file dynwind.c, line 181
/opt/fsw/bash30/bin/bash: line 1: 362514 IOT/Abort trap (core dumped) "../../pre-inst-guile-env" ${dir}$tst
FAIL: test-unwind
PASS: test-conversion
[snip]
Running continuations.test
Running elisp.test
zsh: segmentation fault (core dumped) ./check-guile
For ia64-hpux the situation is not quite that good. With all three
patches applied guile builds, but the tests go like this:
PASS: test-system-cmds
PASS: test-require-extension
PASS: test-bad-identifiers
ERROR: Stack overflow
FAIL: test-num2integral
PASS: test-round
PASS: test-gh
ERROR: Stack overflow
FAIL: test-asmobs
PASS: test-list
PASS: test-unwind
ERROR: Stack overflow
FAIL: test-conversion
ERROR: Stack overflow
ABORT: (stack-overflow)
PASS: test-use-srfi
PASS: test-with-guile-module
==================================
3 of 12 tests failed
[snip]
Testing /opt/build/guile-1.8.5/pre-inst-guile ...
with GUILE_LOAD_PATH=/opt/build/guile-1.8.5/test-suite
Running alist.test
ERROR: Stack overflow
FAIL: check-guile
==================================
1 of 1 tests failed
With the compiler optimization at -xO2, the build fails with a segfault
building the docs, with gcc and any optimization level, the build hangs
forever building the docs. The above results are with -xO1.
Without the stack size or ia64 patches applied, the results are similar
to Tru64:
PASS: test-system-cmds
PASS: test-require-extension
PASS: test-bad-identifiers
PASS: test-num2integral
PASS: test-round
PASS: test-gh
PASS: test-asmobs
PASS: test-list
/opt/fsw/bash30/bin/bash: line 1: 13028 Segmentation fault (core dumped) "../../pre-inst-guile-env" ${dir}$tst
FAIL: test-unwind
PASS: test-conversion
PASS: test-use-srfi
PASS: test-with-guile-module
==================================
1 of 12 tests failed
[snip]
Testing /opt/build/guile-1.8.5/pre-inst-guile ...
with GUILE_LOAD_PATH=/opt/build/guile-1.8.5/test-suite
Running alist.test
Running and-let-star.test
Running arbiters.test
Running bit-operations.test
Running c-api.test
Running chars.test
Running common-list.test
Running continuations.test
zsh: segmentation fault (core dumped) ./check-guile
Other systems also failed tests:
On all systems that lack unsetenv, we see:
Running posix.test
FAIL: posix.test: putenv: removing
FAIL: posix.test: setenv: removing
FAIL: posix.test: unsetenv: something
FAIL: posix.test: unsetenv: empty
It looks like the code expects putenv("FOO") to remove FOO from the
environment, but that is only the case on linux. On, for example,
solaris2.7, putenv("FOO") puts the string FOO into the environment.
Perhaps you should look into using the gnulib putenv for this?
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/putenv.m4;h=17105754c97385ac8ceb42c307d89f693935707e;hb=HEAD
Or, since it is only needed if unsetenv is not available, just go
through **environ in that case and "manually" remove the env var.
We will patch like that, but have not got to it yet.
hppa-hpux tests originally failed, running out of stack. After the stack
patch, we get:
Running srfi-14.test
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:letter (size)
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:lower-case (size)
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:upper-case (size)
Running time.test
FAIL: time.test: strftime: C99 %z format: GMT
FAIL: time.test: strftime: C99 %z format: EST+5
And, on hppa-hpux10.20 only:
Running numbers.test
FAIL: numbers.test: log: (negative-infinity? (log 0))
FAIL: numbers.test: log: (negative-infinity? (log 0.0))
FAIL: numbers.test: log10: (negative-infinity? (log10 0))
FAIL: numbers.test: log10: (negative-infinity? (log10 0.0))
Strangely, sparc-solaris2.10, and i386-solaris2.10 failed time.test
FAIL: time.test: strftime: C99 %z format: EST+5
But sparc-solaris2.6, 2.7, 2.8, 2.9 all passed that one.
aix4.3, 5.1, 5.2 and 5.3 all failed time.test also:
Running time.test
FAIL: time.test: strftime: C99 %z format: GMT
FAIL: time.test: strftime: C99 %z format: EST+5
aix4.3 and 5.1 also lack unsetenv, so failed those tests too.
mips-irix6.5 fails only the tests due to lack of unsetenv.
We'd appreciate some help in fixing ia64-hpux and Tru64. I believe that
the HP testdrive has itanium hpux machines, and the used to have Tru64
also, not sure if they still do.
Peter
--
Peter O'Gorman
pogma@thewrittenword.com
[-- Attachment #2: guile-1.8.5.patch --]
[-- Type: text/plain, Size: 25127 bytes --]
Index: configure.in
===================================================================
--- configure.in.orig 2008-05-28 18:14:11.123693215 +0000
+++ configure.in 2008-05-28 21:24:57.979038726 +0000
@@ -268,7 +407,12 @@
else
SCM_I_GSC_ENABLE_ELISP=0
fi
-AC_CHECK_LIB(uca, __uc_get_ar_bsp)
+
+AC_CHECK_LIB([uca], [__uc_get_ar_bsp],
+ [case "${host_cpu}-${host_os}" in
+ ia64-hpux*)
+ LIBS="$LIBS -luca" ;;
+ esac])
AC_C_CONST
@@ -281,7 +425,6 @@
else
SCM_I_GSC_C_INLINE=NULL
fi
-AC_CHECK_LIB(uca, __uc_get_ar_bsp)
AC_C_BIGENDIAN
@@ -685,7 +828,44 @@
# isblank - available as a GNU extension or in C99
# _NSGetEnviron - Darwin specific
#
-AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround ftime ftruncate fchown getcwd geteuid gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe readdir_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron strncasecmp])
+AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround ftime ftruncate fchown getcwd geteuid gettimeofday ioctl lstat mkdir mknod nice pipe _pipe readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron strncasecmp])
+
+case "${host_os}" in
+hpux*) CPPFLAGS="${CPPFLAGS} -D_REENTRANT" ;;
+esac
+
+# HPUX 10 has a non-posix gmtime_r that returns an int
+AC_CACHE_CHECK([for posix gmtime_r], [ac_cv_func_gmtime_r],[
+ AC_TRY_COMPILE(
+ [#include <time.h> ],
+ [
+ struct tm * (*ptr) (time_t const *, struct tm*) = gmtime_r;
+ if (ptr) return 0;
+ *gmtime_r (0,0);
+ ],
+ [ac_cv_func_gmtime_r=yes],
+ [ac_cv_func_gmtime_r=no])
+])
+
+if test "X$ac_cv_func_gmtime_r" = "Xyes"; then
+ AC_DEFINE([HAVE_GMTIME_R],1,[Define if you have a POSIX gmtime_r])
+fi
+
+# HP-UX 10 has a non-posix readdir_r that takes only 2 arguments
+AC_CACHE_CHECK([for posix readdir_r], [ac_cv_func_readdir_r],[
+ AC_TRY_COMPILE(
+ [#include <dirent.h>],
+ [
+ DIR *d=NULL;
+ struct dirent *ent1 = NULL;
+ struct dirent **ent2 = NULL;
+ int x = readdir_r(d,ent1,ent2);],
+ [ac_cv_func_readdir_r=yes],
+ [ac_cv_func_readdir_r=no])])
+
+if test "X$ac_cv_func_readdir_r" = "Xyes"; then
+ AC_DEFINE([HAVE_READDIR_R],1,[Define if you have a POSIX readdir_r])
+fi
# Reasons for testing:
# netdb.h - not in mingw
Index: libguile/read.c
===================================================================
--- libguile/read.c.orig 2008-05-28 18:14:10.889204697 +0000
+++ libguile/read.c 2008-05-28 18:15:06.936445832 +0000
@@ -63,7 +63,7 @@
"Record positions of source code expressions." },
{ SCM_OPTION_BOOLEAN, "case-insensitive", 0,
"Convert symbols to lower case."},
- { SCM_OPTION_SCM, "keywords", SCM_UNPACK (SCM_BOOL_F),
+ { SCM_OPTION_SCM, "keywords", scm_tc8_flag,
"Style of keyword recognition: #f, 'prefix or 'postfix."}
#if SCM_ENABLE_ELISP
,
Index: libguile/eval.c
===================================================================
--- libguile/eval.c.orig 2008-05-28 18:14:10.873544509 +0000
+++ libguile/eval.c 2008-05-28 18:15:07.165321457 +0000
@@ -2358,81 +2358,77 @@
static SCM
unmemoize_builtin_macro (const SCM expr, const SCM env)
{
- switch (ISYMNUM (SCM_CAR (expr)))
- {
- case (ISYMNUM (SCM_IM_AND)):
- return unmemoize_and (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_AND)))
+ return unmemoize_and (expr, env);
- case (ISYMNUM (SCM_IM_BEGIN)):
- return unmemoize_begin (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_BEGIN)))
+ return unmemoize_begin (expr, env);
- case (ISYMNUM (SCM_IM_CASE)):
- return unmemoize_case (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_CASE)))
+ return unmemoize_case (expr, env);
- case (ISYMNUM (SCM_IM_COND)):
- return unmemoize_cond (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_COND)))
+ return unmemoize_cond (expr, env);
- case (ISYMNUM (SCM_IM_DELAY)):
- return unmemoize_delay (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_DELAY)))
+ return unmemoize_delay (expr, env);
- case (ISYMNUM (SCM_IM_DO)):
- return unmemoize_do (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_DO)))
+ return unmemoize_do (expr, env);
- case (ISYMNUM (SCM_IM_IF)):
- return unmemoize_if (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_IF)))
+ return unmemoize_if (expr, env);
- case (ISYMNUM (SCM_IM_LAMBDA)):
- return unmemoize_lambda (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_LAMBDA)))
+ return unmemoize_lambda (expr, env);
- case (ISYMNUM (SCM_IM_LET)):
- return unmemoize_let (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_LET)))
+ return unmemoize_let (expr, env);
- case (ISYMNUM (SCM_IM_LETREC)):
- return unmemoize_letrec (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_LETREC)))
+ return unmemoize_letrec (expr, env);
- case (ISYMNUM (SCM_IM_LETSTAR)):
- return unmemoize_letstar (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_LETSTAR)))
+ return unmemoize_letstar (expr, env);
- case (ISYMNUM (SCM_IM_OR)):
- return unmemoize_or (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_OR)))
+ return unmemoize_or (expr, env);
- case (ISYMNUM (SCM_IM_QUOTE)):
- return unmemoize_quote (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_QUOTE)))
+ return unmemoize_quote (expr, env);
- case (ISYMNUM (SCM_IM_SET_X)):
- return unmemoize_set_x (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_SET_X)))
+ return unmemoize_set_x (expr, env);
- case (ISYMNUM (SCM_IM_APPLY)):
- return unmemoize_apply (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_APPLY)))
+ return unmemoize_apply (expr, env);
- case (ISYMNUM (SCM_IM_BIND)):
- return unmemoize_exprs (expr, env); /* FIXME */
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_BIND)))
+ return unmemoize_exprs (expr, env); /* FIXME */
- case (ISYMNUM (SCM_IM_CONT)):
- return unmemoize_atcall_cc (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_CONT)))
+ return unmemoize_atcall_cc (expr, env);
- case (ISYMNUM (SCM_IM_CALL_WITH_VALUES)):
- return unmemoize_at_call_with_values (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_CALL_WITH_VALUES)))
+ return unmemoize_at_call_with_values (expr, env);
#if 0
- /* See futures.h for a comment why futures are not enabled.
- */
- case (ISYMNUM (SCM_IM_FUTURE)):
- return unmemoize_future (expr, env);
+ /* See futures.h for a comment why futures are not enabled.
+ */
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_FUTURE)))
+ return unmemoize_future (expr, env);
#endif
- case (ISYMNUM (SCM_IM_SLOT_REF)):
- return unmemoize_atslot_ref (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_SLOT_REF)))
+ return unmemoize_atslot_ref (expr, env);
- case (ISYMNUM (SCM_IM_SLOT_SET_X)):
- return unmemoize_atslot_set_x (expr, env);
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_SLOT_SET_X)))
+ return unmemoize_atslot_set_x (expr, env);
- case (ISYMNUM (SCM_IM_NIL_COND)):
- return unmemoize_exprs (expr, env); /* FIXME */
+ if (ISYMNUM (SCM_CAR (expr)) == (ISYMNUM (SCM_IM_NIL_COND)))
+ return unmemoize_exprs (expr, env); /* FIXME */
- default:
- return unmemoize_exprs (expr, env); /* FIXME */
- }
+ return unmemoize_exprs (expr, env); /* FIXME */
}
@@ -3337,9 +3333,7 @@
SCM_TICK;
if (SCM_ISYMP (SCM_CAR (x)))
{
- switch (ISYMNUM (SCM_CAR (x)))
- {
- case (ISYMNUM (SCM_IM_AND)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_AND))) {
x = SCM_CDR (x);
while (!scm_is_null (SCM_CDR (x)))
{
@@ -3351,8 +3345,8 @@
}
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop;
-
- case (ISYMNUM (SCM_IM_BEGIN)):
+ }
+ if (ISYMNUM (SCM_CAR (x)) ==(ISYMNUM (SCM_IM_BEGIN))) {
x = SCM_CDR (x);
if (scm_is_null (x))
RETURN (SCM_UNSPECIFIED);
@@ -3420,9 +3414,9 @@
else
RETURN (last_form);
}
+ }
-
- case (ISYMNUM (SCM_IM_CASE)):
+ if (ISYMNUM (SCM_CAR (x)) ==(ISYMNUM (SCM_IM_CASE))) {
x = SCM_CDR (x);
{
const SCM key = EVALCAR (x, env);
@@ -3453,9 +3447,9 @@
}
}
RETURN (SCM_UNSPECIFIED);
+ }
-
- case (ISYMNUM (SCM_IM_COND)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_COND))) {
x = SCM_CDR (x);
while (!scm_is_null (x))
{
@@ -3514,9 +3508,9 @@
}
}
RETURN (SCM_UNSPECIFIED);
+ }
-
- case (ISYMNUM (SCM_IM_DO)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_DO))) {
x = SCM_CDR (x);
{
/* Compute the initialization values and the initial environment. */
@@ -3585,9 +3579,9 @@
RETURN (SCM_UNSPECIFIED);
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto nontoplevel_begin;
+ }
-
- case (ISYMNUM (SCM_IM_IF)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_IF))) {
x = SCM_CDR (x);
{
SCM test_result = EVALCAR (x, env);
@@ -3601,9 +3595,9 @@
}
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop;
+ }
-
- case (ISYMNUM (SCM_IM_LET)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_LET))) {
x = SCM_CDR (x);
{
SCM init_forms = SCM_CADR (x);
@@ -3619,9 +3613,9 @@
x = SCM_CDDR (x);
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto nontoplevel_begin;
+ }
-
- case (ISYMNUM (SCM_IM_LETREC)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_LETREC))) {
x = SCM_CDR (x);
env = SCM_EXTEND_ENV (SCM_CAR (x), undefineds, env);
x = SCM_CDR (x);
@@ -3635,9 +3629,9 @@
x = SCM_CDR (x);
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto nontoplevel_begin;
+ }
-
- case (ISYMNUM (SCM_IM_LETSTAR)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_LETSTAR))) {
x = SCM_CDR (x);
{
SCM bindings = SCM_CAR (x);
@@ -3656,9 +3650,9 @@
x = SCM_CDR (x);
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto nontoplevel_begin;
+ }
-
- case (ISYMNUM (SCM_IM_OR)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_OR))) {
x = SCM_CDR (x);
while (!scm_is_null (SCM_CDR (x)))
{
@@ -3670,17 +3664,17 @@
}
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop;
+ }
-
- case (ISYMNUM (SCM_IM_LAMBDA)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_LAMBDA))) {
RETURN (scm_closure (SCM_CDR (x), env));
+ }
-
- case (ISYMNUM (SCM_IM_QUOTE)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_QUOTE))) {
RETURN (SCM_CDR (x));
+ }
-
- case (ISYMNUM (SCM_IM_SET_X)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_SET_X))) {
x = SCM_CDR (x);
{
SCM *location;
@@ -3700,9 +3694,9 @@
*location = EVALCAR (x, env);
}
RETURN (SCM_UNSPECIFIED);
+ }
-
- case (ISYMNUM (SCM_IM_APPLY)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_APPLY))) {
/* Evaluate the procedure to be applied. */
x = SCM_CDR (x);
proc = EVALCAR (x, env);
@@ -3751,9 +3745,9 @@
ENTER_APPLY;
RETURN (SCM_APPLY (proc, arg1, SCM_EOL));
}
+ }
-
- case (ISYMNUM (SCM_IM_CONT)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_CONT))) {
{
int first;
SCM val = scm_make_continuation (&first);
@@ -3770,18 +3764,21 @@
goto evap1;
}
}
+ }
-
- case (ISYMNUM (SCM_IM_DELAY)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_DELAY))) {
RETURN (scm_makprom (scm_closure (SCM_CDR (x), env)));
-
+ }
#if 0
/* See futures.h for a comment why futures are not enabled.
*/
- case (ISYMNUM (SCM_IM_FUTURE)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_FUTURE))) {
RETURN (scm_i_make_future (scm_closure (SCM_CDR (x), env)));
+ }
#endif
-
+/*
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_DISPATCH))) {
+*/
/* PLACEHOLDER for case (ISYMNUM (SCM_IM_DISPATCH)): The following
code (type_dispatch) is intended to be the tail of the case
clause for the internal macro SCM_IM_DISPATCH. Please don't
@@ -3791,6 +3788,7 @@
/* The type dispatch code is duplicated below
* (c.f. objects.c:scm_mcache_compute_cmethod) since that
* cuts down execution time for type dispatch to 50%. */
+ if (0) {
type_dispatch: /* inputs: x, arg1 */
/* Type dispatch means to determine from the types of the function
* arguments (i. e. the 'signature' of the call), which method from
@@ -3915,18 +3913,18 @@
}
}
}
+ }
-
- case (ISYMNUM (SCM_IM_SLOT_REF)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_SLOT_REF))) {
x = SCM_CDR (x);
{
SCM instance = EVALCAR (x, env);
unsigned long int slot = SCM_I_INUM (SCM_CDR (x));
RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot]));
}
+ }
-
- case (ISYMNUM (SCM_IM_SLOT_SET_X)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_SLOT_SET_X))) {
x = SCM_CDR (x);
{
SCM instance = EVALCAR (x, env);
@@ -3935,11 +3933,10 @@
SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (value);
RETURN (SCM_UNSPECIFIED);
}
-
+ }
#if SCM_ENABLE_ELISP
-
- case (ISYMNUM (SCM_IM_NIL_COND)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_NIL_COND))) {
{
SCM test_form = SCM_CDR (x);
x = SCM_CDR (test_form);
@@ -3964,10 +3961,10 @@
PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
goto carloop;
}
-
+ }
#endif /* SCM_ENABLE_ELISP */
- case (ISYMNUM (SCM_IM_BIND)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_BIND))) {
{
SCM vars, exps, vals;
@@ -3997,9 +3994,9 @@
RETURN (proc);
}
+ }
-
- case (ISYMNUM (SCM_IM_CALL_WITH_VALUES)):
+ if (ISYMNUM (SCM_CAR (x)) == (ISYMNUM (SCM_IM_CALL_WITH_VALUES))) {
{
SCM producer;
@@ -4021,11 +4018,7 @@
PREP_APPLY (proc, arg1);
goto apply_proc;
}
-
-
- default:
- break;
- }
+ }
}
else
{
Index: libguile/fports.c
===================================================================
--- libguile/fports.c.orig 2008-05-28 18:14:10.894643700 +0000
+++ libguile/fports.c 2008-05-28 18:15:07.183102061 +0000
@@ -78,6 +78,12 @@
#define OFF_T_MAX LONG_MAX
#define OFF_T_MIN LONG_MIN
#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
+#ifndef LONG_LONG_MAX
+#define LONG_LONG_MAX 9223372036854775807LL
+#endif
+#ifndef LONG_LONG_MIN
+#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
+#endif
#define OFF_T_MAX LONG_LONG_MAX
#define OFF_T_MIN LONG_LONG_MIN
#else
Index: libguile/hash.c
===================================================================
--- libguile/hash.c.orig 2008-05-28 18:14:10.862008652 +0000
+++ libguile/hash.c 2008-05-28 18:15:07.197348933 +0000
@@ -61,24 +61,19 @@
case scm_tc3_imm24:
if (SCM_CHARP(obj))
return (unsigned)(scm_c_downcase(SCM_CHAR(obj))) % n;
- switch (SCM_UNPACK (obj)) {
#ifndef SICP
- case SCM_UNPACK(SCM_EOL):
- d = 256;
- break;
+ if (SCM_UNPACK (obj) == SCM_UNPACK(SCM_EOL))
+ d = 256;
+ else
#endif
- case SCM_UNPACK(SCM_BOOL_T):
- d = 257;
- break;
- case SCM_UNPACK(SCM_BOOL_F):
+ if (SCM_UNPACK (obj) == SCM_UNPACK(SCM_BOOL_T))
+ d = 257;
+ else if (SCM_UNPACK (obj) == SCM_UNPACK(SCM_BOOL_F))
d = 258;
- break;
- case SCM_UNPACK(SCM_EOF_VAL):
+ else if (SCM_UNPACK (obj) == SCM_UNPACK(SCM_EOF_VAL))
d = 259;
- break;
- default:
+ else
d = 263; /* perhaps should be error */
- }
return d % n;
default:
return 263 % n; /* perhaps should be error */
Index: libguile/print.c
===================================================================
--- libguile/print.c.orig 2008-05-28 18:14:10.878783435 +0000
+++ libguile/print.c 2008-05-28 18:15:07.229252563 +0000
@@ -71,7 +71,7 @@
SCM_SYMBOL (sym_reader, "reader");
scm_t_option scm_print_opts[] = {
- { SCM_OPTION_SCM, "closure-hook", SCM_UNPACK (SCM_BOOL_F),
+ { SCM_OPTION_SCM, "closure-hook", scm_tc8_flag,
"Hook for printing closures (should handle macros as well)." },
{ SCM_OPTION_BOOLEAN, "source", 0,
"Print closures with source." },
Index: test-suite/standalone/test-conversion.c
===================================================================
--- test-suite/standalone/test-conversion.c.orig 2008-05-28 18:14:10.993540911 +0000
+++ test-suite/standalone/test-conversion.c 2008-05-28 18:15:07.251098443 +0000
@@ -27,7 +27,8 @@
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-#elif (!defined PRIiMAX)
+#endif
+#if (!defined PRIiMAX)
# if (defined SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG >= 8)
# define PRIiMAX "lli"
# define PRIuMAX "llu"
Index: libguile/hashtab.c
===================================================================
--- libguile/hashtab.c.orig 2008-05-28 18:14:10.856701152 +0000
+++ libguile/hashtab.c 2008-05-28 18:15:07.270945309 +0000
@@ -908,8 +908,71 @@
/* Hash table iterators */
-static const char s_scm_hash_fold[];
+SCM
+scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table);
+void
+scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table);
+SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0,
+ (SCM proc, SCM init, SCM table),
+ "An iterator over hash-table elements.\n"
+ "Accumulates and returns a result by applying PROC successively.\n"
+ "The arguments to PROC are \"(key value prior-result)\" where key\n"
+ "and value are successive pairs from the hash table TABLE, and\n"
+ "prior-result is either INIT (for the first application of PROC)\n"
+ "or the return value of the previous application of PROC.\n"
+ "For example, @code{(hash-fold acons '() tab)} will convert a hash\n"
+ "table into an a-list of key-value pairs.")
+#define FUNC_NAME s_scm_hash_fold
+{
+ SCM_VALIDATE_PROC (1, proc);
+ if (!SCM_HASHTABLE_P (table))
+ SCM_VALIDATE_VECTOR (3, table);
+ return scm_internal_hash_fold (scm_call_3, (void *) SCM_UNPACK (proc), init, table);
+}
+#undef FUNC_NAME
+
+static SCM
+for_each_proc (void *proc, SCM handle)
+{
+ return scm_call_2 (SCM_PACK (proc), SCM_CAR (handle), SCM_CDR (handle));
+}
+
+SCM_DEFINE (scm_hash_for_each, "hash-for-each", 2, 0, 0,
+ (SCM proc, SCM table),
+ "An iterator over hash-table elements.\n"
+ "Applies PROC successively on all hash table items.\n"
+ "The arguments to PROC are \"(key value)\" where key\n"
+ "and value are successive pairs from the hash table TABLE.")
+#define FUNC_NAME s_scm_hash_for_each
+{
+ SCM_VALIDATE_PROC (1, proc);
+ if (!SCM_HASHTABLE_P (table))
+ SCM_VALIDATE_VECTOR (2, table);
+
+ scm_internal_hash_for_each_handle (for_each_proc,
+ (void *) SCM_UNPACK (proc),
+ table);
+ return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+SCM_DEFINE (scm_hash_for_each_handle, "hash-for-each-handle", 2, 0, 0,
+ (SCM proc, SCM table),
+ "An iterator over hash-table elements.\n"
+ "Applies PROC successively on all hash table handles.")
+#define FUNC_NAME s_scm_hash_for_each_handle
+{
+ scm_t_trampoline_1 call = scm_trampoline_1 (proc);
+ SCM_ASSERT (call, proc, 1, FUNC_NAME);
+ if (!SCM_HASHTABLE_P (table))
+ SCM_VALIDATE_VECTOR (2, table);
+
+ scm_internal_hash_for_each_handle (call,
+ (void *) SCM_UNPACK (proc),
+ table);
+ return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
SCM
scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
{
@@ -946,8 +1009,6 @@
scm_internal_hash_fold_handles, but we don't want to promote such
an API. */
-static const char s_scm_hash_for_each[];
-
void
scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table)
{
@@ -976,67 +1037,6 @@
}
}
-SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0,
- (SCM proc, SCM init, SCM table),
- "An iterator over hash-table elements.\n"
- "Accumulates and returns a result by applying PROC successively.\n"
- "The arguments to PROC are \"(key value prior-result)\" where key\n"
- "and value are successive pairs from the hash table TABLE, and\n"
- "prior-result is either INIT (for the first application of PROC)\n"
- "or the return value of the previous application of PROC.\n"
- "For example, @code{(hash-fold acons '() tab)} will convert a hash\n"
- "table into an a-list of key-value pairs.")
-#define FUNC_NAME s_scm_hash_fold
-{
- SCM_VALIDATE_PROC (1, proc);
- if (!SCM_HASHTABLE_P (table))
- SCM_VALIDATE_VECTOR (3, table);
- return scm_internal_hash_fold (scm_call_3, (void *) SCM_UNPACK (proc), init, table);
-}
-#undef FUNC_NAME
-
-static SCM
-for_each_proc (void *proc, SCM handle)
-{
- return scm_call_2 (SCM_PACK (proc), SCM_CAR (handle), SCM_CDR (handle));
-}
-
-SCM_DEFINE (scm_hash_for_each, "hash-for-each", 2, 0, 0,
- (SCM proc, SCM table),
- "An iterator over hash-table elements.\n"
- "Applies PROC successively on all hash table items.\n"
- "The arguments to PROC are \"(key value)\" where key\n"
- "and value are successive pairs from the hash table TABLE.")
-#define FUNC_NAME s_scm_hash_for_each
-{
- SCM_VALIDATE_PROC (1, proc);
- if (!SCM_HASHTABLE_P (table))
- SCM_VALIDATE_VECTOR (2, table);
-
- scm_internal_hash_for_each_handle (for_each_proc,
- (void *) SCM_UNPACK (proc),
- table);
- return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_hash_for_each_handle, "hash-for-each-handle", 2, 0, 0,
- (SCM proc, SCM table),
- "An iterator over hash-table elements.\n"
- "Applies PROC successively on all hash table handles.")
-#define FUNC_NAME s_scm_hash_for_each_handle
-{
- scm_t_trampoline_1 call = scm_trampoline_1 (proc);
- SCM_ASSERT (call, proc, 1, FUNC_NAME);
- if (!SCM_HASHTABLE_P (table))
- SCM_VALIDATE_VECTOR (2, table);
-
- scm_internal_hash_for_each_handle (call,
- (void *) SCM_UNPACK (proc),
- table);
- return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
static SCM
map_proc (void *proc, SCM key, SCM data, SCM value)
Index: libguile/deprecated.c
===================================================================
--- libguile/deprecated.c.orig 2008-05-28 18:14:10.868232852 +0000
+++ libguile/deprecated.c 2008-05-28 18:15:07.418809362 +0000
@@ -319,14 +319,14 @@
static void
maybe_close_port (void *data, SCM port)
{
- SCM except = (SCM)data;
+ SCM _except = (SCM)data;
- while (!scm_is_null (except))
+ while (!scm_is_null (_except))
{
- SCM p = SCM_COERCE_OUTPORT (SCM_CAR (except));
+ SCM p = SCM_COERCE_OUTPORT (SCM_CAR (_except));
if (scm_is_eq (p, port))
return;
- except = SCM_CDR (except);
+ _except = SCM_CDR (_except);
}
scm_close_port (port);
Index: guile-config/guile-config.in
===================================================================
--- guile-config/guile-config.in.orig 2008-05-28 22:02:48.000000000 +0000
+++ guile-config/guile-config.in 2008-05-28 22:11:01.068986013 +0000
@@ -151,13 +151,12 @@
(display (string-join
(list
(get-build-info 'CFLAGS)
- "-lguile -lltdl"
(if (or (string=? libdir "/usr/lib")
(string=? libdir "/usr/lib/"))
""
(string-append "-L" (get-build-info 'libdir)))
+ "-lguile -lltdl"
(string-join other-flags)
-
)))
(newline)))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile-1.8.5 test failures
2008-05-29 21:45 guile-1.8.5 test failures Peter O'Gorman
@ 2008-06-02 19:49 ` Ludovic Courtès
[not found] ` <8763sr7h18.fsf@gnu.org>
2008-10-06 22:57 ` Neil Jerram
2 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2008-06-02 19:49 UTC (permalink / raw)
To: bug-guile
Hi,
"Peter O'Gorman" <bug-guile@mlists.thewrittenword.com> writes:
> We built guile-1.8.5 on multiple machines with the native compilers and
> these patches:
>
> http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00020.html
I'm now convinced that we should introduce this one in the next release.
> http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00017.html
> (attached patch)
This one has been committed.
> The attached patch does these things:
> 1. Fix a build failure on hppa-hpux11.23 due to core dump during configure
> with -luca
What's wrong with using it on non-IA64 machines? Isn't it supposed
serve the same purpose regardless of the architecture?
> 2. Don't detect the non-posix gmtime_r and readdir_r on hpux10.20
Does defining `_POSIX_SOURCE' fix it?
FWIW, Guile 1.8.5 compiles without any problems on HP-UX 11.11.
> 3. Fix build error on Tru64 Unix with the DEC compiler, which does not like
> the non-constant expression in case: statements, and on irix which does
> not like the non-constant expression in the initializers in read.c and
> print.c. (yes, I know - yuck).
But these are constants! The modifications you suggest are quite
harmless but intrusive. The one in `{print,read}.c' (changing
`SCM_BOOL_F' to `scm_tc8_flag') makes the code harder to read and
fragile. So I'm not sure that would be a good idea to change it.
Opinions?
> 4. #define LONG_LONG_MIN and LONG_LONG_MAX id the are not available
> (unfortunately I can not remember which system this was on).
Eh, can you remember now? :-)
> 5. Some older systems have inttypes.h that does not define PRIiMAX.
OK, I checked it in.
> 6. xlc on AIX 4.3 does not like 'static const char s_scm_hash_fold[];', we
> moved the code around to make it unnecessary.
Hmm, what does it mean that it doesn't like it? It's valid C, right?
(It's always annoying to move code around because then it makes it
harder to track the origin of a change, e.g., via `git-blame'.)
> 7. Tru64 Unix has headers that #define except, change it to something else
> in deprecated.c.
Checked in.
> 8. Small patch to guile-config.in to put -lguile after -L/path/to/lib (we
> did not have a problem with this yet, but the linker on at least HP-UX
> requires the order be correct).
Checked in.
> With all of these patches we did not have too much trouble except for
> ia64-hp-hpux11.23 and Tru64 Unix 5.1.
OK, we'll see that later if you don't mind. :-)
BTW, if you plan to contribute further changes, you will need to assign
your copyright to the FSF. We can work this out off-line if you want.
Thanks!
Ludovic.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <8763sr7h18.fsf@gnu.org>]
* Re: guile-1.8.5 test failures
[not found] ` <8763sr7h18.fsf@gnu.org>
@ 2008-06-05 3:07 ` Peter O'Gorman
2008-06-08 15:26 ` Peter O'Gorman
0 siblings, 1 reply; 7+ messages in thread
From: Peter O'Gorman @ 2008-06-05 3:07 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: bug-guile
On Mon, Jun 02, 2008 at 09:50:27PM +0200, Ludovic Courtès wrote:
> > 1. Fix a build failure on hppa-hpux11.23 due to core dump during configure
> > with -luca
>
> What's wrong with using it on non-IA64 machines? Isn't it supposed
> serve the same purpose regardless of the architecture?
Well it is only used on ia64. On pa_risc there is no need for it. The
section of code that uses it is in
#ifdef __ia64__
#ifdef __hpux
in gc.c, it is not needed on pa_risc, and caused a problem for us.
>
> > 2. Don't detect the non-posix gmtime_r and readdir_r on hpux10.20
>
> Does defining `_POSIX_SOURCE' fix it?
hpux-10.20 is very old and does not have posix conforming versions of
these functions, the versions that it does have are from an earlier
posix draft.
>
> > 3. Fix build error on Tru64 Unix with the DEC compiler, which does not like
> > the non-constant expression in case: statements, and on irix which does
> > not like the non-constant expression in the initializers in read.c and
> > print.c. (yes, I know - yuck).
>
> But these are constants!
I'll look into this again.
>
> > 4. #define LONG_LONG_MIN and LONG_LONG_MAX id the are not available
> > (unfortunately I can not remember which system this was on).
>
> Eh, can you remember now? :-)
No, but perhaps we should just use SCM_I_LLONG_MIN and SCM_I_LLONG_MAX
(which I have only just noticed) here.
>
> > 5. Some older systems have inttypes.h that does not define PRIiMAX.
>
> OK, I checked it in.
>
Thanks.
> > 6. xlc on AIX 4.3 does not like 'static const char s_scm_hash_fold[];', we
> > moved the code around to make it unnecessary.
>
> Hmm, what does it mean that it doesn't like it? It's valid C, right?
>
> (It's always annoying to move code around because then it makes it
> harder to track the origin of a change, e.g., via `git-blame'.)
>
Well, after preprocessing the compiler sees something like:
static const char s_scm_hash_fold[];
....
<some usage of s_scm_hash_fold>
....
static const char s_scm_hash_fold[]="Some string";
And, rightly, I think, complains. By moving the code around it sees:
static const char s_scm_hash_fold[]="Some string";
....
<some usage of s_scm_hash_fold>
....
And it likes that better :-)
> OK, we'll see that later if you don't mind. :-)
Ok. Thanks.
Peter
--
Peter O'Gorman
pogma@thewrittenword.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile-1.8.5 test failures
2008-06-05 3:07 ` Peter O'Gorman
@ 2008-06-08 15:26 ` Peter O'Gorman
2008-06-08 18:21 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: Peter O'Gorman @ 2008-06-08 15:26 UTC (permalink / raw)
To: bug-guile; +Cc: Ludovic Courtès
On Wed, Jun 04, 2008 at 10:07:04PM -0500, Peter O'Gorman wrote:
> On Mon, Jun 02, 2008 at 09:50:27PM +0200, Ludovic Courtès wrote:
> > > 3. Fix build error on Tru64 Unix with the DEC compiler, which does not like
> > > the non-constant expression in case: statements, and on irix which does
> > > not like the non-constant expression in the initializers in read.c and
> > > print.c. (yes, I know - yuck).
> >
> > But these are constants!
>
> I'll look into this again.
Ok, turned out that the compiler was complaining about the 0?0=0:x
construct, it looked at the 0=0 and decided that it was not okay to have
that as an argument to the case statement. It was easy to figure that
out once I tried compiling preprocessed source, the caret pointed right
at the "0=" and said:
In this statement, "0=0" is not constant, but occurs in a context that requires a constant expression. (needconstexpr)
Attempting with -DSCM_DEBUG_TYPING_STRICTNESS=0 also failed, complaining
about int being the expected return type, but void* being passed.
Peter
Index: libguile/tags.h
===================================================================
--- libguile/tags.h.orig 2008-06-06 15:43:41.000000000 +0000
+++ libguile/tags.h 2008-06-06 16:18:14.000000000 +0000
@@ -114,7 +114,17 @@
compiled, and does generate a warning when used with the wrong
pointer type.
*/
+ /* The Tru64 Unix compiler and HP compiler have issues with case
+ * (0?0=0:x), the compilers see 0=0 and dislike the non-constant
+ * expression in a case statement, so for them no type-checking is
+ * performed. Note that the case to scm_t_bits is required, if we just
+ * define SCM_UNPACK(x) (x) we get errors about returning a pointer
+ * when an int was expected */
+#if defined __DECC || defined __HP_cc
+# define SCM_UNPACK(x) (scm_t_bits)(x)
+#else
# define SCM_UNPACK(x) ((scm_t_bits) (0? (*(SCM*)0=(x)): x))
+#endif
/*
There is no typechecking on SCM_PACK, since all kinds of types
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile-1.8.5 test failures
2008-06-08 15:26 ` Peter O'Gorman
@ 2008-06-08 18:21 ` Ludovic Courtès
0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2008-06-08 18:21 UTC (permalink / raw)
To: bug-guile
Hi,
"Peter O'Gorman" <bug-guile@mlists.thewrittenword.com> writes:
> On Wed, Jun 04, 2008 at 10:07:04PM -0500, Peter O'Gorman wrote:
>> On Mon, Jun 02, 2008 at 09:50:27PM +0200, Ludovic Courtès wrote:
>> > > 3. Fix build error on Tru64 Unix with the DEC compiler, which does not like
>> > > the non-constant expression in case: statements, and on irix which does
>> > > not like the non-constant expression in the initializers in read.c and
>> > > print.c. (yes, I know - yuck).
>> >
>> > But these are constants!
>>
>> I'll look into this again.
> In this statement, "0=0" is not constant, but occurs in a context that requires a constant expression. (needconstexpr)
OK, makes sense.
> + /* The Tru64 Unix compiler and HP compiler have issues with case
> + * (0?0=0:x), the compilers see 0=0 and dislike the non-constant
> + * expression in a case statement, so for them no type-checking is
> + * performed. Note that the case to scm_t_bits is required, if we just
> + * define SCM_UNPACK(x) (x) we get errors about returning a pointer
> + * when an int was expected */
> +#if defined __DECC || defined __HP_cc
Your report above mentions IRIX, not HP-UX, and 1.8.5 successfully
compiles on HP-UX 11.11 with HP's cc ("HP92453-01
B.11.X.36086-36089-36092.GP HP C Compiler", as reported by "cc -V").
Thus, the "#ifdef __HP_cc" must be changed to match whatever SGi's
compiler defines---this is `__sgi' according to [0] for the C++
compiler.
Can you confirm this?
Thanks,
Ludovic.
[0] http://ac-archive.sourceforge.net/ac-archive/ac_cxx_compiler_vendor.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile-1.8.5 test failures
2008-05-29 21:45 guile-1.8.5 test failures Peter O'Gorman
2008-06-02 19:49 ` Ludovic Courtès
[not found] ` <8763sr7h18.fsf@gnu.org>
@ 2008-10-06 22:57 ` Neil Jerram
2008-10-08 18:38 ` Peter O'Gorman
2 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2008-10-06 22:57 UTC (permalink / raw)
To: Peter O'Gorman; +Cc: bug-guile, pogma
2008/5/29 Peter O'Gorman <bug-guile@mlists.thewrittenword.com>:
>
> We built guile-1.8.5 on multiple machines with the native compilers and
> these patches:
>
> http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00020.html
> http://lists.gnu.org/archive/html/guile-devel/2008-05/msg00017.html
> (attached patch)
> For ia64-hpux the situation is not quite that good. With all three
> patches applied guile builds, but the tests go like this:
...
> ERROR: Stack overflow
> FAIL: test-num2integral
...
> ERROR: Stack overflow
> FAIL: test-asmobs
...
> ERROR: Stack overflow
> FAIL: test-conversion
> ERROR: Stack overflow
> ABORT: (stack-overflow)
...
> Running alist.test
> ERROR: Stack overflow
> FAIL: check-guile
> Without the stack size or ia64 patches applied, the results are similar
> to Tru64:
>
> PASS: test-system-cmds
> PASS: test-require-extension
> PASS: test-bad-identifiers
> PASS: test-num2integral
> PASS: test-round
> PASS: test-gh
> PASS: test-asmobs
> PASS: test-list
So on this platform (ia64-hpux), it looks like the stack calibration
patch causes the stack overflows. I imagine that could happen if (1)
the calibration Scheme code in boot-9.scm consumed little or no stack
- perhaps because of the compiler having lots of registers available,
and/or doing tail call frame elimination (that probably isn't the
right term for it, but hopefully it's clear what I mean!) - and (2)
the real C/Scheme code that runs later uses on average much more stack
per frame.
In another thread, Ludovic measured a value of 0.07 for the calibrated
m value on ia64-unknown-linux-gnu:
> * ia64-unknown-linux-gnu (itanium2), GCC 4.1.2
> ;; Stack calibration: (x1 x2 y1 y2 m c) = (170 690 10 50 0.0769230769230769 -3.07692307692308)
This means that calibration reduces the maximum allowed stack depth
from 20000 to 1400 words.
If you still have the build around, and could run ./pre-inst-guile -q
with it, that should output a ";; Stack calibration" line like the one
above, and would allow us to confirm (or deny) that the calibrated m
value was very low.
Regards,
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: guile-1.8.5 test failures
2008-10-06 22:57 ` Neil Jerram
@ 2008-10-08 18:38 ` Peter O'Gorman
0 siblings, 0 replies; 7+ messages in thread
From: Peter O'Gorman @ 2008-10-08 18:38 UTC (permalink / raw)
To: Neil Jerram; +Cc: bug-guile
On Mon, Oct 06, 2008 at 11:57:25PM +0100, Neil Jerram wrote:
> 2008/5/29 Peter O'Gorman <bug-guile@mlists.thewrittenword.com>:
> In another thread, Ludovic measured a value of 0.07 for the calibrated
> m value on ia64-unknown-linux-gnu:
>
> > * ia64-unknown-linux-gnu (itanium2), GCC 4.1.2
> > ;; Stack calibration: (x1 x2 y1 y2 m c) = (170 690 10 50 0.0769230769230769 -3.07692307692308)
>
> This means that calibration reduces the maximum allowed stack depth
> from 20000 to 1400 words.
I rebuilt, it shows:
./pre-inst-guile -q
;; Stack calibration: (x1 x2 y1 y2 m c) = (170 690 12 52
0.0769230769230769 -1.07692307692308)
Backtrace:
In unknown file:
?: 93* [try-module-autoload (ice-9 syncase)]
?: 94 (let* (# # # #) (resolve-module dir-hint-module-name #f) (and
# #))
?: 95* [resolve-module (ice-9) #f]
?: 96 (let* ((full-name #)) (let* (#) (if already # #)))
?: 97 (let* ((already #)) (if already (if # # already) (begin #
#)))
?: 98* [nested-ref #<module (guile) 400a0970> (%app modules ice-9)]
?: 99 [loop #<module (guile) 400a0970> (%app modules ice-9)]
...
?: 100 [loop ...
?: 101* [module-ref #<module (guile) 400a0970> %app #f]
?: 102 (let* ((variable #)) (if (and variable #) (variable-ref
variable) ...))
?: 103* [module-variable #<module (guile) 400a0970> %app]
?: 104 [module-search #<procedure module-local-variable #> # %app]
...
?: 105 (or (fn m v) (loop (module-uses m)))
?: 106* [module-local-variable #<module (guile) 400a0970> %app]
?: 107 (let* ((b #)) (or (and # b) (and # #)))
?: 108* [module-obarray-ref ...
?: 109* [module-obarray #<module (guile) 400a0970>]
?: 110 (if (eq? # #) (struct-ref obj 0) (%record-type-error #
obj))
?: 111* [eq? ...
?: 112* (struct-vtable obj)
<unnamed port>: In expression (struct-vtable obj):
<unnamed port>: Stack overflow
I am doubtful that ia64-hp-hpux's problems with guile will be solved by
fixing the stack overflow patch.
Thanks,
Peter
--
Peter O'Gorman
pogma@thewrittenword.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-08 18:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 21:45 guile-1.8.5 test failures Peter O'Gorman
2008-06-02 19:49 ` Ludovic Courtès
[not found] ` <8763sr7h18.fsf@gnu.org>
2008-06-05 3:07 ` Peter O'Gorman
2008-06-08 15:26 ` Peter O'Gorman
2008-06-08 18:21 ` Ludovic Courtès
2008-10-06 22:57 ` Neil Jerram
2008-10-08 18:38 ` Peter O'Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).