cannot read file format 6521

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

cannot read file format 6521

stes

Hi,

Is there an easy way to see in the squeak image file name what the "image
format" number is ?

I've built squeakvm from SVN (subversion) on Solaris.  This compile went
relatively well.

I've used the SunPro C Studio "DeveloperWorks" C and C++ compiler (not the
gcc compiler).

When I build (on Solaris) the squeakvm it seems to install fine for the 32
bit.
The build64 almost succeeds as well (97% compiled ok) there is an error
"./squeakvm/platforms/unix/vm-sound-Sun/sqUnixSoundSun.c", line 197:
identifier redeclared: sound_AvailableSpace
I don't have that error in the build 32 bit.

But when I launch this with an old 4.10 image it works, but with the 5.3
image I get:

bash-4.4$ bin/squeak.sh Squeak5.3-19431-32bit.image
This interpreter supports image formats up to 6505, cannot read file format
6521

also for 5.2 same message:
bash-4.4$ bin/squeak.sh Squeak5.2-18221-32bit.image
This interpreter supports image formats up to 6505, cannot read file format
6521

and for 5.0
bash-4.4$ bin/squeak.sh Squeak5.0-15120-32bit.image
This interpreter supports image formats up to 6505, cannot read file format
6521

However it seems the resulted binaries (the resulting VM) that I built
myself from the subversion source code can only run 4.10 or 4.6 images.

for example what works is:

bash-4.4$ bin/squeak.sh Squeak4.6-15102.image

that launches the image correctly

Is the old "unix" squeakvm able to run 5.x images at all or should one use
the "opensmalltalk" VMs for that ?




--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

K K Subbu
On 26/03/20 5:58 PM, stes wrote:
>
> Hi,
>
> Is there an easy way to see in the squeak image file name what the "image
> format" number is ?

Yes. Use ckformat command. See http://wiki.squeak.org/squeak/6582

$ ckformat foo.image
6521

> Is the old "unix" squeakvm able to run 5.x images at all or should one use
> the "opensmalltalk" VMs for that ?

You will need opensmalltalk VM for 6521. See
http://wiki.squeak.org/squeak/6290

HTH .. Subbu

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

stes

Thanks, works "like a charm" :

bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak5.0-15120-32bit.image
6521

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

bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat unix-4.10.2.image
6504


Well, in this case being able to build myself the "old" squeakvm is nice, it
still seems to compile fine (even with the SunPro C Studio compiler),  but
it will not help me for running 5.x images.

I'll have to check the opensmalltalk sources (which I am already doing) ...
but I have the impression that those were never compiled on Solaris.



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

Squeak - Dev mailing list
Its great that you are doing this work, stes.

Much appreciated.


---- On Thu, 26 Mar 2020 10:39:46 -0400 stes <[hidden email]> wrote ----


Thanks, works "like a charm" :

bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak5.0-15120-32bit.image
6521

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

bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat unix-4.10.2.image
6504


Well, in this case being able to build myself the "old" squeakvm is nice, it
still seems to compile fine (even with the SunPro C Studio compiler), but
it will not help me for running 5.x images.

I'll have to check the opensmalltalk sources (which I am already doing) ...
but I have the impression that those were never compiled on Solaris.



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html





Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

Eliot Miranda-2
In reply to this post by stes
Hi Stes,

> On Mar 26, 2020, at 7:39 AM, stes <[hidden email]> wrote:
>
> 
> Thanks, works "like a charm" :
>
> bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak5.0-15120-32bit.image
> 6521
>
> bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat Squeak4.6-15102.image      
> 6505
>
> bash-4.4$ ./lib/squeak/4.16.7-3775/ckformat unix-4.10.2.image
> 6504
>
>
> Well, in this case being able to build myself the "old" squeakvm is nice, it
> still seems to compile fine (even with the SunPro C Studio compiler),  but
> it will not help me for running 5.x images.
>
> I'll have to check the opensmalltalk sources (which I am already doing) ...
> but I have the impression that those were never compiled on Solaris.

That could indeed be the case.  But never mind.  If you’re able to build the old squeak vm you’ll be able to build the OpenSmalltalk-VM one.  OpenSmalltalk-VM is a direct descendant.

In the OpenSmalltalk-VM code you’ll see build directories for the form build.<os><word size><processor>.  So, assuming you can use platforms/unix you can add build.sunos32x86 and build.sunos64x64, populated similarly to the build.linux32x86 & build.linux64x64 directories, and submit a pull request (or tar up the files and mail them to the list if you’re not au fait with git).

The mvm files are a little messy but they essentially specify compilation flags and an install name in products, products/assert and products/debug.

_,,,^..^,,,_ (phone)

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

David T. Lewis
In reply to this post by K K Subbu
On Thu, Mar 26, 2020 at 07:02:28PM +0530, K K Subbu wrote:

> On 26/03/20 5:58 PM, stes wrote:
> >
> >Hi,
> >
> >Is there an easy way to see in the squeak image file name what the "image
> >format" number is ?
>
> Yes. Use ckformat command. See http://wiki.squeak.org/squeak/6582
>
> $ ckformat foo.image
> 6521
>

From Squeak, you can also check the format an image file on disk:
        ImageFormat fromFile: 'mySqueakImage.image'

Just load package ImageFormat from the SqueakMap Package Browser.

Also look at methods in 'utility' on the class side of ImageFormat. For example, you can do this:

        ImageFormat versionDescriptions do: [:e | Transcript cr; show: e]

The cformat.c program is generated from ImageFormat like this:

        ImageFormat createCkFormatProgram

And a copy of the generated source code is at http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/src/ckformat.c?revision=3774&view=markup

Dave


Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

stes
In Squeak6.0alpha-19537.image I don't see a class "ImageFormat'.

There is a class 'SmalltalkImage' which has an instance method
imageFormatVersion :

Smalltalk imageFormatVersion

print it returns: 68021

I believe that "Smalltalk" is some sort of global variable of class
SmalltalkImage

I must be missing something but ImageFormat  does not exist in my image, so      
ImageFormat fromFile: 'mySqueakImage.image'  does not work.

Or is the class ImageFormat something that you can download from some place
? (Sorry for beginner's question).



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

Nicolas Cellier
Hi Stes,
ImageFormat is Pharo-specific.
Pharo is a fork of Squeak.
It shares a part of class library but slowly diverge.
It also shares the VM, but even that part was recently forked (summer 2019).

Smalltalk class -> SmalltalkImage

It is a reflection of the "system", and as such a sort of big can of utilities.
Pharo is somehow "butchering the mammoth" by splitting the large utility into smaller utility classes...
But if you don't flesh out the objects with own behavior, this is not necessarily considered useful.
You end up with more vocabulary to learn (ImageFormat, OS... etc...).

Le jeu. 2 avr. 2020 à 12:34, stes <[hidden email]> a écrit :
In Squeak6.0alpha-19537.image I don't see a class "ImageFormat'.

There is a class 'SmalltalkImage' which has an instance method
imageFormatVersion :

Smalltalk imageFormatVersion

print it returns: 68021

I believe that "Smalltalk" is some sort of global variable of class
SmalltalkImage

I must be missing something but ImageFormat  does not exist in my image, so     
ImageFormat fromFile: 'mySqueakImage.image'  does not work.

Or is the class ImageFormat something that you can download from some place
? (Sorry for beginner's question).



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html



Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

K K Subbu
In reply to this post by stes
On 02/04/20 4:04 PM, stes wrote:
> In Squeak6.0alpha-19537.image I don't see a class "ImageFormat'.

See http://wiki.squeak.org/squeak/6290

ImageFormat package is part of VMMaker repository not Squeak. Only those
who are interested in VM development would need it. Others can use the
ckformat utility to extract the image format for a given image.

(Tip: Right click in the search field of
http://wiki.squeak.org/squeak/search and add a keyword like sqw. Then
you can search swiki directly from the browser's address field with "sqw
ImageFormat").

HTH .. Subbu

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

Eliot Miranda-2
In reply to this post by Nicolas Cellier
Hi Nicolas, Hi Stes,

On Apr 2, 2020, at 5:04 AM, Nicolas Cellier <[hidden email]> wrote:


Hi Stes,
ImageFormat is Pharo-specific.

No it’s not :-)
ImageFormat is a package providing analysis of all Smalltalk images that descend from the Back To The Future Squeak 1.0 image, which includes Squeak, Pharo, Cuis,  Croquet, Qwaq/Teleplace/Terf, and Newspeak.
It is written by our own David Lewis and lives in the VMMaker repository on source.squeak.org.
If you build a VMMaker image I *think* it should be included.  It’s in my image.

Pharo is a fork of Squeak.
It shares a part of class library but slowly diverge.
It also shares the VM, but even that part was recently forked (summer 2019).

Smalltalk class -> SmalltalkImage

It is a reflection of the "system", and as such a sort of big can of utilities.
Pharo is somehow "butchering the mammoth" by splitting the large utility into smaller utility classes...
But if you don't flesh out the objects with own behavior, this is not necessarily considered useful.
You end up with more vocabulary to learn (ImageFormat, OS... etc...).

Le jeu. 2 avr. 2020 à 12:34, stes <[hidden email]> a écrit :
In Squeak6.0alpha-19537.image I don't see a class "ImageFormat'.

There is a class 'SmalltalkImage' which has an instance method
imageFormatVersion :

Smalltalk imageFormatVersion

print it returns: 68021

I believe that "Smalltalk" is some sort of global variable of class
SmalltalkImage

I must be missing something but ImageFormat  does not exist in my image, so     
ImageFormat fromFile: 'mySqueakImage.image'  does not work.

Or is the class ImageFormat something that you can download from some place
? (Sorry for beginner's question).



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html




Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

stes

OK,  I am trying to follow the instructions from

https://wiki.squeak.org/squeak/6177

The step :  Open a Monticello browser works fine on my VM 5.3 64 bit SPUR
(Solaris).

/
In the Monticello browser, add a new repository (+Repository button). Select
"HTTP" repository type, and edit the repository information as follows:

MCHttpRepository
        location: 'http://source.squeak.org/VMMaker'
        user: ''
        password: ''

Open the new repository (select the new entry and click the Open button to
get a new repository browser).
In the repository browser, select category "update" from the list in the
left panel, and select the top entry in the right panel /

However there I have a dependency problem when I select "Load".

It alerts:
*
This package depends on the following classes:
  FFIConstants
  KlattResonatorIndices
You must resolve these dependencies before you will be able to load these
definitions: *

Do I have to resolve such dependencies manually or does "Monticello" do this
somehow for me ??





--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

stes
I tried to load from the source.squeak.org/VMMaker repository only the
"ImageFormat" package , and that works without "dependency" problem.

So it works.  the download from the "VMMaker" repository works for this
class and then indeed it provides info such as:

      ImageFormat versionDescriptions do: [:e | Transcript cr; show: e]
a 64-bit V3 image with no closure support and no native platform float word
order requirement (68000)
a 64-bit V3 image with closure support and no native platform float word
order requirement (68002)
a 64-bit V3 image with closure support and float words stored in native
platform order (68003)
a 64-bit V3 image with closure support and no native platform float word
order requirement (68004)
a 64-bit Spur image with closure support and float words stored in native
platform order using Spur object format (obsolete) (68019)
a 64-bit Spur image with closure support and float words stored in native
platform order using Spur object format (68021)
a 64-bit Spur image with closure support and float words stored in native
platform order using Spur object format and Sista  (68533)
a 32-bit V3 image with no closure support and no native platform float word
order requirement (6502)
a 32-bit V3 image with closure support and no native platform float word
order requirement (6504)
a 32-bit V3 image with closure support and float words stored in native
platform order (6505)
a 32-bit Spur image with closure support and float words stored in native
platform order using Spur object format (6521)
a 32-bit Spur image with closure support and float words stored in native
platform order using Spur object format and Sista  (7033)




--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: cannot read file format 6521

K K Subbu
In reply to this post by stes
On 02/04/20 10:33 PM, stes wrote:
> MCHttpRepository
> location: 'http://source.squeak.org/VMMaker'
> user: ''
> password: ''

You may drop the user:/password: part to save typing. They default to ''
now.

> It alerts:
> *
> This package depends on the following classes:
>    FFIConstants
>    KlattResonatorIndices

I couldn't replicate this error. Did you get any network error while
loading or cancel any merge dialog? These two classes are present in the
first two packages in update-dtl.19.mcm. Could you try again?

> Do I have to resolve such dependencies manually or does "Monticello" do this
> somehow for me ??

No. Monticello does it. mcm stands for Monticello Configuration [1]. You
may "Browse" the update-dtl.19.mcm file to see its contents

[1] https://wiki.squeak.org/squeak/6058

HTH .. Subbu

Reply | Threaded
Open this post in threaded view
|

Loading ImageFormat package (was: cannot read file format 6521)

David T. Lewis
In reply to this post by stes
FYI, I also put an entry for ImageFormat in the SqueakMap package loader,
so it can be loaded in Squeak that way also.

There is a package entry for version "5.3" that goes with the Squeak 5.3
release, but in general I would recommend loading the version labelled
'(head)' so that you will be sure of getting the latest accounting of
known version numbers.

Dave

On Thu, Apr 02, 2020 at 12:17:34PM -0500, stes wrote:

> I tried to load from the source.squeak.org/VMMaker repository only the
> "ImageFormat" package , and that works without "dependency" problem.
>
> So it works.  the download from the "VMMaker" repository works for this
> class and then indeed it provides info such as:
>
>       ImageFormat versionDescriptions do: [:e | Transcript cr; show: e]
> a 64-bit V3 image with no closure support and no native platform float word
> order requirement (68000)
> a 64-bit V3 image with closure support and no native platform float word
> order requirement (68002)
> a 64-bit V3 image with closure support and float words stored in native
> platform order (68003)
> a 64-bit V3 image with closure support and no native platform float word
> order requirement (68004)
> a 64-bit Spur image with closure support and float words stored in native
> platform order using Spur object format (obsolete) (68019)
> a 64-bit Spur image with closure support and float words stored in native
> platform order using Spur object format (68021)
> a 64-bit Spur image with closure support and float words stored in native
> platform order using Spur object format and Sista  (68533)
> a 32-bit V3 image with no closure support and no native platform float word
> order requirement (6502)
> a 32-bit V3 image with closure support and no native platform float word
> order requirement (6504)
> a 32-bit V3 image with closure support and float words stored in native
> platform order (6505)
> a 32-bit Spur image with closure support and float words stored in native
> platform order using Spur object format (6521)
> a 32-bit Spur image with closure support and float words stored in native
> platform order using Spur object format and Sista  (7033)
>
>
>
>
> --
> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
>

Reply | Threaded
Open this post in threaded view
|

Re: Loading ImageFormat package (was: cannot read file format 6521)

stes

OK, thanks for explaining,  I'm learning a lot now, because I am unfamiliar
with such concepts like "Monticello" or "SqueakMap" and so on.

I can confirm that loading the class via "SqueakMap" also works on my 64bit
SPUR vm with Squeak5.3-19431 on Solaris.

What I did was

  1. Select "SqueakMap Catalog" from the Apps menu
  2. Locate "Squeak distribution -> Squeak" in panel bottom left
  3. Select ImageFormat from the panel top left
  4. it shows when expanding (head) 5.3 5.2 (5.1) (4.6-5.0) (4.4)
  5. I select "Install" for "head"

I get a Transcript (after clicking "Yes" for the panel "This may be
incompatible with your image, do you want to proceed ?") :see transcript
below

After loading the class via SqueakMap in my image, I can browse the class,
and it works.
ImageFormat baseVersionNumbers #(6502 6504 68000 68002 68004)


========== ImageFormat-dtl.19 ==========

fix comment

========== ImageFormat-dtl.39 ==========

Tidy up some explanatory comments in unit test.

>>> ImageFormat-dtl.38 <<<
More unit tests and consistency checks for image format numbers.

>>> ImageFormat-dtl.37 <<<
Identify extended bytecodes for Sista in the image format number. Bit 10
identifies an image that contains extended bytecodes. Thus a 32 bit Spur
image is 6521, with Sista it is 7033, and a 64 bit Spur image is 68021, with
Sista it is 68533.

It is expected that additional bytecode sets can be identified by an
additional field in the image header, probably 32 bits containing two 16 bit
fields,  if both zero then Sista.

Per discussion with Eliot and Bert in a Squeak oversight board meeting
2019-05-15.

>>> ImageFormat-dtl.36 <<<
Let 68004 be a base version number, supporting the 68021 64-bit Spur format.
Base number plus Spur bit plus platform float order bit yields 68021.

68004 + 2r10001 ==> 68021

Restore a unit test that covers 68021format.
Reorganize method categories to clarify bit assignment methods.

Notes: 68004 has not been used in practice but is considered valid. These
changes do not affect the generated ckformat.c program.

>>> ImageFormat-kks.35 <<<
Removed tests for 68004, 68021 formats since 68004 is no longer a base
version number.

>>> ImageFormat-kks.34 <<<
Added support for images whose header begins 512 bytes into the file.
Expanded comments to explain magic file use.

>>> ImageFormat-dtl.33 <<<
Refactor instance creation to allow image header instances to be created
from a stream or array of header field values in addition to the traditional
read from file stream on the image file. Add hooks for hypothetical
primitives to answer header filelds directly from the VM.

>>> ImageFormat-dtl.31 <<<
Fix ckformat for 64 bit Spur, which saves format number in first 4 bytes of
the header, versus 8 bytes for 64 bit V3. Prior version worked by accident
for little endian host using strncmp() check, but failed when correct
memcmp() was used without limiting check to 4 bytes for spur and 8 for V3.

>>> ImageFormat-dtl.30 <<<
Fix declaration of main() in ckformat.c

>>> ImageFormat-dtl.29 <<<
Fix by K K Subbu: Use memcmp instead of strncmp in ckformat to compare byte
arrays.

>>> ImageFormat-dtl.28 <<<
Fix typo, the hypothetical 68003 is a known version number, 68004 is not.

>>> ImageFormat-dtl.27 <<<
Sort the format numbers for more convenient display

>>> ImageFormat-dtl.26 <<<
Bit 17 of the image format number may be used as a test for 64-bit-ness for
both Spur and V3. Add testBit17AsTestFor64BitImages to document this.

The changes in ImageFormat-dtl.20 for format numbers 68019 and 68021 were
missing test support, add it here.

>>> ImageFormat-dtl.25 <<<
Support ImageFileHeader for reading format number from 64 bit Spur.

Fixes this:
  (ImageFormat fromFile: Smalltalk imageName) description
     ==> 'a 64-bit image with closure support and float words stored in
native platform order using Spur object format (68021)'

To do: Need new header reader for the 64 bit Spur files, which differ from
64 bit V3.

>>> ImageFormat-dtl.24 <<<
Additional magic file updates from Subbu
http://lists.squeakfoundation.org/pipermail/vm-dev/2017-May/025076.html

>>> ImageFormat-dtl.23 <<<
Refactoring and cleaner magic file output by Subbu.

>>> ImageFormat-dtl.22 <<<
K K Subbu updates for magic file generation (vm-dev list)

>>> ImageFormat-dtl.21 <<<
Add ImageFormat class>>unixMagiFileEntries to answer a string that can be
appended to /etc/magic on a Unix system to support the file(1) utility.
Based on magic decode by K K Subbu on vm-dev.

>>> ImageFormat-dtl.20 <<<
Spur:
Resolve the conflict between 32-bit and 64-bit tag assignments.  In 32-bits
we
have 1=even SmallIntegers, 2=Characters, 3=odd SmallIntegers, and in 64-bits
we
had 1=SmallIntegers, 2=Characters, 3=SmallFloats.  Hence we would want
SmallFloat64's identityHash to be 3, which conflicts with 32 bits' odd
SmallIntegers.  Change is for 64-bits to use 1=SmallIntegers, 2=Characters,
4=SmallFloats.  This also means single-bit tests in the Cogit, which
produces
better code, and no scratch registers to hold masked tags.

Hence roll the 64-bit Spur image format version number from 68019 to 68021.

==========  Update completed. ==========



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html