How to install Petite Chez Scheme on Ubuntu?
Asked Answered
R

5

7

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
Rainie answered 5/4, 2016 at 9:25 Comment(0)
S
5

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
Stalingrad answered 14/11, 2016 at 11:49 Comment(1)
Actually it's not currently working: ./installsh: 64: [: 0: unexpected operator in the sudo make install step.Premolar
B
3

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.

Bathesda answered 5/4, 2016 at 12:45 Comment(1)
I also had to install X development libraries with: sudo apt install xorg-dev (on 16.04)Nolanolan
B
2

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.

Broadbent answered 6/6, 2016 at 17:24 Comment(1)
I would also recommend to specify --installprefix=/usr/local/chezscheme to avoid mixing it with anything that might have already been installed to /usr/local.Tomchay
N
1

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=

Nolanolan answered 26/10, 2018 at 2:20 Comment(0)
W
0

Download the RPM package instead and use alien from terminal to produce a deb file:

fakeroot alien PetiteChezScheme-8.4-1.x86_64.rpm

You may need to install fakeroot, alien for this to work:

apt-get install fakeroot alien

Then you'll have a deb file. If you are on a desktop you can just double click the file and it will open Software Center and you can click install and it will fix your dependency problems.

Weevil answered 5/4, 2016 at 10:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.