[Cuis-dev] VectorEnginePlugin: parts in motion

ken.dickey at whidbey.com ken.dickey at whidbey.com
Thu Aug 5 19:23:09 PDT 2021


Background: The OpenSmalltalk VM is a commons, that is, a resource
managed by its users.  Because the VM "just works", we tend not
to think much about all the work that goes on behind the scenes
to make this happen, and so, IMHO, we have not been paying much
attention to doing our oversite job.

We all suffer from busy lives.

The result of this is that there are very few people doing much
work, so tasks like integrating the VectorEnginePlugin into
the VM build process, testing across platforms, and doing the
release, takes more time than we would like.

I am as guilty of this as anyone.

The good news is that the VectorEnginePlugin, generated by the VMMaker,
is in the process of being integrated into the standard OpenSmalltalk VM
build process.

The less good news is that it takes time for this to happen and so
documentation on how to use this in Cuis has been lagging.

Hey, we need more VM Love and Documentation Love here!  ;^)

So in the short term, here is a patch to get over this speed bump.

It does require background in building with C & Linux tools
vvv============================================================vvv
Until the VectorEnginePlugin is merged into the OpenSmalltalk release,
you can build it if you build a Squeak VM.

The basic steps are to [A] Generate the VectorEnginePlugin.c code
using a Cuis specialized VMMaker package [B] Build an OpenSmalltalk VM,
[C] Test the result, and [D] install in a typical place.

As I primarily use Linux on Arm64, I will describe the process
for that platform.

[A] Generate VectorEnginePlugin.c
   - On a fresh Cuis image, update to latest.
   - Feature require: 'VectorEnginePlugin'.
   - Open a Browser and find Class VectorEnginePlugin.
   - Select the Class Comment text:
      VectorEnginePlugin
	translateInDirectory: DirectoryEntry currentDirectory
	doInlining: true
   - You can now quit the image and should find file 
"VectorEnginePlugin.c"
[B] Build an OpenSmalltalk VM
   - Make a place (e.g. mkdir ~/OpenSmalltalk; cd ~/OpenSmalltalk)
   - git clone --depth 1 https://OpenSmalltalk/opensmalltalk-vm oscogvm
   - cd oscogvm/build.<yourPlatform>/squeak.<vmkind>.spur
   [cd oscogvm/build.linux64ARMv8/squeak.stack.spur
    If not arm64, you can use "cog" in place of "stack"
    Note: file HowToBuild]
   - mkdir 
~/OpenSmalltalk/oscogvm/platforms/Cross/plugins/VectorEnginePlugin
   - cp <WhereYouMadeIt>/VectorEngintPlugin.c  
~/OpenSmalltalk/oscogvm/platforms/Cross/plugins/VectorEnginePlugin
   - edit plugins.ext to add a new line at the end (after SHA2Plugin \)
     with the single line
VectorEnginePlugin
   - cd build
   - ./mvm
   - Answer "y" to the prompt "clean?"
   This last should result in a message "Libraries have been installed 
in"
   - cd to installed-in location, e.g.
  
~/OpenSmalltalk/oscogvm/products/sqstackspur64ARMv8linuxht/lib/squeak/5.0-*
   - ls should show a "squeak" executable and support libs, e.g.
   VectorEnginePlugin.so
   - Test _in this directory_
   [Assume $CUIS = ~/Cuis-Smalltalk/Cuis-Smalltalk-Dev]
   ./squeak $CUIS/Cuis5.0-<whatever>.image
   - In Cuis,
   Feature require: 'SVG'.
   VectorEngineWithPlugin isPluginAvailable. "Should answer true"
   (SVGMainMorph fromFileNamed:
'/home/kendi3he/Cuis-Smalltalk/SVG/SVGSamples/butterfly.svg') 
openInHand.
^^^============================================================^^^
HTH,
-KenD


More information about the Cuis-dev mailing list