Loading VMMaker

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

Loading VMMaker

Yoshiki Ohshima-3
 
Hi,

Just to refresh my skill on compiling the Squeak VM (I'd like to play
with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
but want to make a plugin that is suitable for my need.)

Let us say I'd like to compile a VM and my plugins on Mac, what are
the right steps?  (I had some experiences with VMMaker but that was
before I need to specify Interpreter class name in the VMMakerTool,
for example.

I added VMMaker repository in the Monticello browser, and opened it.
As trying to just load VMMaker shows a warning of missing FFI
constants, I turned to 'update' and load update-dtl.17.mcm.  Is this a
right thing to do?

But then, trying to load update-dtl.17.mcm onto the VM and image in
the 5.0 all in one package, the VM crashes.  Do you see this?

I'd like to get the files and image set up so that I can compile an
external plugin, preferably for Cog/Spur.  Some up to date guidance
would be greatly appreciated.

Thanks!


--
-- Yoshiki
tty
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

tty
 
Hi Yoshiki


If you checkout the source code from git and go to the oscogvm/image directory are several scripts you can open in a workspace and 'do it' (or filein, i think)

The one I use is BuildSqueakSpurTrunkVMMakerImage.st

I am assuming you are running Cog/Spur to power a trunk image.




---- On Wed, 22 Jun 2016 16:13:54 -0400 Yoshiki Ohshima <[hidden email]> wrote ----

Hi,

Just to refresh my skill on compiling the Squeak VM (I'd like to play
with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
but want to make a plugin that is suitable for my need.)

Let us say I'd like to compile a VM and my plugins on Mac, what are
the right steps? (I had some experiences with VMMaker but that was
before I need to specify Interpreter class name in the VMMakerTool,
for example.

I added VMMaker repository in the Monticello browser, and opened it.
As trying to just load VMMaker shows a warning of missing FFI
constants, I turned to 'update' and load update-dtl.17.mcm. Is this a
right thing to do?

But then, trying to load update-dtl.17.mcm onto the VM and image in
the 5.0 all in one package, the VM crashes. Do you see this?

I'd like to get the files and image set up so that I can compile an
external plugin, preferably for Cog/Spur. Some up to date guidance
would be greatly appreciated.

Thanks!


--
-- Yoshiki


Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Ben Coman
In reply to this post by Yoshiki Ohshima-3
 


On Thu, Jun 23, 2016 at 4:13 AM, Yoshiki Ohshima <[hidden email]> wrote:

Hi,

Just to refresh my skill on compiling the Squeak VM (I'd like to play
with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
but want to make a plugin that is suitable for my need.)

Let us say I'd like to compile a VM and my plugins on Mac, what are
the right steps?  (I had some experiences with VMMaker but that was
before I need to specify Interpreter class name in the VMMakerTool,
for example.

I added VMMaker repository in the Monticello browser, and opened it.
As trying to just load VMMaker shows a warning of missing FFI
constants, I turned to 'update' and load update-dtl.17.mcm.  Is this a
right thing to do?

But then, trying to load update-dtl.17.mcm onto the VM and image in
the 5.0 all in one package, the VM crashes.  Do you see this?

I'd like to get the files and image set up so that I can compile an
external plugin, preferably for Cog/Spur.  Some up to date guidance
would be greatly appreciated.

Use a combination of...

Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Yoshiki Ohshima-3
 
Thank you Timothy and Ben!  I managed to build SpurVMMaker image and
it does run.  I'll add a simple VM plugin soon to see that works.

On Wed, Jun 22, 2016 at 4:51 PM, Ben Coman <[hidden email]> wrote:

>
>
>
> On Thu, Jun 23, 2016 at 4:13 AM, Yoshiki Ohshima <[hidden email]> wrote:
>>
>>
>> Hi,
>>
>> Just to refresh my skill on compiling the Squeak VM (I'd like to play
>> with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
>> but want to make a plugin that is suitable for my need.)
>>
>> Let us say I'd like to compile a VM and my plugins on Mac, what are
>> the right steps?  (I had some experiences with VMMaker but that was
>> before I need to specify Interpreter class name in the VMMakerTool,
>> for example.
>>
>> I added VMMaker repository in the Monticello browser, and opened it.
>> As trying to just load VMMaker shows a warning of missing FFI
>> constants, I turned to 'update' and load update-dtl.17.mcm.  Is this a
>> right thing to do?
>>
>> But then, trying to load update-dtl.17.mcm onto the VM and image in
>> the 5.0 all in one package, the VM crashes.  Do you see this?
>>
>> I'd like to get the files and image set up so that I can compile an
>> external plugin, preferably for Cog/Spur.  Some up to date guidance
>> would be greatly appreciated.
>
>
> Use a combination of...
> * https://github.com/OpenSmalltalk/vm/blob/Cog/CONTRIBUTING.md
> * http://www.mirandabanda.org/cogblog/compiling-the-vm/
>
>



--
-- Yoshiki
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Yoshiki Ohshima-3
 
Continuing it a bit by bit...

The shell script created SpurVMMaker image, and I am poking around it.
But do people use the VMMakeTool to set up the interpreter name and
output directory, etc.?  I tried a few variations but things are not
obvious.

I'm sticking with Mac OS 10.10 until I get a new model that is
rumored; a bad news is that my Xcode lost the 10.10 SDK directory and
it cannot produce a binary for 10.10; I could install the SDK etc. or
perhaps I should update, but another interesting wrinkle there...

On Wed, Jun 22, 2016 at 5:26 PM, Yoshiki Ohshima
<[hidden email]> wrote:

> Thank you Timothy and Ben!  I managed to build SpurVMMaker image and
> it does run.  I'll add a simple VM plugin soon to see that works.
>
> On Wed, Jun 22, 2016 at 4:51 PM, Ben Coman <[hidden email]> wrote:
>>
>>
>>
>> On Thu, Jun 23, 2016 at 4:13 AM, Yoshiki Ohshima <[hidden email]> wrote:
>>>
>>>
>>> Hi,
>>>
>>> Just to refresh my skill on compiling the Squeak VM (I'd like to play
>>> with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
>>> but want to make a plugin that is suitable for my need.)
>>>
>>> Let us say I'd like to compile a VM and my plugins on Mac, what are
>>> the right steps?  (I had some experiences with VMMaker but that was
>>> before I need to specify Interpreter class name in the VMMakerTool,
>>> for example.
>>>
>>> I added VMMaker repository in the Monticello browser, and opened it.
>>> As trying to just load VMMaker shows a warning of missing FFI
>>> constants, I turned to 'update' and load update-dtl.17.mcm.  Is this a
>>> right thing to do?
>>>
>>> But then, trying to load update-dtl.17.mcm onto the VM and image in
>>> the 5.0 all in one package, the VM crashes.  Do you see this?
>>>
>>> I'd like to get the files and image set up so that I can compile an
>>> external plugin, preferably for Cog/Spur.  Some up to date guidance
>>> would be greatly appreciated.
>>
>>
>> Use a combination of...
>> * https://github.com/OpenSmalltalk/vm/blob/Cog/CONTRIBUTING.md
>> * http://www.mirandabanda.org/cogblog/compiling-the-vm/
>>
>>
>
>
>
> --
> -- Yoshiki



--
-- Yoshiki
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Yoshiki Ohshima-3
 
A do it in the workspace:

VMMaker generateConfiguration

lets me generate the code for the VM (I'm getting there.)

What is the suggested way to add a simple external VM plugin, and keep
regenerating the file for it during the debug process?


On Fri, Jul 1, 2016 at 3:02 PM, Yoshiki Ohshima <[hidden email]> wrote:

> Continuing it a bit by bit...
>
> The shell script created SpurVMMaker image, and I am poking around it.
> But do people use the VMMakeTool to set up the interpreter name and
> output directory, etc.?  I tried a few variations but things are not
> obvious.
>
> I'm sticking with Mac OS 10.10 until I get a new model that is
> rumored; a bad news is that my Xcode lost the 10.10 SDK directory and
> it cannot produce a binary for 10.10; I could install the SDK etc. or
> perhaps I should update, but another interesting wrinkle there...
>
> On Wed, Jun 22, 2016 at 5:26 PM, Yoshiki Ohshima
> <[hidden email]> wrote:
>> Thank you Timothy and Ben!  I managed to build SpurVMMaker image and
>> it does run.  I'll add a simple VM plugin soon to see that works.
>>
>> On Wed, Jun 22, 2016 at 4:51 PM, Ben Coman <[hidden email]> wrote:
>>>
>>>
>>>
>>> On Thu, Jun 23, 2016 at 4:13 AM, Yoshiki Ohshima <[hidden email]> wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Just to refresh my skill on compiling the Squeak VM (I'd like to play
>>>> with Kinect; I found some efforts like: http://tecnodacta.com.ar/gira/
>>>> but want to make a plugin that is suitable for my need.)
>>>>
>>>> Let us say I'd like to compile a VM and my plugins on Mac, what are
>>>> the right steps?  (I had some experiences with VMMaker but that was
>>>> before I need to specify Interpreter class name in the VMMakerTool,
>>>> for example.
>>>>
>>>> I added VMMaker repository in the Monticello browser, and opened it.
>>>> As trying to just load VMMaker shows a warning of missing FFI
>>>> constants, I turned to 'update' and load update-dtl.17.mcm.  Is this a
>>>> right thing to do?
>>>>
>>>> But then, trying to load update-dtl.17.mcm onto the VM and image in
>>>> the 5.0 all in one package, the VM crashes.  Do you see this?
>>>>
>>>> I'd like to get the files and image set up so that I can compile an
>>>> external plugin, preferably for Cog/Spur.  Some up to date guidance
>>>> would be greatly appreciated.
>>>
>>>
>>> Use a combination of...
>>> * https://github.com/OpenSmalltalk/vm/blob/Cog/CONTRIBUTING.md
>>> * http://www.mirandabanda.org/cogblog/compiling-the-vm/
>>>
>>>
>>
>>
>>
>> --
>> -- Yoshiki
>
>
>
> --
> -- Yoshiki



--
-- Yoshiki
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

timrowledge


> On 01-07-2016, at 4:22 PM, Yoshiki Ohshima <[hidden email]> wrote:
>
>
> A do it in the workspace:
>
> VMMaker generateConfiguration
>
> lets me generate the code for the VM (I'm getting there.)
>
> What is the suggested way to add a simple external VM plugin, and keep
> regenerating the file for it during the debug process?

There should be at least two Workspaces in your vmmaker image - one labelled ‘Overview’ and the other simply ‘Workspace’.

‘Overview’ has the basic #generateConfiguration etc stuff ready to run as well as (at the end) a useful snippet to generate a list of specific plugins for testing.

If you peek at VMMaker class>>generateSqueakCogVM for example you’ll see one of the simplest possible generate processes and the implementor will get you started on understanding the more complex ones. VMMaker class>>generatePlugins shows a way of generating the plugins (duh). I’m fairly sure a new plugin would need to end up in that list to become part of the normal build.

Given the amazing array of options to provide for it’s unsurprising there are a lot of methods involved. The VMMakerTool hasn’t really kept up with it from some time. Perhaps an interesting project for someone?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: YVR: Branch to Vancouver


Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Nicolas Cellier
In reply to this post by Yoshiki Ohshima-3
 


2016-07-02 0:02 GMT+02:00 Yoshiki Ohshima <[hidden email]>:

Continuing it a bit by bit...

The shell script created SpurVMMaker image, and I am poking around it.
But do people use the VMMakeTool to set up the interpreter name and
output directory, etc.?  I tried a few variations but things are not
obvious.

I'm sticking with Mac OS 10.10 until I get a new model that is
rumored; a bad news is that my Xcode lost the 10.10 SDK directory and
it cannot produce a binary for 10.10; I could install the SDK etc. or
perhaps I should update, but another interesting wrinkle there...


If you want to install older <SDK and/or compiler versions, I highly recommend using https://github.com/devernay/xcodelegacy  like mentionned here http://smallissimo.blogspot.fr/2015/08/compiling-cogspur-on-macosx-yosemite.html

It works like a charm. Note that recent cocoa flavour  build only on lion due to usage of new API...
 
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Yoshiki Ohshima-3
 
Thanks.  I was just hoping that by now Apple would have released a new
MacBook Pro and I would not just have to worry about it...

On Sat, Jul 2, 2016 at 12:19 AM, Nicolas Cellier
<[hidden email]> wrote:

>
>
>
> 2016-07-02 0:02 GMT+02:00 Yoshiki Ohshima <[hidden email]>:
>>
>>
>> Continuing it a bit by bit...
>>
>> The shell script created SpurVMMaker image, and I am poking around it.
>> But do people use the VMMakeTool to set up the interpreter name and
>> output directory, etc.?  I tried a few variations but things are not
>> obvious.
>>
>> I'm sticking with Mac OS 10.10 until I get a new model that is
>> rumored; a bad news is that my Xcode lost the 10.10 SDK directory and
>> it cannot produce a binary for 10.10; I could install the SDK etc. or
>> perhaps I should update, but another interesting wrinkle there...
>>
>
> If you want to install older <SDK and/or compiler versions, I highly recommend using https://github.com/devernay/xcodelegacy  like mentionned here http://smallissimo.blogspot.fr/2015/08/compiling-cogspur-on-macosx-yosemite.html
>
> It works like a charm. Note that recent cocoa flavour  build only on lion due to usage of new API...
>
>



--
-- Yoshiki
Reply | Threaded
Open this post in threaded view
|

Re: Loading VMMaker

Yoshiki Ohshima-3
In reply to this post by timrowledge

Thank you!

 So my do it now looks for my "FooBazPlugin"

(VMMaker makerFor: CoInterpreter and: SimpleStackBasedCogit with: #()
to: (FileDirectory default pathFromURI: '../src') platformDir:
(FileDirectory default pathFromURI: '../platforms')
including:#(FooBazPlugin)) generateExternalPlugins

and it generates the .c file.  (It may need some more files to make it
really compile, but we'll see that next...)

On Fri, Jul 1, 2016 at 5:05 PM, tim Rowledge <[hidden email]> wrote:

>
>
>> On 01-07-2016, at 4:22 PM, Yoshiki Ohshima <[hidden email]> wrote:
>>
>>
>> A do it in the workspace:
>>
>> VMMaker generateConfiguration
>>
>> lets me generate the code for the VM (I'm getting there.)
>>
>> What is the suggested way to add a simple external VM plugin, and keep
>> regenerating the file for it during the debug process?
>
> There should be at least two Workspaces in your vmmaker image - one labelled ‘Overview’ and the other simply ‘Workspace’.
>
> ‘Overview’ has the basic #generateConfiguration etc stuff ready to run as well as (at the end) a useful snippet to generate a list of specific plugins for testing.
>
> If you peek at VMMaker class>>generateSqueakCogVM for example you’ll see one of the simplest possible generate processes and the implementor will get you started on understanding the more complex ones. VMMaker class>>generatePlugins shows a way of generating the plugins (duh). I’m fairly sure a new plugin would need to end up in that list to become part of the normal build.
>
> Given the amazing array of options to provide for it’s unsurprising there are a lot of methods involved. The VMMakerTool hasn’t really kept up with it from some time. Perhaps an interesting project for someone?
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Strange OpCodes: YVR: Branch to Vancouver
>
>



--
-- Yoshiki