starting sbcl


I installed sbcl x86_64 version on my opensuse 11.1 system. However, when I try to start it, I get the following error message.

mmap: Cannot allocate memory
ensure_space: failed to validate 8589869056 bytes at 0x1000000000
(hint: Try “ulimit -a”; maybe you should increase memory limits.)

Had the same problem (sbcl needs a hugh amount of memory) but found a work around:

  1. install clisp using yast
  2. get sbcl @ About - Steel Bank Common Lisp
  3. after de-compressing, cross-compile sbcl with
sh "clisp" 

(see Getting Started - Steel Bank Common Lisp)
4. if you get the error above, make a swap file (OpenSUSE 11.1 Reference - Using the YaST Partitioner) I made a 16GB swap file since 4 GB and 8GB were not enough. You can see the current amount of swab by

cat /proc/swaps

Therefore, call as root (in the example below, count=16384 defines 16384 MB, thus 16GB)

mkdir -p /var/lib/swap
dd if=/dev/zero of=/var/lib/swap/swapfile bs=1M count=16384 
mkswap /var/lib/swap/swapfile
swapon /var/lib/swap/swapfile

Note that the swap file is not automatically invoked at the next start-up. For permanently invoking the swap file add to /etc/fstab

/var/lib/swap/swapfile swap swap defaults 0 0

On my system, this prolonged, however, start-up time considerably. Depending on your system, try the above procedure with smaller sizes of swap files first and increase it step by step until compilation works.

May the source be with you.

Thanks! :slight_smile: Too bad we can’t find sbcl in the OpenSuSE distro.