Re: [Vm-dev] CMakeVMMaker what is repository for latest? and how    to????????sync with source.squeak.org?

gettimothy gettimothy at zoho.com
Fri May 16 12:33:10 UTC 2014


Hi David

There are good and valid reasons to do things differently in the various downstream 
projects, and where possible we all hope that those various projects will contribute 
changes back to the trunk. 

 
Agreed. 


CMakeVMMaker-EstebanLorenzano.213 exists on both repositories, but it looks like the pharo team decided to continue their work over on SmalltalkHub which is currently at CMakeVMMaker-jeanbaptistearnaud.282 and source.squeak.org was not kept in sync.
No big deal for now. 


The motiviation for my email was that I am "this" close to having the stackVM run using CMake. It compiles just fine using cmake, and launches, but the display is not updating (I think its related to GL/B3D).
It took me 2 days to realize that the pharo image I have installed had a different CMakeVMMaker version than what I was working with on Squeak. Last night, I modified the BuildSqueak4XImage.st scripts to pull from SmalltalkHub and it loads fine and I will continue my debugging from there. I am hoping this was contributing to the problem I am having and I am trying to eliminate variables as I hunt this down.





There is a reason why Ian Piumarta (who created both the CMake build for Squeak, 
as well as the earlier libtool build system from which the Cog build is derived) 
organized the CMake scripts the way that he did. Any necessary CMake customizations 
related to specific modules, such as a plugin, are defined in small "config.cmake" 
and "build.cmake" files that are located in the same directories as their source code 
files. If you need to make some change to the build process for a specific module, you 
will know where to look. Changes are versioned in the same source control system 
as their respective module source files.
 


The CMMakeVMMaker has the same organization; one CMakeLists.txt etc in the root of the build and others for the various plugins. The Smalltalk CMakeVMMaker just encapsulates and generates those artifacts. I am assuming that Ian coded his CMake stuff by hand. If not, the assumption is that he used CMakeVMMaker-EstebanLorenzano.213 (but I don't think so).


let me give you an overview of the process so far. I illustrate the old process and the new.






Here is the current/old process (for Cog):

1. Get the latest Cog tree from  svn co http://www.squeakvm.org/svn/squeak/branches/Cog
2. cd Cog/image/ and run script to build an image
3. place that image relative to the sources 
4. launch image and use VMMaker tools
5. run Gnu process on generated sources.
6. voila

 

Here is what I have in place so far:



1. Get the latest Cog tree from  svn co http://www.squeakvm.org/svn/squeak/branches/Cog
2. cd Cog/image/ and run script to build an image which: 
 2.a builds image with tools per current process.
 2.b (additionally loads FT2Plus Toxic bypass)
 2.c additionally load the CMakeVMMaker package from source.squeak.org (now loading from SmalltalkHub)
 2.d Recursively copies the parent Cog source code to image_directory/oscogvm/*
 3.e Cleans the source tree to just source by finding and deleting all GNU-Build artefacts (Makefiles, autotool stuff)
3. User launches new image with the pristine source tree underneath it.
4. Run process SqueakVMBuilder buildXYZ (same as pharo process, but squeak names) to generate the source code and  CMake stuff in the clean source tree.
5. Run generated 'build.sh' script which invokes CMake and make.
6. voila.  <---I am here, but I am not saying 'voila' yet

Easy-peasy. (please note, that the Cog source tree is not modified. I copy of it is--i.e. non-intrusive process on existing process)




Once the CMake files are in place in the source tree, there is no reason once the process is mature that it cannot be automated. Hopefully we will have a rollover from the Gnu-Make era to the CMake era.





Hopefully, I get the StackVM working today.






Regarding the CMakeVMMaker code. Its quite simple to understand and well designed. The only Squeak/Pharo compatability issues are in FileSystem/FileDirectory file handling and SmalltalkImage implementation.
To keep things simple, I am modifying those things directly in the existing classes, but , once I get this working I will factor those things out to a compatibility layer. 































-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140516/e610ba2b/attachment.htm


More information about the Vm-dev mailing list