Re: [squeak-dev] Building CogVM on FreeBSD

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

Re: [squeak-dev] Building CogVM on FreeBSD

Frank Shearar
 
(Moving the conversation to vm-dev)

On 2010/12/05 19:58, Frank Shearar wrote:

> On 2010/12/05 19:15, David T. Lewis wrote:
>> On Sun, Dec 05, 2010 at 06:14:54PM +0000, Frank Shearar wrote:
>>
>>>
>>> And building completed without error! I haven't attempted running an
>>> image; I only have terminal access to a FreeBSD machine.
>>>
>>> I'd mentioned in vm-dev that it would be really useful to have an image
>>> that only evaluated "3 + 4" and wrote that to stdout. (Maybe someone
>>> already has one?) We could use that with a Hudson instance, and verify
>>> our VM builds automatically.
>>>
>>> frank
>>
>> Actually, you do not need a special image for this. Just supply a start
>> script when you start Squeak, and run headless using the -vm-display-null
>> parameter. The script can evaluate 3+4, write output to /dev/tty, then
>> exit.
>> An example start script is attached.
>
> Excellent!
>
> Turns out I'd only run configure, not make, so when I've figured out
> what make's telling me I did wrong (it might be a 64-bit thing judging
> by "warning: cast from pointer to integer of different size"), I'll give
> it a whirl.
It's longAt() that my system's complaining about at least some of the
time, and fails here:

usqInt
youngStartAddress(void) {
         return ((usqInt)((&GIV(youngStart)))); // This line
}

Make doesn't tell me anything useful other than "Error code 1". (This is
off an svn checkout from yesterday.) I've attached the output; most of
it just looks like 64-bit pointer-like issues.

frank

err.txt (215K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Building CogVM on FreeBSD

Mariano Martinez Peck
 
Hi Frank. Last week, JB send fixes for this (I guess Eliot will integrte them soon)
Here I copy paste them:

-------


yesterday, i forward you the fix to do to compile Cog, the fix is send to Eliot and will be integrated soon,

Process to do: 
- Load Cog With the configurationOfCog , proceed all the warnings (if you can remove the Warnings).
- generate source but exclude the MiscPrimitivePlugin (or fix it if you have time).
go in macbuild folder
- Fix the library file :
  - sq.h
- SoundPlugin.h or sqMacUnixInterfaceSound.c
- sqMacWindowUniversal.c or HostWindowPlugin.h
(How is put at the en of the mail)
-Fix the mvm file (just replace makevm by ./makevm, if you don't have . in your Path).
-run the command ./mvm -A
And,Taddaa you have 3 VM cog:
Debug,Fast,Assert

If you want to have the simulator working you need to do compile the BochsIA32Plugin but it's well explain in the HowToBuild File.
If you have any problem ask me.


PS : the problem of the library is conflicting type you can resolve that by changing some method

In : sq.h
From :
sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);
To:
sqInt readImageFromFileHeapSizeStartingAt(sqImageFile  f, sqInt desiredHeapSize, squeakFileOffsetType  imageOffset);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SoundPlugin.h :
sqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void *srcBufPtr, sqInt samplesOfLeadTime)

sqMacUnixInterfaceSound.c :
int snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SoundPlugin.h :
sqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void *srcBufPtr, sqInt startIndex)

sqMacUnixInterfaceSound.c :
int snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SoundPlugin.h
sqInt snd_RecordSamplesIntoAtLength(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)

sqMacUnixInterfaceSound.c :
int snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SoundPlugin.h
void snd_SetRecordLevel(sqInt level)

sqMacUnixInterfaceSound.c :
int  snd_SetRecordLevel(int level)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

sqMacWindowUniversal.c
int ioShowDisplayOnWindow(
unsigned int*  dispBitsIndex, int widthint heightint depth,
int affectedLint affectedRint affectedTint affectedBint 
windowIndex)
HostWindowPlugin.h
int ioShowDisplayOnWindow( 
unsigned char *dispBitsIndex, int widthint heightint depth,
int affectedLint affectedRint affectedTint affectedB,int
windowIndex);




On Mon, Dec 6, 2010 at 10:49 AM, Frank Shearar <[hidden email]> wrote:
 
(Moving the conversation to vm-dev)

On 2010/12/05 19:58, Frank Shearar wrote:
On 2010/12/05 19:15, David T. Lewis wrote:
On Sun, Dec 05, 2010 at 06:14:54PM +0000, Frank Shearar wrote:


And building completed without error! I haven't attempted running an
image; I only have terminal access to a FreeBSD machine.

I'd mentioned in vm-dev that it would be really useful to have an image
that only evaluated "3 + 4" and wrote that to stdout. (Maybe someone
already has one?) We could use that with a Hudson instance, and verify
our VM builds automatically.

frank

Actually, you do not need a special image for this. Just supply a start
script when you start Squeak, and run headless using the -vm-display-null
parameter. The script can evaluate 3+4, write output to /dev/tty, then
exit.
An example start script is attached.

Excellent!

Turns out I'd only run configure, not make, so when I've figured out
what make's telling me I did wrong (it might be a 64-bit thing judging
by "warning: cast from pointer to integer of different size"), I'll give
it a whirl.

It's longAt() that my system's complaining about at least some of the time, and fails here:

usqInt
youngStartAddress(void) {
       return ((usqInt)((&GIV(youngStart)))); // This line
}

Make doesn't tell me anything useful other than "Error code 1". (This is off an svn checkout from yesterday.) I've attached the output; most of it just looks like 64-bit pointer-like issues.

frank


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Building CogVM on FreeBSD

Eliot Miranda-2
In reply to this post by Frank Shearar
 


On Mon, Dec 6, 2010 at 1:49 AM, Frank Shearar <[hidden email]> wrote:
 
(Moving the conversation to vm-dev)

On 2010/12/05 19:58, Frank Shearar wrote:
On 2010/12/05 19:15, David T. Lewis wrote:
On Sun, Dec 05, 2010 at 06:14:54PM +0000, Frank Shearar wrote:


And building completed without error! I haven't attempted running an
image; I only have terminal access to a FreeBSD machine.

I'd mentioned in vm-dev that it would be really useful to have an image
that only evaluated "3 + 4" and wrote that to stdout. (Maybe someone
already has one?) We could use that with a Hudson instance, and verify
our VM builds automatically.

frank

Actually, you do not need a special image for this. Just supply a start
script when you start Squeak, and run headless using the -vm-display-null
parameter. The script can evaluate 3+4, write output to /dev/tty, then
exit.
An example start script is attached.

Excellent!

Turns out I'd only run configure, not make, so when I've figured out
what make's telling me I did wrong (it might be a 64-bit thing judging
by "warning: cast from pointer to integer of different size"), I'll give
it a whirl.

It's longAt() that my system's complaining about at least some of the time, and fails here:

If so, make sure you have configured to build 32-bit; gcc requires an -m32 flag to force 32-bit.  You'll need to make sure the whole chain through the linker uses -m32.

HTH
Eliot


usqInt
youngStartAddress(void) {
       return ((usqInt)((&GIV(youngStart)))); // This line
}

Make doesn't tell me anything useful other than "Error code 1". (This is off an svn checkout from yesterday.) I've attached the output; most of it just looks like 64-bit pointer-like issues.

frank