After some hacking, I can invoke squeak and get some version info
As I get time, I will continue hacking on this and as time permits, I will work with whoever is interested.
Process I am following is as follows
cp -Rv build.linux64x64/ build.freebsd64x64
cd build.freebsd64x64/squeak.cog.spur/
[create backup copies of original plugins.* and build/mvm
cp plugins.int plugins.int.orig ; cp plugins.ext plugins.ext.orig
cp build/mvm ./
[hack,baby hack!]
reduce plugins.int to minimal (I blogged on this a couple of years ago: )
AsynchFilePlugin \
B2DPlugin \
BitBltPlugin \
after some hacking, I reduced plugins.ext to this:
B3DAcceleratorPlugin \
SqueakFFIPrims \
LocalePlugin \
UnicodePlugin \
UnixOSProcessPlugin \
UUIDPlugin \
ImmX11Plugin \
modified mvm to this (note the FreeBSD addition to the case statement, the addition of libiconv and the –without–vm-sound-FOO)
#!/usr/bin/env bash
set -e
# Spur VM with VM profiler and threaded heartbeat
case $(uname -s) in
           CFLAGS=”$CFLAGS -I/usr/local/include”
           LIBS=”$LIBS -lexecinfo”
           LDFLAGS=”$LDFLAGS -L/usr/local/lib”
           CFLAGS=”$CFLAGS -I/usr/local/include”
           LIBS=”$LIBS -lexecinfo -liconv”
           LDFLAGS=”$LDFLAGS -L/usr/local/lib”
if [ $# -ge 1 ]; then
        INSTALLDIR=”$1″; shift
echo -n “clean? “
read a
case $a in
n|no|N|NO)      echo “ok but this isn’t safe!!”;;
*)                      test -f Makefile && make reallyclean
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure –without-npsqueak \
                –with-vmversion=5.0 \
                –with-src=spur64src \
                –without-vm-sound-MacOSX \
                –without-vm-sound-Sun \
                –without-vm-sound-custom \
                –without-vm-sound-ALSA \
        TARGET_ARCH=”-m64″ \
        CFLAGS=”$CFLAGS” \
        LIBS=”$LIBS” \
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
./mvm  (it will error out trying to build sound plugins even though I put those –without-vm-sound-foo thingies in)
make[1]: stopped in /usr/home/timmy/usr/src/opensmalltalk-vm/build.freebsd64x64/squeak.cog.spur/build/vm-sound-ALSA
edit the Makefile and search for “sound”
modify LIBS
LIBS=           -luuid -lutil -lpulse-simple -lasound  -lm  -lexecinfo -liconv
LIBS=           -luuid -lutil  -lm  -lexecinfo -liconv
PLUGINS_LA      =  vm-display-X11${la} vm-display-null${la} vm-sound-ALSA${la} vm-sound-NAS${la} vm-sound-OSS${la} vm-sound-null${la} vm-sound-pulse${la} B3DAcceleratorPlugin${la} SqueakFFIPrims${la} LocalePlugin${la} UnixOSProcessPlugin${la} UUIDPlugin${la} ImmX11Plugin${la} XDisplayControlPlugin${la}
becomes :
PLUGINS_LA      =  vm-display-X11${la} vm-display-null${la}  B3DAcceleratorPlugin${la} SqueakFFIPrims${la} LocalePlugin${la} UnixOSProcessPlugin${la} UUIDPlugin${la} ImmX11Plugin${la} XDisplayControlPlugin${la}
(Why are the –without-vm-sound–… directives ignored?)
type make.
it compiles.
but the ‘getversion’ program barfs a bit (probably UUID problemvi M):
VM_RELEASE: $CommitHash$
VERSION_TAG: 5.0-$CommitHash$
VERSION_NUMBER: 5.0.$CommitHash$
DEFAULT_IMAGE_NAME: squeak.image
timmy@dpdev1:~/usr/src/opensmalltalk-vm/build.freebsd64x64/squeak.cog.spur/build %
and the resulting products output reflects that:
tree sqcogspur64linuxht/
|– bin
|   `– squeak
|– lib
|   `– squeak
|       `– 5.0-$CommitHash$
|           `– squeak
`– squeak
hack some more, renaming the lib/squeak/5.0
mv 5.0-\$CommitHash\$/ 5.0
check the executable:
file 5.0/squeak 5.0/squeak: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 11.1, FreeBSD-style, not stripped
invoke it and check version (outputs as at the beginning of the post)
try to run it..
../opensmalltalk-vm/products/sqcogspur64linuxht/lib/squeak/5.0/squeak Squeak5.1-16548-64bit.image -headless
squeak: could not find any display driver
Abort (core dumped)

Tobias Pape solved the problem here: http://forum.world.st/unregistered-not-called-on-expired-session-td5070103.html#a5070551



Add class side method to

TBSBootstrapExample class >>methodNamed: aSymbol
^ self >> aSymbol

The “>>” message is from Behavior…take the time to look it up, its a great one for the toolbox.


Add instance side method to:


CompiledMethod >sourceCode
^ self getSource


My hunch is that this is a pharo thing that does not port to Seaside until now.



Squeak Help rant

I am currently writing some Help for the PostgresV3 package and I am reminded why I dislike the Squeak Help infrastructure.

In no particular order, my beefs:

  1. I am coding Help instead of Writing Help. I.e.
  2. I am thinking about Coding instead of thinking about the Subject Matter
  3. (Why did I start using 1700 Writing conventions of capitalizing Odd Words? Nevermind, it is late)
  4. The Help is limited to the Squeak environment.
  5. I cannot use the linux tools: ‘man’ , ‘info’, ’emacs org-mode’ .
  6. The “documents” are small. That is, I am forced into navigating many small pages of text instead of one big page of text.
  7. The Search bar works, and is appreciated.
  8. Navigation depends on the left side tree.
  9. When I click on a sub-topic (with the book icon) there is no content displayed in the content pane.

Rant off.

The DNS lookup problems I was having with my router getting a static i.p  “went away” when I hooked my workstation directly to the modem, configured the workstation for DHCP and then saved the /etc/resolv.conf (which appears to be populated by DHCPCD into a backup file.


I then reconfigured the workstation for static-ip, plugged in the router and my workstation to the router and then copied the backup resolv.conf to the /etc/resolv.conf.


That solved the problem.

startx — -listen tcp

With Slackware 14.2 X don’t listen no more unless you tell it to.


The old routine of …


xhost +




export DISPLAY=

xclock &

doesn’t work out of the box


you explicitly tell X to listen

In practical terms that means






startx — -listen tcp








debugger after update on left. before update on right

debugger after update on left. before update on right

Method Category browsing

I want this for some Help documentation in CMakeVMMakerSqueak so I can show the end user all the methods in a specific method category.


Here is a quick example showing all the methods in the Class CompiledMethod under method category ‘accessing-pragmas & properties’:


Browser openBrowserView:((Browser new)
selectSystemCategory: #’Kernel-Methods’;
selectClass: CompiledMethod;
metaClassIndicated: false;
selectMessageCategoryNamed: #’accessing-pragmas & properties’;
selectMessageNamed: nil;
label: ‘Message Category Browser (‘, #’Kernel-Classes’ asString, ‘)’.

You can get that view by right-clicking on the method category name and selecting ‘browse’.

I think a wrapper class for this would be useful.





Here are the command line commands I used to get CogSpur running with a VMMaker image and the CMakeVMakerSqueak package starting from scratch.

#Do an svn checkout

svn co http://www.squeakvm.org/svn/squeak/branches/Cog

#run Eliot’s bash script to get the VMMaker image up and configured.

cd Cog/image
./ buildspurtrunkvmmakerimage.sh
./ cogspurlinuxht/squeak  SpurVMMaker.image  &

#Install the CMakeVMMakerSqueak package and see the documentation
Monticello browser
Repository http://source.squeak.org/VMMaker
CMakeVMMaker (latest) load
CMakeVMMakerSqueak (latest) load
HelpBrowser topic CMakeVMMakerSqueak

save and quit

#set up my personal working environment

#put the executable cog/spur in my PATH

mv cogspurlinuxht /home/tty/usr/bin/

#set up a development area independent of the Cog svn source tree
cd ../../
mkdir cogspurVMMaker
mv Cog/image/SpurVMMaker.* cogspurVMMaker/
mv Cog/image/SqueakV50.sources cogspurVMMaker/

#the tools are installed. now we need to put the Cog source tree
#in a subdirectory of the .image file. The directory is named ‘oscogvm’

cd cogspurVMMaker
mkdir oscogvm
rsync -Carv  –exclude=”image*”  ../Cog/ cogspurVMMaker/

#the resulting work environment directory tree looks like this

tree -d -L 2  cogspurVMMaker/
`– oscogvm
|– build.linux32ARM
|– build.linux32x86
|– build.linux64x64
|– build.macos32x86
|– build.macos64x64
|– build.win32x86
|– history
|– nsspursrc
|– nsspurstack64src
|– nsspurstacksrc
|– nssrc
|– platforms
|– processors
|– products
|– scripts
|– sources
|– spur64src
|– spursistasrc
|– spursrc
|– spurstack64src
|– spurstacksrc
|– src
`– stacksrc


This is a quick note as I get up to speed on the project after a long hiatus. Ben at the mailing list asked for help on getting set up. Here is one of the scripts to install the tools:


| manifest load |
Scanner prefAllowUnderscoreSelectors: true.

manifest := #(    (‘http://source.squeak.org/FFI’                    1    (‘FFI-Pools’ ‘FFI-Kernel’))
(‘http://source.squeak.org/VMMaker’        6    (‘Balloon-Engine-Pools’ ‘VMMaker.oscog’ ‘Cog’ ‘CogTools’ ‘ImageFormat’ ‘CMakeVMMaker’ ‘CMakeVMMakerSqueak’))
(‘http://ss3.gemstone.com/ss/MethodMassage’        3    (‘MethodMassage’ ‘MethodMassageCompatibility’))
(‘http://www.squeaksource.com/AioPlugin’        7    (‘VMConstruction-Plugins-AioPlugin’))
(‘http://www.squeaksource.com/Alien’            0    (‘Alien’))
“(‘http://www.squeaksource.com/FreeTypePlus’    5    (‘FreeType’)) can’t load this.  it is toxic to Squeak 4.5”
(‘http://ss3.gemstone.com/ss/FreeTypePlus’    5    (‘FreeTypeConstants’ ‘FreeType’ ‘FreeTypeTests’))
(‘http://www.squeaksource.com/FreetypePlugin’    8    (‘Freetype-Plugin’))
(‘http://www.squeaksource.com/OSProcess’        4    (‘OSProcess’))
(‘http://www.squeaksource.com/OSProcessPlugin’    9    (‘VMConstruction-Plugins-OSProcessPlugin.oscog’))
(‘http://www.squeaksource.com/rb’                5    (‘AST-Core’ ‘AST-Semantic’ ‘AST-Tests-Core’ ‘AST-Tests-Semantic’ ‘Refactoring-Changes’ ‘Refactoring-Core’ ‘Refactoring-Environment’ ‘Refactoring-Tests-Changes’ ‘Refactoring-Tests-Core’ ‘Refactoring-Tests-Environment’))
(‘http://www.squeaksource.com/Speech’            2    (‘SharedPool-Speech’ ))).

load := (manifest collect:
[:path :order :packages| | repository |
repository := MCHttpRepository
location: path
user: ‘squeak’
password: ‘squeak’.
MCRepositoryGroup default addRepository: repository.
{repository. order. packages}] valueWithArguments: tuple])
sort: [:a :b| a second <= b second].

#(    ‘FT2Constants.st’
) do:
[:fileName| (FileDirectory default fileNamed: fileName) fileIn].

World findATranscript: nil.

load do:
[:repository :order :packages|
packages do:
[:package| | latestVersion |
latestVersion := (repository versionNamesForPackageNamed: package) first.
[| version |
version := ((MCCacheRepository default includesVersionNamed: latestVersion)
ifTrue: [MCCacheRepository default]
ifFalse: [repository]) versionNamed: latestVersion.
version load.
version workingCopy repositoryGroup addRepository: repository]
on: Warning
do: [:ex|
(ex messageText beginsWith: ‘This package depends on the following classes’) ifFalse:
[ex pass].
ex resume]]]
valueWithArguments: tuple].

For those folks getting the pthread_setschedparam the example Eliot gives at http://www.mirandabanda.org/files/Cog/VM/VM.r3006/README.3006 does not apply to Slackware linux and I suspect other distros too.

I did some digging this morning and figured out how to set this up on my system.

This site https://www.hackthissite.org/articles/read/932 gives an overview, but it is a bit outdated.

On Slackware 14.1 the output of ‘man limits’ shows a few more entries

· A: max address space (KB)

· C: max core file size (KB)

· D: max data size (KB)

· F: maximum filesize (KB)

· K: file creation mask, set by umask(2).

· I: max nice value (0..39 which translates to 20..-19)

· L: max number of logins for this user

· M: max locked-in-memory address space (KB)

· N: max number of open files

· O: max real time priority

· P: process priority, set by setpriority(2).

· R: max resident set size (KB)

· S: max stack size (KB)

· T: max CPU time (MIN)

· U: max number of processes

I created the /etc/limits file and added an entry

tty O100

logout out and back in and I was able to run the squeak.cog.v3 build just fine.
Prior to that limit fix, I was getting the dreaded pthread_setschedparam error and could only run the vm as root.

Hope that helps.