fix stack size, restore ppc build

This commit is contained in:
David Woodhouse 2007-04-30 12:03:07 +00:00
commit c19cbcc542
2 changed files with 58 additions and 3 deletions

View file

@ -0,0 +1,51 @@
--- configure 2006/10/18 01:36:48 1.104
+++ configure 2007/01/02 21:51:40 1.105
@@ -718,6 +718,17 @@
fi
fi
+# CLISP needs a lot of stack space for bootstrapping,
+# and insufficient stack space manifests itself via arbitrary GC errors.
+# it was believed that 8192 is enough until power5 came along:
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=166347
+STACK_LIMIT=16384
+stacksizelimit=`ulimit -s 2>/dev/null || :` # cygwin /bin/sh ulimit is broken
+# need 3 separate test calls because of "integer expression expected" errors
+# when $stacksizelimit is "" or "unlimited" (no short-circuiting!)
+test -z "$stacksizelimit" || { test "$stacksizelimit" != unlimited && test "$stacksizelimit" -lt ${STACK_LIMIT}; }
+STACK_TOO_SMALL=$? # 0=true => need to reset; 1=false => big enough
+
if test -z "$do_build"; then
echo
@@ -729,13 +740,12 @@
echo " ./makemake $makemake_args > Makefile"
echo " make config.lisp"
echo " ${EDITOR:-vi} config.lisp"
- stacksizelimit=`ulimit -s 2>/dev/null || :` # cygwin /bin/sh ulimit is broken
- if test -z "$stacksizelimit" || { test "$stacksizelimit" != unlimited && test "$stacksizelimit" -lt 8192; }; then
+ if [ "${STACK_TOO_SMALL}" = 0 ]; then
cat <<EOF
# The default stack size on your platform is insufficient
-# and must be increased to at least 8192. You must do either
-# 'ulimit -s 8192' (for Bourne shell derivatives, e.g., bash and zsh) or
-# 'limit stacksize 8192' (for C shell derivarives, e.g., tcsh)
+# and must be increased to at least ${STACK_LIMIT}. You must do either
+# 'ulimit -s ${STACK_LIMIT}' (for Bourne shell derivatives, e.g., bash and zsh)
+# or 'limit stacksize ${STACK_LIMIT}' (for C shell derivarives, e.g., tcsh)
EOF
fi
echo " make"
@@ -750,9 +760,9 @@
make config.lisp;
${EDITOR:-vi} config.lisp;
fi
- # ulimit: just to make sure, should not hurt
- # cygwin /bin/sh ulimit is broken
- set +e; ulimit -s 8192 2>/dev/null; set -e;
+ if [ "${STACK_TOO_SMALL}" = 0 ]; then
+ set +e; ulimit -s ${STACK_LIMIT} 2>/dev/null; set -e;
+ fi
make
make check
cd ..

View file

@ -1,12 +1,13 @@
Name: clisp
Summary: Common Lisp (ANSI CL) implementation
Version: 2.41
Release: 3%{?dist}
Release: 4%{?dist}
Group: Development/Languages
License: GPL
URL: http://clisp.cons.org
Source: http://download.sourceforge.net/clisp/clisp-2.41.tar.bz2
Patch: clisp-config-stacksize.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline-devel
BuildRequires: gettext
@ -26,7 +27,6 @@ BuildRequires: libXmu-devel
BuildRequires: libXrender-devel
BuildRequires: libXt-devel
BuildRequires: imake
ExcludeArch: ppc ppc64
%description
@ -37,7 +37,7 @@ in Germany. It mostly supports the Lisp described in the ANSI Common
Lisp standard. It runs on most Unix workstations (GNU/Linux, FreeBSD,
NetBSD, OpenBSD, Solaris, Tru64, HP-UX, BeOS, NeXTstep, IRIX, AIX and
others) and on other systems (Windows NT/2000/XP, Windows 95/98/ME)
and needs only 4 MB of RAM.
and needs only 4 MiB of RAM.
It is Free Software and may be distributed under the terms of GNU GPL,
while it is possible to distribute commercial proprietary applications
@ -62,6 +62,7 @@ Files necessary for linking CLISP.
%prep
%setup -q
%patch -p0
# enforced stack size seems to be too small
sed -i "s|ulimit -s 8192|ulimit -s unlimited|" configure
@ -138,6 +139,9 @@ rm -fr $RPM_BUILD_ROOT
%changelog
* Mon Apr 30 2007 David Woodhouse <dwmw2@infradead.org> - 2.41-4
- Fix stack size in configure, restore ppc build
* Sat Dec 9 2006 Gerard Milmeister <gemi@bluewin.ch> - 2.41-3
- rebuild without berkeley-db for now