Andrew Gaylard wrote:
 



Hi,
Hi Andrew,


This patch fixes 4 problems which prevented the VM from building
on Solaris/SPARC.  They shouldn't cause problems for other
Interesting that there is another guy running Squeak under Solaris.

platforms (famous last words), so please would someone (Ian?)
confirm this before checking in.

The problems fixed by this patch are:
  1. "sun" is already defined by some header or other in Solaris;
    I've changed it to s_un.
  2. AF_LOCAL isn't defined on Solaris.  W Richard Stevens'
    "Advanced programming in the Unix environment" says that
    AF_UNIX is more standard anyway.
  3. Solaris' feof() call really wants a FILE*.
  4. A missing prototype is added for sound_AvailableSpace(void)
Which version of the VM sources you are talking about?
I have 3.9-8 running for quite some time on my Blade 2000.
Although I haven't used sound yet.
I have good experiences with Sun's CoolTools gcc for SPARC systems.
This is a gcc-4.0.4 frontend with a SunStudio 12 code generator.
The code runs at least twice as fast as with a plain gcc-3.4.3.


With this patch, the VM builds and runs fine if built with gcc-3.4.3.
I've checked both the stock 3.9a-7024 image as well as the
etoys image. (My motivation for this whole exercise is to fix the
problems with audio under Solaris for my young daughter to use
etoys: the first sound plays, but after that, no sounds ever play.)

With gcc-4.2.1 and -O2, the VM won't even start up (complains
about a missing vm-display-X11, even though it's there).  With
gcc-4.2.1 and no -O2, the VM starts, runs for a short while, and
then cores with a bus error.  gdb shows a corrupt stack.  I'm
about to build gcc-4.1.2 and give it a spin building the VM to
try to track this down.  But I do suspect bad code generation
with gcc-4.2.1.
Did you manage to build libffi-2.0? This library is part of gcc-4.2.1.
AFAIK it is necessary for Squeak's FFI. I have only an old libffi-1.2.0 that
has some Solaris bugs. So I don't have FFI which is needed for some interesting
packages (e.g. ODBC).

Regards
Andreas