build64 in squeakvm classic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

build64 in squeakvm classic

stes
 

By default the example Makefile from
./platforms/unix/cmake/Makefile.example

seems to be building for the build64 also a -m32 binary on Solaris

bash-4.4$ file ./lib/squeak/4.16.7-3775_64bit/squeakvm64
./lib/squeak/4.16.7-3775_64bit/squeakvm64: ELF 32-bit LSB executable 80386
Version 1 [SSE2 SSE], dynamically linked, not stripped

If I change the Makefile.example to use -m64 (to generate 64bit) it works:

bash-4.4$ file ./lib/squeak/4.16.7-3775_64bit/squeakvm64
./lib/squeak/4.16.7-3775_64bit/squeakvm64: ELF 64-bit LSB executable AMD64
Version 1 [SSE2 SSE], dynamically linked, not stripped

there was one patch required for

Index: platforms/unix/vm-sound-Sun/sqUnixSoundSun.c
===================================================================
--- platforms/unix/vm-sound-Sun/sqUnixSoundSun.c (revision 3775)
+++ platforms/unix/vm-sound-Sun/sqUnixSoundSun.c (working copy)
@@ -72,7 +72,7 @@
 #endif
 
 static sqInt sound_Stop(void);
-static int sound_AvailableSpace(void);
*+static sqInt sound_AvailableSpace(void);*
 
 static int auFd=       -1;   /* open on /dev/audio */
 static int auCtlFd=       -1;   /* open on /dev/audioctl */


the type "int" should be changed to "sqInt"  for the 64 bit compile

now I'm not sure how to test that it opens a 64bit Squeak image ...





--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: build64 in squeakvm classic

stes
 

I've build a squeakvm64 but I don't know how to test it

The latest Squeak 4.6 on files.squeak.org has

bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak4.6-14191.image
6505


so the format is 6505 and the bin/squeak shell script seems to launch 64 bit
only for

    case "${format}" in
        6502)   vms="${squeakvm}";;
        6504)   vms="${cogvm} ${squeakvm}";;
        6505)   vms="${cogvm} ${squeakvm}";;
        68000)  vms="${squeakvm64}"; plgdir="${plgd64}";;
        68002)  vms="${squeakvm64}"; plgdir="${plgd64}";;
        68003)  vms="${squeakvm64}"; plgdir="${plgd64}";;

so those are the 68000 range formats that are for 64 bit but they are not on
files.squeak.org it seems.

on squeakvm.org there is a 64 bit which seems to work:

./lib/squeak/4.16.7-3775/ckformat
bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat sq64-20101106-dtl.image
68000

bash-4.4$ bin/squeak sq64-20101106-dtl.image
failed loading module
./squeak/lib/squeak/4.16.7-3775_64bit/so.SqueakFFIPrims due to ld.so.1:
squeakvm64: fatal: relocation error: file
./squeak/lib/squeak/4.16.7-3775_64bit/so.SqueakFFIPrims: symbol
ffiLogFileNameOfLength: referenced symbol not found

there is a warning for one module

but the bin/squeak launches in that case

squeak/lib/squeak/4.16.7-3775_64bit/squeakvm64 sq64-20101106-dtl.image


this seems to work (I can browse the objects)

but because there is no images on files.squeak.org for this version, it does
not make sense to pursue 64bit in the "classic vm" I guess




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: build64 in squeakvm classic

David T. Lewis
 
Hi stes,

If I understand correctly, you have successfully built a 32-bit VM
that runs a 64-bit V3 image. I have not actually tested that combination
in quite a few years, so I am happy to hear that it still works.

The 64-bit V3 image was created by Dan Ingalls and Ian Piumarta. A home
page based on the original release is at http://squeakvm.org/squeak64/
The image format for this was intentially simple, and was (I think)
intended as a proof of concept for later work.

I did later work to provide better support in the VM for the 64-bit
V3 image, notably including the ability to use a single code base to
produce VM executables for either the 32-bit V3 image or the 64-bit
image, and to be able to compile the VM as native 32 or 64 bit
executables in either case. That is what you are seeing now when you
use the Makefile.example, which builds VM executables for the 32-bit
and 64-bit VM images on whatever runtime platform you have (32-bits
in your case).

The 64-bit Spur images that we use today were developed by Eliot
Miranda. This image format was designed from the beginning with
64-bit object addressing in mind, and it provides a number of other
design advantages as well.

No 64-bit V3 images were ever released on squeak.org, and it has
never been part of an official release.

If you are interested in making a 64-bit version of one of your
existing 32-bit V3 images (image format 6504 or 6505), it can
be done using the SystemTracer64, which can be found in
http://www.squeaksource.com/SystemTracing 

Some explanation is at http://wiki.squeak.org/squeak/2315

Dave


On Sun, Mar 29, 2020 at 10:59:41AM -0500, stes wrote:
>  
>
> I've build a squeakvm64 but I don't know how to test it
>
> The latest Squeak 4.6 on files.squeak.org has
>
> bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak4.6-14191.image
> 6505
>

If you wanted to convert that image into the 64-bit V3 format, you
would do this:

1) Open the image with a classic interpreter VM, and save it. This will
save it as image format 6504.

2) Open the image again, and load the SystemTracing package





>
> so the format is 6505 and the bin/squeak shell script seems to launch 64 bit
> only for
>
>     case "${format}" in
>         6502)   vms="${squeakvm}";;
>         6504)   vms="${cogvm} ${squeakvm}";;
>         6505)   vms="${cogvm} ${squeakvm}";;
>         68000)  vms="${squeakvm64}"; plgdir="${plgd64}";;
>         68002)  vms="${squeakvm64}"; plgdir="${plgd64}";;
>         68003)  vms="${squeakvm64}"; plgdir="${plgd64}";;
>
> so those are the 68000 range formats that are for 64 bit but they are not on
> files.squeak.org it seems.
>
> on squeakvm.org there is a 64 bit which seems to work:
>
> ./lib/squeak/4.16.7-3775/ckformat
> bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat sq64-20101106-dtl.image
> 68000
>
> bash-4.4$ bin/squeak sq64-20101106-dtl.image
> failed loading module
> ./squeak/lib/squeak/4.16.7-3775_64bit/so.SqueakFFIPrims due to ld.so.1:
> squeakvm64: fatal: relocation error: file
> ./squeak/lib/squeak/4.16.7-3775_64bit/so.SqueakFFIPrims: symbol
> ffiLogFileNameOfLength: referenced symbol not found
>
> there is a warning for one module
>
> but the bin/squeak launches in that case
>
> squeak/lib/squeak/4.16.7-3775_64bit/squeakvm64 sq64-20101106-dtl.image
>
>
> this seems to work (I can browse the objects)
>
> but because there is no images on files.squeak.org for this version, it does
> not make sense to pursue 64bit in the "classic vm" I guess
>
>
>
>
> --
> Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: build64 in squeakvm classic

stes
 


David T. Lewis wrote
> Hi stes,
>
> If I understand correctly, you have successfully built a 32-bit VM
> that runs a 64-bit V3 image. I have not actually tested that combination
> in quite a few years, so I am happy to hear that it still works.

Yes, I am trying various combinations "squeakvm classic" in 32bit and 64bit
(build64) mode,
and also the "opensmalltalk vm" in 32 bit and 64 bit.

Initially I was a little confused regarding the various "Squeak images"
available,
but thanks for explaining, what you wrote, clarifies the situation and the
situation regarding 64bit images.

By the way the minor patch to compile "squeak vm" classic on solaris amd64
was:

bash-4.4$ svn diff platforms/
Index: platforms/unix/vm/config.cmake
===================================================================
--- platforms/unix/vm/config.cmake (revision 3775)
+++ platforms/unix/vm/config.cmake (working copy)
@@ -202,7 +202,7 @@
 
 # sqUnixMain.c
 
-SET (VM_BUILD_STRING "\"Unix built on \"__DATE__ \" \"__TIME__\" Compiler:
\"__VERSION__")
+SET (VM_BUILD_STRING "\"Unix built on \"__DATE__ \" \"__TIME__\" Compiler:
${CMAKE_C_COMPILER_VERSION}\"")
 
 CONFIG_DEFINE (VM_BUILD_STRING)
 
Index: platforms/unix/vm-sound-Sun/sqUnixSoundSun.c
===================================================================
--- platforms/unix/vm-sound-Sun/sqUnixSoundSun.c (revision 3775)
+++ platforms/unix/vm-sound-Sun/sqUnixSoundSun.c (working copy)
@@ -72,7 +72,7 @@
 #endif
 
 static sqInt sound_Stop(void);
-static int sound_AvailableSpace(void);
+static sqInt sound_AvailableSpace(void);
 
 static int auFd=       -1;   /* open on /dev/audio */
 static int auCtlFd=       -1;   /* open on /dev/audioctl */




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html