Menu

Home

David Stes

The following notes document some steps to install Squeak on Solaris 11 (using Solaris IPS).

See the SqueakVM.org website for older versions of the Squeak VM for SPARC and Intel (for Solaris 9). Also there are binaries for Solaris 10 for SPARC and Intel at files.squeak.org.

Squeak (Smalltalk) is a graphical development environment and programming language. See the Squeak website for more information, specifically the documentation section. Also see the Squeak Wiki for more information : Squeak Wiki

Also see our articles about running the Telegram Smalltalk Bot on Squeak for Solaris, on running the AIDA Web Application Smalltalk Platform and on running Squeak in a Solaris zone.

How to install Squeak Smalltalk-80 on Solaris

Solaris Prerequisites


Squeak is a graphically oriented system, and it is recommended to install a desktop (graphical) environment, such as the GNOME desktop, on Solaris, in order to use Squeak.

It is possible to use Squeak in a minimal text-only environment, by running Squeak with the -nodisplay or -headless option. We support this with some squeak packages called squeak-nodisplay and opensmalltalk/stack-spur-nodisplay, but nevertheless to prepare images to use, a desktop graphical environment is required to prepare the images for the minimal text-only system.

One way to get a GNOME desktop (there exist other methods) is to run the Solaris text installer and then install the group package "solaris-desktop" and then enable the GNOME Display Manager (gdm) as follows:

        # pkg install -v --accept solaris-desktop
        # svcadm enable graphical-login/gdm

This enables the "GNOME display manager".

There is a major difference in GNOME version between Solaris 11.3 which uses GNOME version 2 and Solaris 11.4 which uses GNOME 3.

There are Squeak packages available for both Solaris 11.3 and Solaris 11.4 where the package for 11.3 works on both 11.3 and 11.4 but the package for Solaris 11.4 will only install on Solaris 11.4 (not on 11.3).

So the package for Solaris 11.3 is "upwards compatible" but the package for Solaris 11.4 is not "downwards compatible".

The package for Solaris 11.3 (and Solaris 11.4) is built with the scripts from solaris-squeak.

The package for Solaris 11.4 is built with solaris-userland.

In any case, even if you do a direct desktop installation (without running through the text based installation of Solaris, for example using the AI (Automated Installer) or Live CD), take care about the ip address and hostname of the system.

Squeak will try to use the ip address that corresponds to the hostname of the system as its ip address.

So multi-homed systems (with multiple network interfaces) may have some strange behavior for TCP/IP networking inside Squeak. This may require some experimentation to see what works.

We've tested Squeak with a text-based installation with fixed IP address and hostname resolving is set up so that the fixed ip address corresponds to the hostname, and there were no other network interfaces on the test server.

There are three Squeak packages : squeak, stack-spur and cog-spur. See the next section on how to install those packages. If you use the Solaris 11.3 .p5p package, it will not check dependencies. However, if you use the Solaris 11.4 package, before installing, the Solaris system should have some required packages installed as the Solaris 11.4 package checks dependencies.

The Solaris 11.3 package is distributed as a .p5p archive file.

Download the .p5p file and check its contents with :

       # pkg list -a -g ./cog-spur-5.0.3047-solaris11.3.p5p

Install the software from the .p5p with :

       # pkg install -v -g ./cog-spur-5.0.3047-solaris11.3.p5p cog-spur

If you install the Solaris 11.3 package on Solaris 11.4 you may have to run the following command first:

    # pkg change-facet facet.version-lock.runtime/smalltalk/cog-spur=false

In the case of the Solaris 11.4 packages, to check the required dependencies for Squeak, use the command:

       # pkg contents -r -t depend squeak

or

       # pkg contents -r -t depend stack-spur

This will list a number of dependencies for either squeak or stack-spur, for example the version of the openssl package that must be installed in order to install squeak or stack-spur.

If those dependencies are not met, you should upgrade Solaris before attempting to install Squeak.

You can upgrade Solaris and check the dependencies again:

        # pkg update -v

Solaris also as a concept of "consolidations" which is possibly also relevant. Use the following command to check the installed consolidation:

        # pkg list userland-incorporation

It is possible that cog-spur, or any of the other Squeak packages, is in the userland-incorporation : this can be checked with the command :

    # pkg contents -m userland-incorporation | grep cog-spur

Installing Squeak


Squeak consists of a VM (virtual machine) and Smalltalk images. You can find Smalltalk images at files.squeak.org or at cuis-smalltalk.org.

Because users of Smalltalk are normally saving their own custom image, there exist many other images on the internet to download.

The images are cross-platform (in theory) and do not depend on Solaris. They can run on Windows or Linux or any other platform, in the same way as they will on Solaris.

The VM (virtual machine) is the interpreter that is Solaris specific, and that runs (as some sort of interpreter or just-in-time compiler) the Smalltalk byte-code from the portable Smalltalk image.

The 'classic' VM (virtual machine) is packaged as squeak and it is able to run 32-bit Squeak images; technically speaking those images are format 6505 which means 'a 32-bit image with closure support and float words stored in native platform order (6505)'.

On Solaris install squeak as follows:

        # pkg install -v squeak

After installation, see the squeak(1) manpage for documentation:

         # man squeak

After installation you can verify the installation as follows

       # pkg list squeak

During installation you may notice:

> Changed mediators:
>  mediator squeak:
>           version: None -> 4 (system default)

After install the squeak binary, you have to download the Smalltalk sources and image from the Squeak website. This can be done with one command:

       # inisqueak

Alternatively, it's also possible to simply download the zip files from the Squeak website.

       # unzip SqueakV46.sources.zip

and

       # unzip Squeak4.6-15102.zip

You would then launch Squeak as follows (also see the manpage for further details) :

       # squeak Squeak4.6-15102.image

It is possible to compile squeak in 64-bit but there are very few Smalltalk Squeak-4 64-bit images available (those are the so-called 68000 images). See list of Squeak image formats for more info.

For running 64-bit images, the package stack-spur can be used with any of the Squeak 5 or Squeak 6 64-bit images.

The stack-spur (and cog-spur) package supports the 68021 format which is 'a 64-bit Spur image with closure support and float words stored in native platform order using Spur object format'.

It is possible to simultaneously install squeak and stack-spur as follows:

         # pkg mediator squeak
         # pkg install -v stack-spur

At the end of installation the hardlink squeak will point to the stack-spur binary. You will notice that the mediator changed to stack-spur.

        # pkg mediator squeak

The system-administrator can override the Solaris choice by using the pkg set-mediator or pkg unset-mediator commands.

After installation of opensmalltalk/stack-spur you can download sources and Smalltalk images from the Squeak website :

         # unzip SqueakV50.sources.zip

and

         # unzip Squeak5.3-19431-64bit.zip

You would then launch squeak as follows:

         # squeak Squeak5.3-19431-64bit.image

Squeak V5 can also run Cuis images. See the Cuis website for more details. Given the CuisV5.sources and Cuis5.0-4112.image :

         # squeak Cuis5.0-4112.image

Because both packages can be installed simultaneously it is possible to run side-by-side Squeak 4.6 and Squeak 5.3, Cuis Smalltalk or Squeak 6.0 alpha images.

There is an additional package cog-spur which is the Cog implementation of Squeak. This is a faster implementation of the Squeak virtual machine.

It can be installed as follows:

         # pkg install -v cog-spur

During installation of the cog implementation, the mediator will be changed as follows:

> Changed mediators:
 > mediator squeak:
 >         version: None -> 5 (system default)
 >  implementation: None -> cog-spur (system default)

The stack-spur and cog-spur packages can be installed at the same time, and the system administrator can choose the implementation with the pkg unset-mediator and set-mediator commands.

Updating Squeak


The complete Solaris system can be updated with:

         # pkg update

to update the entire userland-incorporation.
If there is a need to upgrade squeak without upgrading the userland-incorporation, you can do :

         # pkg change-facet facet.version-lock.runtime/smalltalk/stack-spur=false

and then update stack-spur or any other squeak package separately:

         # pkg update stack-spur

Solaris Profile


When you run Squeak, you may see the error (or warning) :

pthread_setschedparam failed: Not owner

There are several ways to fix this error, or to get rid of the warning.

A global method could be to modify

/etc/security/policy.conf

See man policy.conf for more info. It is possible there to change PROFS_GRANTED=Basic Solaris User or simply :

PRIV_DEFAULT=basic,proc_priocntl

The above adds the following privilege globally :

# ppriv -v -l proc_priocntl
proc_priocntl
    Allows a process to elevate its priority above its current level.
    Allows a process to change its scheduling class to any scheduling class,
    including the RT class.

Another possibility is to create a special profile for Squeak (or modify the "Basic User" profile).

This profile can be used to run Squeak with a Solaris pfexec "in a special profile", which one may think of as some sort of "sudo" command.

To do this, add a profile "Squeak" (or modify the "Basic Solaris User" profile) to allow Squeak to change (or set) the priority, which is normally not permitted for a process on Solaris.

# profiles -p Squeak
profiles:Squeak> set desc="Allow Squeak VM to Set Priority"
profiles:Squeak> add cmd=/usr/bin/squeak
profiles:Squeak:squeak> set privs=proc_priocntl
profiles:Squeak:squeak> end
profiles:Squeak> commit
profiles:Squeak> info
        name=Squeak
        desc=Allow Squeak VM to Set Priority
        cmd=/usr/bin/squeak
profiles:Squeak> exit

The above commands adds the following entries to /etc/security :

# tail /etc/security/exec_attr
Squeak:solaris:cmd:::/usr/bin/squeak:privs=proc_priocntl

and

# tail /etc/security/prof_attr
Squeak:::Allow Squeak VM to Set Priority:

Once the profile is created, you can assign the profile to a user:

$ cp /etc/user_attr /etc/user_attr.backup
$ usermod -P Squeak someuser

This changes the file /etc/user_attr; you can also edit /etc/user_attr.

The user can verify that the profile is available:

$ userattr profiles
Squeak,System Administrator

Another possibility is to add the Squeak profile globally to the policy.conf file :

PROFS_GRANTED=Basic Solaris User,Squeak

Finally the following two pfexec usages both (!) require the Squeak profile to exist. So the second form with -P proc_priocntl as argument to pfexec only works if proc_priocntl is in the "intersection of the available profiles and proc_prioctnl". So it's not enough to simply pfexec -P proc_prioctnl the squeak vm, it is necessary that the root user assigns the Squeak profile to the user.

$ pfexec squeak Cuis5.0-4112.image

or

$ pfexec -P proc_priocntl squeak Cuis5.0-4112.image

Verify as follows the squeak threads (LWP light-weight processes)

$ ps -eLo pid,pri,lwp,class,comm | grep squeak
 3849  44      1   IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
 3849  49      2   IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
 3849  49      3   IA /usr/lib/squeak/5.0-202004221445-sunos/squeak
 3849  50      4   IA /usr/lib/squeak/5.0-202004221445-sunos/squeak

Note that there are 4 threads (LWP) and they are in the schedule class IA;
the last thread is running at priority 50 (the others at 49).


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.