The squeak-vm in the official Debian repository (http://packages.debian.org/lenny/squeak-vm )  is compiled as a 64 bits app in amd64. I had to apply some patches that you can see in the debianized sources (directory debian/patches). Those patches fix some of the bugs in 64 bits, but not they all. The vm is usable (I'm working everyday in amd64) and works almost well, except for 64 bits bugs with the SoundPlugin .

Regards.
José L.



2008/4/28 Matej Kosik <kosik@fiit.stuba.sk>:
Friends,

I maintain these Debian repositories:
http://wiki.squeak.org/squeak/3616

There are binary packages for i386 which work fine.

I am trying to build similar binary packages for amd64 architecture. This is motivated by recent
"Squeak Debian Amd64 package" threat on this list.
I am having troubles to understand how to do that (I am getting old and stupid, I guess) and seeking
some help.

First, I need the source. It is available:
 http://www.squeakvm.org/index.html
   http://www.squeakvm.org/squeak64/
     http://squeakvm.org/squeak64/dist3/
       http://squeakvm.org/squeak64/dist3/Squeak-3.8a-2.src.tar.gz

The mentioned Squeak VM version seemed to be slightly older than than latest one visible here:

 http://www.squeakvm.org/unix/
 http://www.squeakvm.org/unix/release/Squeak-3.10-1.src.tar.gz

I presume that newer is better. So I am trying Squeak-3.10-1.src.tar.gz

  wget http://www.squeakvm.org/unix/release/Squeak-3.10-1.src.tar.gz
  tar xvzf Squeak-3.10-1.src.tar.gz

The top-level README tells how to install Squeak if I have a root account but *I do not have root
acount*. So I must try something different. Here:

 http://www.squeakvm.org/squeak64/

are described other procedures that can be modified to install squeak to my home dir.

 mkdir bld
 cd bld
 ../platforms/unix/config/configure --with-src=src32 --prefix=/home/kosik

(Is it expected to work?)

Directories ~/bin and ~/lib exist, so the above command should have sense. Here is its output

 http://altair.sk/uploads/tmp/1.txt

There is one warning:

 config.status: WARNING:  ../platforms/unix/config/make.cfg.in seems to ignore the --datarootdir
setting

What does it mean?

If I try to go on, I get this error

 http://altair.sk/uploads/tmp/2.txt

/bin/sh /home/kosik/work/debian/etch/squeak/Squeak-3.10-1/bld/libtool --mode=link gcc -g -O2
-DLSB_FIRST=1    -export-dynamic -R/home/kosik/lib -o squeak vm/vm.a B2DPlugin/B2DPlugin.a
BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a SocketPlugin/SocketPlugin.a disabledPlugins.o
version.o -lutil -ldl -lm -lnsl   vm/vm.a
gcc -g -O2 -DLSB_FIRST=1 -o squeak disabledPlugins.o version.o -Wl,--export-dynamic  vm/vm.a
B2DPlugin/B2DPlugin.a BitBltPlugin/BitBltPlugin.a FilePlugin/FilePlugin.a
SocketPlugin/SocketPlugin.a -lutil -ldl -lm -lnsl vm/vm.a -Wl,--rpath -Wl,/home/kosik/lib
vm/vm.a(sqVirtualMachine.o): In function `sqGetInterpreterProxy':
/home/kosik/work/debian/etch/squeak/Squeak-3.10-1/platforms/Cross/vm/sqVirtualMachine.c:202:
undefined reference to `obsoleteDontUseThisFetchWordofObject'
/home/kosik/work/debian/etch/squeak/Squeak-3.10-1/platforms/Cross/vm/sqVirtualMachine.c:333:
undefined reference to `fetchLong32ofObject'
/home/kosik/work/debian/etch/squeak/Squeak-3.10-1/platforms/Cross/vm/sqVirtualMachine.c:334:
undefined reference to `getThisSessionID'
/home/kosik/work/debian/etch/squeak/Squeak-3.10-1/platforms/Cross/vm/sqVirtualMachine.c:335:
undefined reference to `ioFilenamefromStringofLengthresolveAliases'
/home/kosik/work/debian/etch/squeak/Squeak-3.10-1/platforms/Cross/vm/sqVirtualMachine.c:336:
undefined reference to `vmEndianness'
collect2: ld returned 1 exit status
make: *** [squeak] Error 1

So, I did not succeeded here.

For curiousity, I have tried to look at the 64-bit version images. So I have tried to build VM as
follows:

 ../platforms/unix/config/configure --with-src=src64 --prefix=/home/kosik

The configuration yields the same warning and building ends with the same error. So I am trying also
the old way (plus the --prefix, no --with-src)

 ../platforms/unix/config/configure --prefix=/home/kosik
 make
 make install

I do not notice any failure this far. Squeak binary is installed in my ~/bin directory.
There is /home/kosik/lib/squeak/ directory with the following contents

 /home/kosik/lib/squeak/
 /home/kosik/lib/squeak/3.10-1
 /home/kosik/lib/squeak/3.10-1/B3DAcceleratorPlugin
 /home/kosik/lib/squeak/3.10-1/XDisplayControlPlugin
 /home/kosik/lib/squeak/3.10-1/vm-sound-null
 /home/kosik/lib/squeak/3.10-1/squeak
 /home/kosik/lib/squeak/3.10-1/vm-display-null
 /home/kosik/lib/squeak/3.10-1/PseudoTTYPlugin
 /home/kosik/lib/squeak/3.10-1/npsqueak.so
 /home/kosik/lib/squeak/3.10-1/VideoForLinuxPlugin
 /home/kosik/lib/squeak/3.10-1/Squeak3D
 /home/kosik/lib/squeak/3.10-1/vm-display-fbdev
 /home/kosik/lib/squeak/3.10-1/vm-display-X11
 /home/kosik/lib/squeak/3.10-1/UnixOSProcessPlugin
 /home/kosik/lib/squeak/npsqueakregister
 /home/kosik/lib/squeak/npsqueakrun

I am slightly puzzled what kind of image (32-bit or 64-bit) I need since I did not specified it
--with-src. What is the default?

If I try 64-bit image downloaded from here:

http://squeakvm.org/squeak64/dist3/Squeak64-3.8g-6548.image.tar.gz

  squeak  Squeak64-3.8g-6548.image

I get this message:

 could not find display driver vm-display-X11; either:
   - check that /home/kosik/lib/squeak/3.10-1/vm-display-X11.so exists, or
   - use the '-plugins <path>' option to tell me where it is, or
   - remove DISPLAY from your environment.
 Aborted

One puzzling thing is that `make install' generated

 /home/kosik/lib/squeak/3.10-1/vm-display-X11

but the binary requires

 /home/kosik/lib/squeak/3.10-1/vm-display-X11.so

This is slightly confusing. This

  squeak -plugins /home/kosik/lib/squeak/3.10-1 Squeak64-3.8g-6548.image

does not help either. I am logged in remotely, but I can start normal X applications (such as
xclock) so this should not be the problem.

However has experience with this and can help, I would be grateful.

Thanks in advance.