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