<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Andrew Gaylard wrote:
<blockquote
 cite="mid:9df6f3ea0709231348s4bc21761q3e0d189c02ae6e39@mail.gmail.com"
 type="cite">
  <pre wrap=""> </pre>
  <br>
  <hr size="4" width="90%"><br>
Hi,<br>
</blockquote>
Hi Andrew,<br>
<br>
<blockquote
 cite="mid:9df6f3ea0709231348s4bc21761q3e0d189c02ae6e39@mail.gmail.com"
 type="cite"><br>
This patch fixes 4 problems which prevented the VM from building<br>
on Solaris/SPARC.  They shouldn't cause problems for other<br>
</blockquote>
Interesting that there is another guy running Squeak under Solaris.<br>
<br>
<blockquote
 cite="mid:9df6f3ea0709231348s4bc21761q3e0d189c02ae6e39@mail.gmail.com"
 type="cite">platforms (famous last words), so please would someone
(Ian?)<br>
confirm this before checking in.
  <br>
  <br>
The problems fixed by this patch are:<br>
  <ol>
    <li>"sun" is already defined by some header or other in Solaris;<br>
I've changed it to s_un.</li>
    <li>AF_LOCAL isn't defined on Solaris.  W Richard Stevens'
      <br>
"Advanced programming in the Unix environment" says that<br>
AF_UNIX is more standard anyway.</li>
    <li>Solaris' feof() call really wants a FILE*.</li>
    <li>A missing prototype is added for sound_AvailableSpace(void)</li>
  </ol>
</blockquote>
Which version of the VM sources you are talking about?<br>
I have 3.9-8 running for quite some time on my Blade 2000.<br>
Although I haven't used sound yet.<br>
I have good experiences with Sun's CoolTools gcc for SPARC systems.<br>
This is a gcc-4.0.4 frontend with a SunStudio 12 code generator.<br>
The code runs at least twice as fast as with a plain gcc-3.4.3.<br>
<br>
<blockquote
 cite="mid:9df6f3ea0709231348s4bc21761q3e0d189c02ae6e39@mail.gmail.com"
 type="cite">
  <ol>
    <li><br>
    </li>
  </ol>
With this patch, the VM builds and runs fine if built with gcc-3.4.3.<br>
I've checked both the stock 3.9a-7024 image as well as the <br>
etoys image. (My motivation for this whole exercise is to fix the<br>
problems with audio under Solaris for my young daughter to use
  <br>
etoys: the first sound plays, but after that, no sounds ever play.)<br>
  <br>
With gcc-4.2.1 and -O2, the VM won't even start up (complains<br>
about a missing vm-display-X11, even though it's there).  With<br>
gcc-4.2.1 and no -O2, the VM starts, runs for a short while, and<br>
then cores with a bus error.  gdb shows a corrupt stack.  I'm<br>
about to build gcc-4.1.2 and give it a spin building the VM to<br>
try to track this down.  But I do suspect bad code generation
  <br>
with gcc-4.2.1.<br>
</blockquote>
Did you manage to build libffi-2.0? This library is part of gcc-4.2.1.<br>
AFAIK it is necessary for Squeak's FFI. I have only an old libffi-1.2.0
that<br>
has some Solaris bugs. So I don't have FFI which is needed for some
interesting<br>
packages (e.g. ODBC).<br>
<br>
Regards<br>
Andreas<br>
<br>
</body>
</html>