Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Petite Chez Scheme on Ubuntu?

How to install Petite Chez Scheme on Ubuntu?

I run Ubuntu 15.10 and try to install pcsv8.4-a6le.tar.gz (non-threaded, 64 bit) for Linux.

After having unpacked this tar in /usr/locale, I enter the commands

sudo ./configure 
sudo make install 

from within the custom directory.

However, instead of a clean install, I get the following errors (which I hope someone can help me out with):

nlykkei@nlykkei-Studio-XPS-1640:/usr/local/csv8.4/custom$ sudo make install
if [ yes = no ]; then if [ ! -f ./scheme ]; then /bin/rm -f ./scheme; ln -s ../bin/a6le/scheme ./scheme; fi; fi
if [ ! -f ./petite ]; then /bin/rm -f ./petite; ln -s ./scheme ./petite; fi
/bin/rm -f ./scheme
echo "const char *S_date_stamp = \"`date +%m%d%Y%H%M%S`\";" > datestamp.c
gcc -m64 -rdynamic -o ./scheme datestamp.c ../boot/a6le/kernel.o ../boot/a6le/custom.o   -lm -ldl -lncurses -lrt
/usr/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status
Mf-a6le:22: recipe for target 'scheme' failed
make[2]: *** [scheme] Error 1
Makefile:47: recipe for target 'buildpetite' failed
make[1]: *** [buildpetite] Error 2
Mf-install:64: recipe for target 'install' failed
make: *** [install] Error 2
like image 795
Shuzheng Avatar asked Apr 05 '16 09:04

Shuzheng


4 Answers

On recent versions of Ubuntu (and future versions of Debian e.g. "Buster", and other Debian based distros), you can install Chez Scheme directly from the repo(s) by:

sudo apt install chezscheme

Previously you had to install it by compiling from source. Chez Scheme has been open source, for a few years now, and can be compiled from source, if it is not directly installable from the distribution's repo(s). Just download the source code compile and install. This will install not just the "petite" runtime version but also the full compiler. You can compile and install the software with:

./configure
sudo make install

Full build and install instructions are available here.

Pre-requisites for building are:

  • GNU Make
  • GCC
  • Header files and libraries for ncurses
  • Header files and libraries for X windows
like image 111
haziz Avatar answered Sep 28 '22 06:09

haziz


On Ubuntu, install the libncurses5-dev package to get libncurses.so. (You can discover this by visiting http://packages.debian.org/file:libncurses.so (sadly, this doesn't seem to work for http://packages.ubuntu.com/file:libncurses.so).)

You may find other linkage errors if Chez requires other libraries to have development packages installed too. Use the same technique as above.

like image 21
Chris Jester-Young Avatar answered Sep 28 '22 07:09

Chris Jester-Young


Go directly building from their Github.

ChezScheme

And then just do

./configure
sudo make install

Prerequisites according to Building are:

  • GNU Make
  • gcc
  • Header files and libraries for ncurses
  • Header files and libraries for X windows

And yes in case On Ubuntu, install the libncurses5-dev as Chris stated. Did just that and have no errors shown in clean install.

like image 32
Pushpa Avatar answered Sep 28 '22 06:09

Pushpa


Chez Scheme has been open sourced since this question was asked. Since Bionic (18.04LTS) the full chezscheme is available as a repository.

First do

sudo apt update

then install the package:

sudo apt install chezscheme

This provides both the petite interpreter and the full scheme compiler.

There is also a PPA for trusty and xenial here:

https://launchpad.net/~jonathonf/+archive/ubuntu/lisp?field.series_filter=

like image 42
kristianp Avatar answered Sep 28 '22 06:09

kristianp