How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

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

How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

David T. Lewis
 
This is a topic that deserves an occasional update, so here is an updated
step-by-step recipe for building with Squeak on Linux.

These instructions are saved on the swiki at <http://wiki.squeak.org/squeak/6177>

Start with a fresh image such as http://ftp.squeak.org/4.3alpha/Squeak4.3gamma-11793.zip
(any recent Squeak image will do).

Open a new Morphic project in which to work, and enter the project.

Open a new workspace for taking notes as you work, and a transcript to display
any transcript output that might appear.

Open a Monticello browser.

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

MCHttpRepository
        location: 'http://www.squeaksource.com/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 (update-dtl.9.mcm as of
this writing).

Click the "Load" button to load VMMaker. This will load VMMaker and various
related packages and plugins. This will load a base version of these packages
(but you do not yet have the latest updates, see the next step below). You
can see a version identification for your VMMaker package by evaluating
"VMMaker versionString" in your workspace:
  VMMaker versionString ==> '4.7.9'

In the workspace, evaluate the expression "VMMaker updateFromServer". This
will update VMMaker and the other packages to the most up to date versions.
During the merge process,  a merge browser will open with a label such as
"Merging FFI-Pools-eem.3". Highlight the entries and click "Keep", then
click the "Merge" button to accept the merge and proceed (this merge conflict
will not effect your VM, so it is safe to ignore it and proceed).

When the update process is complete, you will have the latest VMMaker version:
  VMMaker versionString ==> '4.7.14'

Save your image. Your image is now prepared for VM code generation, so the
next steps will be to load the platform source code that is required for
code generation and VM building.

In a Linux terminal window (outside of Squeak), change your directory to
your working Squeak directory (the same directory that you are using to run
your image.

lewis@linux-jh8m:~> cd squeak/Squeak4.3
lewis@linux-jh8m:~/squeak/Squeak4.3>

Check out an up to date copy of the platforms source code. You will need to
have Subversion installed on your Linux system:

lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
  <lots of messages snipped>
Checked out revision 2515.
lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk

This will place all of the platform sources in a subdirectory called
trunk/platforms. It is easier for VMMaker to find this directory if the
platforms directory is in directly in your Squeak directory, so use a symbolic
link to make it so:

lewis@linux-jh8m:~/squeak/Squeak4.3> ln -s trunk/platforms platforms

The platforms sources are now ready for use, so return to your Squeak
image to generate your VM source code.

Open a VMMaker tool withy world menu -> open... -> VMMaker

Click the Help button and have a quick look at the help information. You
can come back to it later to read in more detail.

A list of available plugins appears in the left panel ("Plugins not built").
You can drag entiries from this panel into the "Internal Plugins" panel or
the "External Plugins" panel, or you can right click on the panel and use the
menu to copy all plugins from one panel to another (plugins that cannot be
built on your platform will remain in the "Plugins not built" panel).

We are building our first VM, so we will select just a few important plugins
to build and omit many others for now. After you are confident that you can
build a VM, you can add other plugins and any operating system libraries that
may be needed to support them. You can also use a VMMaker configuration file
to load a saved configuration, but for now we will do the work by hand to
show how it is done.

Use the mouse to drag and drop the following plugin entries from the
"Plugins not built" panel to the "Internal plugins" panel.

  BalloonEnginePlugin
  BitBltSimulation
  DeflatePlugin
  FilePlugin
  LargeIntegersPlugin
  LocalePlugin
  SecurityPlugin
  SocketPlugin

Now add some external plugins by dragging the following entries to the
"External plugins" panel:

  UUIDPlugin
  UnixAioPlugin
  UnixOSProcessPlugin
  XDisplayControlPlugin

Click the "Clean out" button to make sure the output directory is empty.
This is not really necessary now, but it is good practice, and you will
want to do it any time you want to guarantee that you are generating a
complete fresh copy of the VM sources.

In the "Generate:" panel, click the "Entire" button. This will generate
all of the VM and plugin source code. In other words, it will translate
the Smalltalk classes in your image into C code, and store the resulting
source code in the "src" directory in your Squeak directory. This generated
source, in combination with the platforms source code that you downloaded
from the Subversion repository, is the complete source code for your new
Squeak VM.

Now go back to your Linux terminal window to compile and install the VM.
You will need to have the CMake package installed on your Linux system,
so make sure this is done before proceeding.

You should now have all necessary sources in the "platforms" and "src"
directories in your Squeak working directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> ls -ltd platforms src
drwxr-xr-x 4 lewis users 4096 2011-11-19 10:10 src
lrwxrwxrwx 1 lewis users   15 2011-11-19 09:39 platforms -> trunk/platforms

Create a "build" directory for building the VM, and change into that
directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> mkdir build
lewis@linux-jh8m:~/squeak/Squeak4.3> cd build
lewis@linux-jh8m:~/squeak/Squeak4.3/build>

We will first run a configuration procedure that uses CMake to configure
the sources for your system. You will find documention for this in
platforms/unix/CMake.txt. The script that runs this procedure has introductory
help, so read this first:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --help

Now, from your empty build directory, run the actual configuration process.
The parameters specify the location of the generated sources, and also specify
that GL libaries should be avoided (they are not needed for this simple build,
and might cause problems if you do not have the necessary libraries in place).
If you are using a 64-bit operating system, this configuration will build a
64-bit VM (see the configuration help above if you want to specify CFLAGS to
build a 32-bit VM, which you may later want to do if you are building some of
the plugins that work in 32-bit mode).

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --src=../src --without-gl

When the configuration is complete, use make to build the VM:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make

If you have any errors or problems with the build, you may need to do
some troubleshooting. In most cases the problem will relate to missing
development software that you will need to install on your Linux system.

When the build is complete, your new VM is read to be installed.

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make install

Depending on the security settings of your system, you may need to log
in as root (or use sudo) to perform this last step (but never use root
access for any of the other build steps described above).

Your new Squeak VM is now built and installed, ready to be run as
/usr/local/bin/squeak. You can verify the version of the VM you are
running as follows:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> squeak -version
4.7.14-2515 #1 XShm Sat Nov 19 10:27:11 EST 2011 gcc 4.5.0
Linux linux-jh8m 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
plugin path: /usr/local/lib/squeak/4.7.14-2515 [default: /usr/local/lib/squeak/4.7.14-2515/]

Congratulations, you are now a VM builder. You will probably want to add
some more plugins, and you can save and load your VMMaker configurations
for various combinations of plugins with the "Load" and "Save" buttons on
your VMMaker window. For reference, here is a configuration file that
matches the configuration of recent official Unix Squeak VMs on
www.squeakvm.org (note that you will need to locate and install KedamaPlugin
and GStreamer plugin to build a VM that fully matches the standard Unix VM).

Contents of standard-vmmaker-unix.config file:

#(#(#ADPCMCodecPlugin
#AsynchFilePlugin
#BMPReadWriterPlugin
#BalloonEnginePlugin
#BitBltSimulation
#CroquetPlugin
#DSAPlugin
#DeflatePlugin
#DropPlugin
#FFTPlugin
#FT2Plugin
#FilePlugin
#FloatArrayPlugin
#FloatMathPlugin
#GeniePlugin
#JPEGReadWriter2Plugin
#JPEGReaderPlugin
#JoystickTabletPlugin
#KlattSynthesizerPlugin
#LargeIntegersPlugin
#LocalePlugin
#MD5Plugin
#Matrix2x3Plugin
#MiscPrimitivePlugin
#RandPlugin
#RePlugin
#SHA256Plugin
#SecurityPlugin
#SerialPlugin
#SlangTestPlugin
#SlangTestSupportPlugin
#SocketPlugin
#SoundCodecPlugin
#SoundGenerationPlugin
#SoundPlugin
#StarSqueakPlugin
#SurfacePlugin
)
#(#B3DAcceleratorPlugin
#B3DEnginePlugin
#ClipboardExtendedPlugin
#DBusPlugin
#FFIPlugin
#FileCopyPlugin
#GStreamerPlugin
#HostWindowPlugin
#KedamaPlugin
#KedamaPlugin2
#MIDIPlugin
#Mpeg3Plugin
#RomePlugin
#UUIDPlugin
#UnixAioPlugin
#UnixOSProcessPlugin
#XDisplayControlPlugin
)
true
false
'unix'
'src'
'platforms'
4
true
true
'Interpreter'
)

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Mariano Martinez Peck
 


On Sat, Nov 19, 2011 at 2:28 PM, David T. Lewis <[hidden email]> wrote:

This is a topic that deserves an occasional update, so here is an updated
step-by-step recipe for building with Squeak on Linux.


+1   Excellent thread David :)

 
These instructions are saved on the swiki at <http://wiki.squeak.org/squeak/6177>


Maybe we could also add it in http://www.squeakvm.org/unix/devel.html ?


 
Start with a fresh image such as http://ftp.squeak.org/4.3alpha/Squeak4.3gamma-11793.zip
(any recent Squeak image will do).

Open a new Morphic project in which to work, and enter the project.

Open a new workspace for taking notes as you work, and a transcript to display
any transcript output that might appear.

Open a Monticello browser.

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

MCHttpRepository
       location: 'http://www.squeaksource.com/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 (update-dtl.9.mcm as of
this writing).

Click the "Load" button to load VMMaker. This will load VMMaker and various
related packages and plugins. This will load a base version of these packages
(but you do not yet have the latest updates, see the next step below). You
can see a version identification for your VMMaker package by evaluating
"VMMaker versionString" in your workspace:
 VMMaker versionString ==> '4.7.9'

In the workspace, evaluate the expression "VMMaker updateFromServer". This
will update VMMaker and the other packages to the most up to date versions.
During the merge process,  a merge browser will open with a label such as
"Merging FFI-Pools-eem.3". Highlight the entries and click "Keep", then
click the "Merge" button to accept the merge and proceed (this merge conflict
will not effect your VM, so it is safe to ignore it and proceed).

When the update process is complete, you will have the latest VMMaker version:
 VMMaker versionString ==> '4.7.14'

Save your image. Your image is now prepared for VM code generation, so the
next steps will be to load the platform source code that is required for
code generation and VM building.

In a Linux terminal window (outside of Squeak), change your directory to
your working Squeak directory (the same directory that you are using to run
your image.

lewis@linux-jh8m:~> cd squeak/Squeak4.3
lewis@linux-jh8m:~/squeak/Squeak4.3>

Check out an up to date copy of the platforms source code. You will need to
have Subversion installed on your Linux system:

lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
 <lots of messages snipped>
Checked out revision 2515.
lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk

This will place all of the platform sources in a subdirectory called
trunk/platforms. It is easier for VMMaker to find this directory if the
platforms directory is in directly in your Squeak directory, so use a symbolic
link to make it so:

lewis@linux-jh8m:~/squeak/Squeak4.3> ln -s trunk/platforms platforms

The platforms sources are now ready for use, so return to your Squeak
image to generate your VM source code.

Open a VMMaker tool withy world menu -> open... -> VMMaker

Click the Help button and have a quick look at the help information. You
can come back to it later to read in more detail.

A list of available plugins appears in the left panel ("Plugins not built").
You can drag entiries from this panel into the "Internal Plugins" panel or
the "External Plugins" panel, or you can right click on the panel and use the
menu to copy all plugins from one panel to another (plugins that cannot be
built on your platform will remain in the "Plugins not built" panel).

We are building our first VM, so we will select just a few important plugins
to build and omit many others for now. After you are confident that you can
build a VM, you can add other plugins and any operating system libraries that
may be needed to support them. You can also use a VMMaker configuration file
to load a saved configuration, but for now we will do the work by hand to
show how it is done.

Use the mouse to drag and drop the following plugin entries from the
"Plugins not built" panel to the "Internal plugins" panel.

 BalloonEnginePlugin
 BitBltSimulation
 DeflatePlugin
 FilePlugin
 LargeIntegersPlugin
 LocalePlugin
 SecurityPlugin
 SocketPlugin

Now add some external plugins by dragging the following entries to the
"External plugins" panel:

 UUIDPlugin
 UnixAioPlugin
 UnixOSProcessPlugin
 XDisplayControlPlugin

Click the "Clean out" button to make sure the output directory is empty.
This is not really necessary now, but it is good practice, and you will
want to do it any time you want to guarantee that you are generating a
complete fresh copy of the VM sources.

In the "Generate:" panel, click the "Entire" button. This will generate
all of the VM and plugin source code. In other words, it will translate
the Smalltalk classes in your image into C code, and store the resulting
source code in the "src" directory in your Squeak directory. This generated
source, in combination with the platforms source code that you downloaded
from the Subversion repository, is the complete source code for your new
Squeak VM.

Now go back to your Linux terminal window to compile and install the VM.
You will need to have the CMake package installed on your Linux system,
so make sure this is done before proceeding.

You should now have all necessary sources in the "platforms" and "src"
directories in your Squeak working directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> ls -ltd platforms src
drwxr-xr-x 4 lewis users 4096 2011-11-19 10:10 src
lrwxrwxrwx 1 lewis users   15 2011-11-19 09:39 platforms -> trunk/platforms

Create a "build" directory for building the VM, and change into that
directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> mkdir build
lewis@linux-jh8m:~/squeak/Squeak4.3> cd build
lewis@linux-jh8m:~/squeak/Squeak4.3/build>

We will first run a configuration procedure that uses CMake to configure
the sources for your system. You will find documention for this in
platforms/unix/CMake.txt. The script that runs this procedure has introductory
help, so read this first:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --help

Now, from your empty build directory, run the actual configuration process.
The parameters specify the location of the generated sources, and also specify
that GL libaries should be avoided (they are not needed for this simple build,
and might cause problems if you do not have the necessary libraries in place).
If you are using a 64-bit operating system, this configuration will build a
64-bit VM (see the configuration help above if you want to specify CFLAGS to
build a 32-bit VM, which you may later want to do if you are building some of
the plugins that work in 32-bit mode).

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --src=../src --without-gl

When the configuration is complete, use make to build the VM:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make

If you have any errors or problems with the build, you may need to do
some troubleshooting. In most cases the problem will relate to missing
development software that you will need to install on your Linux system.

When the build is complete, your new VM is read to be installed.

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make install

Depending on the security settings of your system, you may need to log
in as root (or use sudo) to perform this last step (but never use root
access for any of the other build steps described above).

Your new Squeak VM is now built and installed, ready to be run as
/usr/local/bin/squeak. You can verify the version of the VM you are
running as follows:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> squeak -version
4.7.14-2515 #1 XShm Sat Nov 19 10:27:11 EST 2011 gcc 4.5.0
Linux linux-jh8m 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
plugin path: /usr/local/lib/squeak/4.7.14-2515 [default: /usr/local/lib/squeak/4.7.14-2515/]

Congratulations, you are now a VM builder. You will probably want to add
some more plugins, and you can save and load your VMMaker configurations
for various combinations of plugins with the "Load" and "Save" buttons on
your VMMaker window. For reference, here is a configuration file that
matches the configuration of recent official Unix Squeak VMs on
www.squeakvm.org (note that you will need to locate and install KedamaPlugin
and GStreamer plugin to build a VM that fully matches the standard Unix VM).

Contents of standard-vmmaker-unix.config file:

#(#(#ADPCMCodecPlugin
#AsynchFilePlugin
#BMPReadWriterPlugin
#BalloonEnginePlugin
#BitBltSimulation
#CroquetPlugin
#DSAPlugin
#DeflatePlugin
#DropPlugin
#FFTPlugin
#FT2Plugin
#FilePlugin
#FloatArrayPlugin
#FloatMathPlugin
#GeniePlugin
#JPEGReadWriter2Plugin
#JPEGReaderPlugin
#JoystickTabletPlugin
#KlattSynthesizerPlugin
#LargeIntegersPlugin
#LocalePlugin
#MD5Plugin
#Matrix2x3Plugin
#MiscPrimitivePlugin
#RandPlugin
#RePlugin
#SHA256Plugin
#SecurityPlugin
#SerialPlugin
#SlangTestPlugin
#SlangTestSupportPlugin
#SocketPlugin
#SoundCodecPlugin
#SoundGenerationPlugin
#SoundPlugin
#StarSqueakPlugin
#SurfacePlugin
)
#(#B3DAcceleratorPlugin
#B3DEnginePlugin
#ClipboardExtendedPlugin
#DBusPlugin
#FFIPlugin
#FileCopyPlugin
#GStreamerPlugin
#HostWindowPlugin
#KedamaPlugin
#KedamaPlugin2
#MIDIPlugin
#Mpeg3Plugin
#RomePlugin
#UUIDPlugin
#UnixAioPlugin
#UnixOSProcessPlugin
#XDisplayControlPlugin
)
true
false
'unix'
'src'
'platforms'
4
true
true
'Interpreter'
)




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Casey Ransberger-2
In reply to this post by David T. Lewis

This is great!

I had a thought: There's probably a subset of this information which applies to all platforms.

It'd be awfully cool, and I think quite fitting, to have that information in the help system.

What do folks think about that?

On Nov 19, 2011, at 9:28 AM, "David T. Lewis" <[hidden email]> wrote:

>
> This is a topic that deserves an occasional update, so here is an updated
> step-by-step recipe for building with Squeak on Linux.
>
> These instructions are saved on the swiki at <http://wiki.squeak.org/squeak/6177>
>
> Start with a fresh image such as http://ftp.squeak.org/4.3alpha/Squeak4.3gamma-11793.zip
> (any recent Squeak image will do).
>
> Open a new Morphic project in which to work, and enter the project.
>
> Open a new workspace for taking notes as you work, and a transcript to display
> any transcript output that might appear.
>
> Open a Monticello browser.
>
> In the Monticello browser, add a new repository (+Repository button).
> Select "HTTP" repository type, and edit the repository information as follows:
>
> MCHttpRepository
>    location: 'http://www.squeaksource.com/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 (update-dtl.9.mcm as of
> this writing).
>
> Click the "Load" button to load VMMaker. This will load VMMaker and various
> related packages and plugins. This will load a base version of these packages
> (but you do not yet have the latest updates, see the next step below). You
> can see a version identification for your VMMaker package by evaluating
> "VMMaker versionString" in your workspace:
>  VMMaker versionString ==> '4.7.9'
>
> In the workspace, evaluate the expression "VMMaker updateFromServer". This
> will update VMMaker and the other packages to the most up to date versions.
> During the merge process,  a merge browser will open with a label such as
> "Merging FFI-Pools-eem.3". Highlight the entries and click "Keep", then
> click the "Merge" button to accept the merge and proceed (this merge conflict
> will not effect your VM, so it is safe to ignore it and proceed).
>
> When the update process is complete, you will have the latest VMMaker version:
>  VMMaker versionString ==> '4.7.14'
>
> Save your image. Your image is now prepared for VM code generation, so the
> next steps will be to load the platform source code that is required for
> code generation and VM building.
>
> In a Linux terminal window (outside of Squeak), change your directory to
> your working Squeak directory (the same directory that you are using to run
> your image.
>
> lewis@linux-jh8m:~> cd squeak/Squeak4.3
> lewis@linux-jh8m:~/squeak/Squeak4.3>
>
> Check out an up to date copy of the platforms source code. You will need to
> have Subversion installed on your Linux system:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
>  <lots of messages snipped>
> Checked out revision 2515.
> lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
>
> This will place all of the platform sources in a subdirectory called
> trunk/platforms. It is easier for VMMaker to find this directory if the
> platforms directory is in directly in your Squeak directory, so use a symbolic
> link to make it so:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> ln -s trunk/platforms platforms
>
> The platforms sources are now ready for use, so return to your Squeak
> image to generate your VM source code.
>
> Open a VMMaker tool withy world menu -> open... -> VMMaker
>
> Click the Help button and have a quick look at the help information. You
> can come back to it later to read in more detail.
>
> A list of available plugins appears in the left panel ("Plugins not built").
> You can drag entiries from this panel into the "Internal Plugins" panel or
> the "External Plugins" panel, or you can right click on the panel and use the
> menu to copy all plugins from one panel to another (plugins that cannot be
> built on your platform will remain in the "Plugins not built" panel).
>
> We are building our first VM, so we will select just a few important plugins
> to build and omit many others for now. After you are confident that you can
> build a VM, you can add other plugins and any operating system libraries that
> may be needed to support them. You can also use a VMMaker configuration file
> to load a saved configuration, but for now we will do the work by hand to
> show how it is done.
>
> Use the mouse to drag and drop the following plugin entries from the
> "Plugins not built" panel to the "Internal plugins" panel.
>
>  BalloonEnginePlugin
>  BitBltSimulation
>  DeflatePlugin
>  FilePlugin
>  LargeIntegersPlugin
>  LocalePlugin
>  SecurityPlugin
>  SocketPlugin
>
> Now add some external plugins by dragging the following entries to the
> "External plugins" panel:
>
>  UUIDPlugin
>  UnixAioPlugin
>  UnixOSProcessPlugin
>  XDisplayControlPlugin
>
> Click the "Clean out" button to make sure the output directory is empty.
> This is not really necessary now, but it is good practice, and you will
> want to do it any time you want to guarantee that you are generating a
> complete fresh copy of the VM sources.
>
> In the "Generate:" panel, click the "Entire" button. This will generate
> all of the VM and plugin source code. In other words, it will translate
> the Smalltalk classes in your image into C code, and store the resulting
> source code in the "src" directory in your Squeak directory. This generated
> source, in combination with the platforms source code that you downloaded
> from the Subversion repository, is the complete source code for your new
> Squeak VM.
>
> Now go back to your Linux terminal window to compile and install the VM.
> You will need to have the CMake package installed on your Linux system,
> so make sure this is done before proceeding.
>
> You should now have all necessary sources in the "platforms" and "src"
> directories in your Squeak working directory:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> ls -ltd platforms src
> drwxr-xr-x 4 lewis users 4096 2011-11-19 10:10 src
> lrwxrwxrwx 1 lewis users   15 2011-11-19 09:39 platforms -> trunk/platforms
>
> Create a "build" directory for building the VM, and change into that
> directory:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> mkdir build
> lewis@linux-jh8m:~/squeak/Squeak4.3> cd build
> lewis@linux-jh8m:~/squeak/Squeak4.3/build>
>
> We will first run a configuration procedure that uses CMake to configure
> the sources for your system. You will find documention for this in
> platforms/unix/CMake.txt. The script that runs this procedure has introductory
> help, so read this first:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --help
>
> Now, from your empty build directory, run the actual configuration process.
> The parameters specify the location of the generated sources, and also specify
> that GL libaries should be avoided (they are not needed for this simple build,
> and might cause problems if you do not have the necessary libraries in place).
> If you are using a 64-bit operating system, this configuration will build a
> 64-bit VM (see the configuration help above if you want to specify CFLAGS to
> build a 32-bit VM, which you may later want to do if you are building some of
> the plugins that work in 32-bit mode).
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --src=../src --without-gl
>
> When the configuration is complete, use make to build the VM:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> make
>
> If you have any errors or problems with the build, you may need to do
> some troubleshooting. In most cases the problem will relate to missing
> development software that you will need to install on your Linux system.
>
> When the build is complete, your new VM is read to be installed.
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> make install
>
> Depending on the security settings of your system, you may need to log
> in as root (or use sudo) to perform this last step (but never use root
> access for any of the other build steps described above).
>
> Your new Squeak VM is now built and installed, ready to be run as
> /usr/local/bin/squeak. You can verify the version of the VM you are
> running as follows:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> squeak -version
> 4.7.14-2515 #1 XShm Sat Nov 19 10:27:11 EST 2011 gcc 4.5.0
> Linux linux-jh8m 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
> plugin path: /usr/local/lib/squeak/4.7.14-2515 [default: /usr/local/lib/squeak/4.7.14-2515/]
>
> Congratulations, you are now a VM builder. You will probably want to add
> some more plugins, and you can save and load your VMMaker configurations
> for various combinations of plugins with the "Load" and "Save" buttons on
> your VMMaker window. For reference, here is a configuration file that
> matches the configuration of recent official Unix Squeak VMs on
> www.squeakvm.org (note that you will need to locate and install KedamaPlugin
> and GStreamer plugin to build a VM that fully matches the standard Unix VM).
>
> Contents of standard-vmmaker-unix.config file:
>
> #(#(#ADPCMCodecPlugin
> #AsynchFilePlugin
> #BMPReadWriterPlugin
> #BalloonEnginePlugin
> #BitBltSimulation
> #CroquetPlugin
> #DSAPlugin
> #DeflatePlugin
> #DropPlugin
> #FFTPlugin
> #FT2Plugin
> #FilePlugin
> #FloatArrayPlugin
> #FloatMathPlugin
> #GeniePlugin
> #JPEGReadWriter2Plugin
> #JPEGReaderPlugin
> #JoystickTabletPlugin
> #KlattSynthesizerPlugin
> #LargeIntegersPlugin
> #LocalePlugin
> #MD5Plugin
> #Matrix2x3Plugin
> #MiscPrimitivePlugin
> #RandPlugin
> #RePlugin
> #SHA256Plugin
> #SecurityPlugin
> #SerialPlugin
> #SlangTestPlugin
> #SlangTestSupportPlugin
> #SocketPlugin
> #SoundCodecPlugin
> #SoundGenerationPlugin
> #SoundPlugin
> #StarSqueakPlugin
> #SurfacePlugin
> )
> #(#B3DAcceleratorPlugin
> #B3DEnginePlugin
> #ClipboardExtendedPlugin
> #DBusPlugin
> #FFIPlugin
> #FileCopyPlugin
> #GStreamerPlugin
> #HostWindowPlugin
> #KedamaPlugin
> #KedamaPlugin2
> #MIDIPlugin
> #Mpeg3Plugin
> #RomePlugin
> #UUIDPlugin
> #UnixAioPlugin
> #UnixOSProcessPlugin
> #XDisplayControlPlugin
> )
> true
> false
> 'unix'
> 'src'
> 'platforms'
> 4
> true
> true
> 'Interpreter'
> )
>
Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

David T. Lewis
In reply to this post by Mariano Martinez Peck
 
On Sat, Nov 19, 2011 at 05:30:24PM -0300, Mariano Martinez Peck wrote:

>  
> On Sat, Nov 19, 2011 at 2:28 PM, David T. Lewis <[hidden email]> wrote:
>
> >
> > This is a topic that deserves an occasional update, so here is an updated
> > step-by-step recipe for building with Squeak on Linux.
> >
> >
> +1   Excellent thread David :)
>
>
>
> > These instructions are saved on the swiki at <
> > http://wiki.squeak.org/squeak/6177>
> >
> >
> Maybe we could also add it in http://www.squeakvm.org/unix/devel.html ?
>

Maybe we could organize some HOWTO links on this topic. I think that
you have done some very nice presentations on building Cog and using
Pharo. Ultimately, we would like to make it easy for any user of
Squeak/Pharo to be able to build the Cog/Interpreter VM they want
on the Windows/Unix/Linux/Mac/iOS platform of choice. Perhaps a collection
of HOWTO recipes would be a step in the right direction.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

David T. Lewis
In reply to this post by Casey Ransberger-2
 
On Sat, Nov 19, 2011 at 01:01:55PM -0800, Casey Ransberger wrote:
>
> This is great!
>
> I had a thought: There's probably a subset of this information which applies to all platforms.
>
> It'd be awfully cool, and I think quite fitting, to have that information in the help system.
>
> What do folks think about that?

Yes, you are right in principle. But I think it is important to recognize
that we are in a period of active VM development on the Cog front. My
recipe for building a VM is intended to document the process from the
point of view of an individual person building a traditional VM from
"first principles" on a specific operating system (Linux). There are
other variations on the VM (notably Cog) and other build procedures
(e.g. the VMMaker used for the oscog branch bypasses the interactive
VMMakerTool and generates a common set of generated source code,
independent of operating system, which may be more appropriate in a
professional development environment as opposed to an individual
Squeak user). In addition, Igor is actively developing platform-independent
build processes backed by an automated build environment (Jenkins/Hudson).

For these reasons, I think it may be premature to codify any of this
in the help system for Squeak. But a few more HOWTO recipes to cover
the standard VM on Windows and Mac would be useful, as well as some
equivalent recipes for building Cog VMs on those platforms. I think
that the variations for building these from a Pharo image are
minor, but documenting this would be helpful also.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Markus Lampert
In reply to this post by David T. Lewis
 
Hi David,

thanks for the tutorial, love it!

One question though, when it comes to generating the sources I run into several warnings:
CrLfFileStream class>>new has been deprecated. This class is now obsolete, use MultiByteFileStream instead.

Is this expected?

Thanks,
Markus


From: David T. Lewis <[hidden email]>
To: [hidden email]; [hidden email]; [hidden email]
Sent: Saturday, November 19, 2011 9:28:13 AM
Subject: [Vm-dev] How to build a standard Unix interpreter VM on Linux using a Squeak trunk image


This is a topic that deserves an occasional update, so here is an updated
step-by-step recipe for building with Squeak on Linux.

These instructions are saved on the swiki at <http://wiki.squeak.org/squeak/6177>

Start with a fresh image such as http://ftp.squeak.org/4.3alpha/Squeak4.3gamma-11793.zip
(any recent Squeak image will do).

Open a new Morphic project in which to work, and enter the project.

Open a new workspace for taking notes as you work, and a transcript to display
any transcript output that might appear.

Open a Monticello browser.

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

MCHttpRepository
    location: 'http://www.squeaksource.com/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 (update-dtl.9.mcm as of
this writing).

Click the "Load" button to load VMMaker. This will load VMMaker and various
related packages and plugins. This will load a base version of these packages
(but you do not yet have the latest updates, see the next step below). You
can see a version identification for your VMMaker package by evaluating
"VMMaker versionString" in your workspace:
  VMMaker versionString ==> '4.7.9'

In the workspace, evaluate the expression "VMMaker updateFromServer". This
will update VMMaker and the other packages to the most up to date versions.
During the merge process,  a merge browser will open with a label such as
"Merging FFI-Pools-eem.3". Highlight the entries and click "Keep", then
click the "Merge" button to accept the merge and proceed (this merge conflict
will not effect your VM, so it is safe to ignore it and proceed).

When the update process is complete, you will have the latest VMMaker version:
  VMMaker versionString ==> '4.7.14'

Save your image. Your image is now prepared for VM code generation, so the
next steps will be to load the platform source code that is required for
code generation and VM building.

In a Linux terminal window (outside of Squeak), change your directory to
your working Squeak directory (the same directory that you are using to run
your image.

lewis@linux-jh8m:~> cd squeak/Squeak4.3
lewis@linux-jh8m:~/squeak/Squeak4.3>

Check out an up to date copy of the platforms source code. You will need to
have Subversion installed on your Linux system:

lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
  <lots of messages snipped>
Checked out revision 2515.
lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk

This will place all of the platform sources in a subdirectory called
trunk/platforms. It is easier for VMMaker to find this directory if the
platforms directory is in directly in your Squeak directory, so use a symbolic
link to make it so:

lewis@linux-jh8m:~/squeak/Squeak4.3> ln -s trunk/platforms platforms

The platforms sources are now ready for use, so return to your Squeak
image to generate your VM source code.

Open a VMMaker tool withy world menu -> open... -> VMMaker

Click the Help button and have a quick look at the help information. You
can come back to it later to read in more detail.

A list of available plugins appears in the left panel ("Plugins not built").
You can drag entiries from this panel into the "Internal Plugins" panel or
the "External Plugins" panel, or you can right click on the panel and use the
menu to copy all plugins from one panel to another (plugins that cannot be
built on your platform will remain in the "Plugins not built" panel).

We are building our first VM, so we will select just a few important plugins
to build and omit many others for now. After you are confident that you can
build a VM, you can add other plugins and any operating system libraries that
may be needed to support them. You can also use a VMMaker configuration file
to load a saved configuration, but for now we will do the work by hand to
show how it is done.

Use the mouse to drag and drop the following plugin entries from the
"Plugins not built" panel to the "Internal plugins" panel.

  BalloonEnginePlugin
  BitBltSimulation
  DeflatePlugin
  FilePlugin
  LargeIntegersPlugin
  LocalePlugin
  SecurityPlugin
  SocketPlugin

Now add some external plugins by dragging the following entries to the
"External plugins" panel:

  UUIDPlugin
  UnixAioPlugin
  UnixOSProcessPlugin
  XDisplayControlPlugin

Click the "Clean out" button to make sure the output directory is empty.
This is not really necessary now, but it is good practice, and you will
want to do it any time you want to guarantee that you are generating a
complete fresh copy of the VM sources.

In the "Generate:" panel, click the "Entire" button. This will generate
all of the VM and plugin source code. In other words, it will translate
the Smalltalk classes in your image into C code, and store the resulting
source code in the "src" directory in your Squeak directory. This generated
source, in combination with the platforms source code that you downloaded
from the Subversion repository, is the complete source code for your new
Squeak VM.

Now go back to your Linux terminal window to compile and install the VM.
You will need to have the CMake package installed on your Linux system,
so make sure this is done before proceeding.

You should now have all necessary sources in the "platforms" and "src"
directories in your Squeak working directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> ls -ltd platforms src
drwxr-xr-x 4 lewis users 4096 2011-11-19 10:10 src
lrwxrwxrwx 1 lewis users  15 2011-11-19 09:39 platforms -> trunk/platforms

Create a "build" directory for building the VM, and change into that
directory:

lewis@linux-jh8m:~/squeak/Squeak4.3> mkdir build
lewis@linux-jh8m:~/squeak/Squeak4.3> cd build
lewis@linux-jh8m:~/squeak/Squeak4.3/build>

We will first run a configuration procedure that uses CMake to configure
the sources for your system. You will find documention for this in
platforms/unix/CMake.txt. The script that runs this procedure has introductory
help, so read this first:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --help

Now, from your empty build directory, run the actual configuration process.
The parameters specify the location of the generated sources, and also specify
that GL libaries should be avoided (they are not needed for this simple build,
and might cause problems if you do not have the necessary libraries in place).
If you are using a 64-bit operating system, this configuration will build a
64-bit VM (see the configuration help above if you want to specify CFLAGS to
build a 32-bit VM, which you may later want to do if you are building some of
the plugins that work in 32-bit mode).

lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --src=../src --without-gl

When the configuration is complete, use make to build the VM:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make

If you have any errors or problems with the build, you may need to do
some troubleshooting. In most cases the problem will relate to missing
development software that you will need to install on your Linux system.

When the build is complete, your new VM is read to be installed.

lewis@linux-jh8m:~/squeak/Squeak4.3/build> make install

Depending on the security settings of your system, you may need to log
in as root (or use sudo) to perform this last step (but never use root
access for any of the other build steps described above).

Your new Squeak VM is now built and installed, ready to be run as
/usr/local/bin/squeak. You can verify the version of the VM you are
running as follows:

lewis@linux-jh8m:~/squeak/Squeak4.3/build> squeak -version
4.7.14-2515 #1 XShm Sat Nov 19 10:27:11 EST 2011 gcc 4.5.0
Linux linux-jh8m 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
plugin path: /usr/local/lib/squeak/4.7.14-2515 [default: /usr/local/lib/squeak/4.7.14-2515/]

Congratulations, you are now a VM builder. You will probably want to add
some more plugins, and you can save and load your VMMaker configurations
for various combinations of plugins with the "Load" and "Save" buttons on
your VMMaker window. For reference, here is a configuration file that
matches the configuration of recent official Unix Squeak VMs on
www.squeakvm.org (note that you will need to locate and install KedamaPlugin
and GStreamer plugin to build a VM that fully matches the standard Unix VM).

Contents of standard-vmmaker-unix.config file:

#(#(#ADPCMCodecPlugin
#AsynchFilePlugin
#BMPReadWriterPlugin
#BalloonEnginePlugin
#BitBltSimulation
#CroquetPlugin
#DSAPlugin
#DeflatePlugin
#DropPlugin
#FFTPlugin
#FT2Plugin
#FilePlugin
#FloatArrayPlugin
#FloatMathPlugin
#GeniePlugin
#JPEGReadWriter2Plugin
#JPEGReaderPlugin
#JoystickTabletPlugin
#KlattSynthesizerPlugin
#LargeIntegersPlugin
#LocalePlugin
#MD5Plugin
#Matrix2x3Plugin
#MiscPrimitivePlugin
#RandPlugin
#RePlugin
#SHA256Plugin
#SecurityPlugin
#SerialPlugin
#SlangTestPlugin
#SlangTestSupportPlugin
#SocketPlugin
#SoundCodecPlugin
#SoundGenerationPlugin
#SoundPlugin
#StarSqueakPlugin
#SurfacePlugin
)
#(#B3DAcceleratorPlugin
#B3DEnginePlugin
#ClipboardExtendedPlugin
#DBusPlugin
#FFIPlugin
#FileCopyPlugin
#GStreamerPlugin
#HostWindowPlugin
#KedamaPlugin
#KedamaPlugin2
#MIDIPlugin
#Mpeg3Plu gin
#RomePlugin
#UUIDPlugin
#UnixAioPlugin
#UnixOSProcessPlugin
#XDisplayControlPlugin
)
true
false
'unix'
'src'
'platforms'
4
true
true
'Interpreter'
)



Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

David T. Lewis
 
On Sun, Nov 20, 2011 at 10:25:30PM -0800, Markus Lampert wrote:

>  
> Hi David,
>
> thanks for the tutorial, love it!
>
> One question though, when it comes to generating the sources I run into several warnings:
> CrLfFileStream class>>new has been deprecated. This class is now obsolete, use MultiByteFileStream instead.
>
>
> Is this expected?

Yes, you will see this warning message if you have the showDeprecationWarnings
preference enabled (the preference was not enabled in the image that I used,
and I did not notice this).

The warning is annoying but harmless. A fix is available (Eliot Miranda
fixed in in the oscog branch), but I apparently neglected to commit it
to the VMMaker repository. I'll fix it soon, thanks for pointing out the
problem.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

stephane ducasse-2
In reply to this post by David T. Lewis

Hi david

Did you try the process that has been put in place by igor?
And that is documented in the blogs of mariano?
Why don't you use it?
Is it a problem related to git?

Because all the attendees of the presentations made by igor could compile their VM on their platform
without problems. so I wonder why the community is not reusing this work.

Is it because this is related to pharo?

Stef


On Nov 19, 2011, at 6:28 PM, David T. Lewis wrote:

>
> This is a topic that deserves an occasional update, so here is an updated
> step-by-step recipe for building with Squeak on Linux.
>
> These instructions are saved on the swiki at <http://wiki.squeak.org/squeak/6177>
>
> Start with a fresh image such as http://ftp.squeak.org/4.3alpha/Squeak4.3gamma-11793.zip
> (any recent Squeak image will do).
>
> Open a new Morphic project in which to work, and enter the project.
>
> Open a new workspace for taking notes as you work, and a transcript to display
> any transcript output that might appear.
>
> Open a Monticello browser.
>
> In the Monticello browser, add a new repository (+Repository button).
> Select "HTTP" repository type, and edit the repository information as follows:
>
> MCHttpRepository
> location: 'http://www.squeaksource.com/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 (update-dtl.9.mcm as of
> this writing).
>
> Click the "Load" button to load VMMaker. This will load VMMaker and various
> related packages and plugins. This will load a base version of these packages
> (but you do not yet have the latest updates, see the next step below). You
> can see a version identification for your VMMaker package by evaluating
> "VMMaker versionString" in your workspace:
>  VMMaker versionString ==> '4.7.9'
>
> In the workspace, evaluate the expression "VMMaker updateFromServer". This
> will update VMMaker and the other packages to the most up to date versions.
> During the merge process,  a merge browser will open with a label such as
> "Merging FFI-Pools-eem.3". Highlight the entries and click "Keep", then
> click the "Merge" button to accept the merge and proceed (this merge conflict
> will not effect your VM, so it is safe to ignore it and proceed).
>
> When the update process is complete, you will have the latest VMMaker version:
>  VMMaker versionString ==> '4.7.14'
>
> Save your image. Your image is now prepared for VM code generation, so the
> next steps will be to load the platform source code that is required for
> code generation and VM building.
>
> In a Linux terminal window (outside of Squeak), change your directory to
> your working Squeak directory (the same directory that you are using to run
> your image.
>
> lewis@linux-jh8m:~> cd squeak/Squeak4.3
> lewis@linux-jh8m:~/squeak/Squeak4.3>
>
> Check out an up to date copy of the platforms source code. You will need to
> have Subversion installed on your Linux system:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
>  <lots of messages snipped>
> Checked out revision 2515.
> lewis@linux-jh8m:~/squeak/Squeak4.3> svn co http://squeakvm.org/svn/squeak/trunk
>
> This will place all of the platform sources in a subdirectory called
> trunk/platforms. It is easier for VMMaker to find this directory if the
> platforms directory is in directly in your Squeak directory, so use a symbolic
> link to make it so:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> ln -s trunk/platforms platforms
>
> The platforms sources are now ready for use, so return to your Squeak
> image to generate your VM source code.
>
> Open a VMMaker tool withy world menu -> open... -> VMMaker
>
> Click the Help button and have a quick look at the help information. You
> can come back to it later to read in more detail.
>
> A list of available plugins appears in the left panel ("Plugins not built").
> You can drag entiries from this panel into the "Internal Plugins" panel or
> the "External Plugins" panel, or you can right click on the panel and use the
> menu to copy all plugins from one panel to another (plugins that cannot be
> built on your platform will remain in the "Plugins not built" panel).
>
> We are building our first VM, so we will select just a few important plugins
> to build and omit many others for now. After you are confident that you can
> build a VM, you can add other plugins and any operating system libraries that
> may be needed to support them. You can also use a VMMaker configuration file
> to load a saved configuration, but for now we will do the work by hand to
> show how it is done.
>
> Use the mouse to drag and drop the following plugin entries from the
> "Plugins not built" panel to the "Internal plugins" panel.
>
>  BalloonEnginePlugin
>  BitBltSimulation
>  DeflatePlugin
>  FilePlugin
>  LargeIntegersPlugin
>  LocalePlugin
>  SecurityPlugin
>  SocketPlugin
>
> Now add some external plugins by dragging the following entries to the
> "External plugins" panel:
>
>  UUIDPlugin
>  UnixAioPlugin
>  UnixOSProcessPlugin
>  XDisplayControlPlugin
>
> Click the "Clean out" button to make sure the output directory is empty.
> This is not really necessary now, but it is good practice, and you will
> want to do it any time you want to guarantee that you are generating a
> complete fresh copy of the VM sources.
>
> In the "Generate:" panel, click the "Entire" button. This will generate
> all of the VM and plugin source code. In other words, it will translate
> the Smalltalk classes in your image into C code, and store the resulting
> source code in the "src" directory in your Squeak directory. This generated
> source, in combination with the platforms source code that you downloaded
> from the Subversion repository, is the complete source code for your new
> Squeak VM.
>
> Now go back to your Linux terminal window to compile and install the VM.
> You will need to have the CMake package installed on your Linux system,
> so make sure this is done before proceeding.
>
> You should now have all necessary sources in the "platforms" and "src"
> directories in your Squeak working directory:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> ls -ltd platforms src
> drwxr-xr-x 4 lewis users 4096 2011-11-19 10:10 src
> lrwxrwxrwx 1 lewis users   15 2011-11-19 09:39 platforms -> trunk/platforms
>
> Create a "build" directory for building the VM, and change into that
> directory:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3> mkdir build
> lewis@linux-jh8m:~/squeak/Squeak4.3> cd build
> lewis@linux-jh8m:~/squeak/Squeak4.3/build>
>
> We will first run a configuration procedure that uses CMake to configure
> the sources for your system. You will find documention for this in
> platforms/unix/CMake.txt. The script that runs this procedure has introductory
> help, so read this first:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --help
>
> Now, from your empty build directory, run the actual configuration process.
> The parameters specify the location of the generated sources, and also specify
> that GL libaries should be avoided (they are not needed for this simple build,
> and might cause problems if you do not have the necessary libraries in place).
> If you are using a 64-bit operating system, this configuration will build a
> 64-bit VM (see the configuration help above if you want to specify CFLAGS to
> build a 32-bit VM, which you may later want to do if you are building some of
> the plugins that work in 32-bit mode).
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> ../platforms/unix/cmake/configure --src=../src --without-gl
>
> When the configuration is complete, use make to build the VM:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> make
>
> If you have any errors or problems with the build, you may need to do
> some troubleshooting. In most cases the problem will relate to missing
> development software that you will need to install on your Linux system.
>
> When the build is complete, your new VM is read to be installed.
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> make install
>
> Depending on the security settings of your system, you may need to log
> in as root (or use sudo) to perform this last step (but never use root
> access for any of the other build steps described above).
>
> Your new Squeak VM is now built and installed, ready to be run as
> /usr/local/bin/squeak. You can verify the version of the VM you are
> running as follows:
>
> lewis@linux-jh8m:~/squeak/Squeak4.3/build> squeak -version
> 4.7.14-2515 #1 XShm Sat Nov 19 10:27:11 EST 2011 gcc 4.5.0
> Linux linux-jh8m 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
> plugin path: /usr/local/lib/squeak/4.7.14-2515 [default: /usr/local/lib/squeak/4.7.14-2515/]
>
> Congratulations, you are now a VM builder. You will probably want to add
> some more plugins, and you can save and load your VMMaker configurations
> for various combinations of plugins with the "Load" and "Save" buttons on
> your VMMaker window. For reference, here is a configuration file that
> matches the configuration of recent official Unix Squeak VMs on
> www.squeakvm.org (note that you will need to locate and install KedamaPlugin
> and GStreamer plugin to build a VM that fully matches the standard Unix VM).
>
> Contents of standard-vmmaker-unix.config file:
>
> #(#(#ADPCMCodecPlugin
> #AsynchFilePlugin
> #BMPReadWriterPlugin
> #BalloonEnginePlugin
> #BitBltSimulation
> #CroquetPlugin
> #DSAPlugin
> #DeflatePlugin
> #DropPlugin
> #FFTPlugin
> #FT2Plugin
> #FilePlugin
> #FloatArrayPlugin
> #FloatMathPlugin
> #GeniePlugin
> #JPEGReadWriter2Plugin
> #JPEGReaderPlugin
> #JoystickTabletPlugin
> #KlattSynthesizerPlugin
> #LargeIntegersPlugin
> #LocalePlugin
> #MD5Plugin
> #Matrix2x3Plugin
> #MiscPrimitivePlugin
> #RandPlugin
> #RePlugin
> #SHA256Plugin
> #SecurityPlugin
> #SerialPlugin
> #SlangTestPlugin
> #SlangTestSupportPlugin
> #SocketPlugin
> #SoundCodecPlugin
> #SoundGenerationPlugin
> #SoundPlugin
> #StarSqueakPlugin
> #SurfacePlugin
> )
> #(#B3DAcceleratorPlugin
> #B3DEnginePlugin
> #ClipboardExtendedPlugin
> #DBusPlugin
> #FFIPlugin
> #FileCopyPlugin
> #GStreamerPlugin
> #HostWindowPlugin
> #KedamaPlugin
> #KedamaPlugin2
> #MIDIPlugin
> #Mpeg3Plugin
> #RomePlugin
> #UUIDPlugin
> #UnixAioPlugin
> #UnixOSProcessPlugin
> #XDisplayControlPlugin
> )
> true
> false
> 'unix'
> 'src'
> 'platforms'
> 4
> true
> true
> 'Interpreter'
> )
>

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

David T. Lewis
 
On Mon, Nov 21, 2011 at 02:18:19PM +0100, stephane ducasse wrote:
>
> Hi david
>
> Did you try the process that has been put in place by igor?
> And that is documented in the blogs of mariano?
> Why don't you use it?
> Is it a problem related to git?

Igor's work is great, and I encourage everyone to read Mariano's
blog. There is a lot of active VM work going on these days, and we
are fortunate to have people like Mariano taking the time to document
it, write blogs, and create videos to explain how things work.

My intention was just to document a working "recipe" for the build
procedure that I actually use when building a standard VM on my
own PC. The information all exists elsewhere, but sometimes it is
helpful to write it down step by step in a form that anyone can
easily follow.

>
> Because all the attendees of the presentations made by igor could compile their VM on their platform
> without problems. so I wonder why the community is not reusing this work.
>
> Is it because this is related to pharo?

No, I was simply documenting that steps that I actually use when
building an interpreter VM on my own PC.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Jeff Gonis-2
In reply to this post by David T. Lewis
 
Hi David and Stephane,

I sent David an email thanking him very much for this email on the squeak-dev list and I saw this message and I thought that maybe I could state what value David's email had for me, as a vote for David sending it.

I had in fact gone and looked at Mariano's blog and also the Deep Into Smalltalk vm course slides to work on building a vm, but I generally use the latest squeak image in my development, and in this image neither Gofer nor Metacello are present. Both of the resources that were listed explicitly place their instructions in the context of operating inside of a Pharo image and using Gofer, and so if you are not in a Pharo image, instead of working on getting a vm built you first have to work on figuring out how to get Gofer and Metacello up and running in your image. This can discourage you and eventually cause you to turn your attention to doing other development in the image which is what happened for me.

David's instructions worked for the first time I tried them, even being so thorough as to tell me how to deal with the merge window that popped up, and worked inside a Squeak image.  Unfortunately, I attempted the same instructions from inside a pharo 1.3 image and came across several errors with what appear to be unsatisfied dependencies and a syntax error.  So it looks like right now we are kind of stuck with a situation in which the instructions for building a VM differ between Pharo and Squeak.  But this is why David's email was so valuable, because the most clear directions for VM building for me were pharo specific, and now there are instructions suited to Squeak that I can use. So I don't see his email as duplication but rather as providing the directions that I was unable to get from the other resources.

Anyway, just wanted to put in my 2 cents on why I appreciated David's work so much.

Thanks,
Jeff G.
Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Mariano Martinez Peck
 


On Mon, Nov 21, 2011 at 6:11 PM, Jeff Gonis <[hidden email]> wrote:
 
Hi David and Stephane,

I sent David an email thanking him very much for this email on the squeak-dev list and I saw this message and I thought that maybe I could state what value David's email had for me, as a vote for David sending it.

I had in fact gone and looked at Mariano's blog and also the Deep Into Smalltalk vm course slides to work on building a vm, but I generally use the latest squeak image in my development, and in this image neither Gofer nor Metacello are present. Both of the resources that were listed explicitly place their instructions in the context of operating inside of a Pharo image and using Gofer, and so if you are not in a Pharo image, instead of working on getting a vm built you first have to work on figuring out how to get Gofer and Metacello up and running in your image. This can discourage you and eventually cause you to turn your attention to doing other development in the image which is what happened for me.


Gofer is not necessary. It was used just to download ConfigurationOfCog. You can take the Monticello Browser and download it by hand. Even more, you can use Installer in Squeak if you want.
 
David's instructions worked for the first time I tried them,

The problem is that the same instructions way not work in 6 months, since it is very easy that platform code is not in sync with VMMaker. Or even worst, some packages of VMMaker may not be in sync with other packages of VMMaker.
 
even being so thorough as to tell me how to deal with the merge window that popped up, and worked inside a Squeak image.  Unfortunately, I attempted the same instructions from inside a pharo 1.3 image and came across several errors with what appear to be unsatisfied dependencies and a syntax error.  So it looks like right now we are kind of stuck with a situation in which the instructions for building a VM differ between Pharo and Squeak. 

Again, in 6 months the instructions can be obsolete because it may change the amount of plugins, or which ones go internal, which external etc. With CMakeVMMaker this is done for you. You don't need to be aware of which plugins you should compile etc.
 
But this is why David's email was so valuable, because the most clear directions for VM building for me were pharo specific,

There is nothing Pharo specific. All what is done from image side is to generate sources. Metacello works in Squeak, hence ConfigurationOfCog should work in Squeak. And CMakeVMMaker is quite platform independent. I didn't try it in Squeak, but I think it should work also.
 
and now there are instructions suited to Squeak that I can use. So I don't see his email as duplication but rather as providing the directions that I was unable to get from the other resources.

Completely agree with this. But nobody said the opposite. David's mail is really helpful, but Stef was asking something different: why not to take advantage of all the work Igor and company have already done?  If you can make it work in Squeak, then you don't even need another way of building the vm.
 

Anyway, just wanted to put in my 2 cents on why I appreciated David's work so much.


+1
 
Thanks,
Jeff G.




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: How to build a standard Unix interpreter VM on Linux using a Squeak trunk image

Ian Piumarta
In reply to this post by Mariano Martinez Peck
 
On Nov 19, 2011, at 12:30 , Mariano Martinez Peck wrote:

> +1   Excellent thread David :)
> Maybe we could also add it in http://www.squeakvm.org/unix/devel.html ?

Done.

THANKS Dave!

Regards,
Ian