Dave,
Many thanks for the explanations.
At this point I am using the image scripts to generate a VMMaker image, which on RasPi4 Linux gets close and dies, but I am able to run the CoInterp init methods and generate code.
One wrinkle with the Squeak 6 version is that attempting to open a repo in the Monticello Browser (e.g. VMMakerInbox) generates "Error: primitiveSSLCreate failed".
I was able to access the repos via a 5.3 Squeak image and use the package-cache to be able to load a Monticello package into VMMaker.
I am able to generate and build aarch64 and riscv64 images for test.
The ThreadedRiscV64FFIPlugin shares much of the mechanics with ThreadedARM64FFIPlugin so is a subclass. Because of this, some updates for riscv64 require a change to the ThreadedARM64FFIPlugin level.
The problem of the week is to get the C casting/coercion right for both arm64 and riscv64, but [A] I have not used C much in the last couple of decades and [B] I don't yet get know the VMMaker idioms to get the generated code to do what I want. Still learning.
I know what I want at the CPU/machine/asm level and can get the (hacked) generated C code to work on both arm64 and riscv64 VM binaries (in the opensmalltalk-vm github repo see src/plugins/SqueakFFIPrims/RiscV64FFIPlugin.c) but have not yet figured out how to teach VMMaker how to get a clean RiscV64FFIPlugin.c from the Smalltalk source.
The problem is to get the FFI called function to return the properly cased float/double/other as the riscv64 gcc is very finicky to stick to the strict ABI. Much less forgiving (or less creative) than the arm64 gcc codegen.
So I am currently in an observe, theorize, test, repeat (er, hack, gen code, build) cycle as I learn the mechanics and I am re-remembering all the reasons I droped development in C in favor of Smalltalk.
If you are deep into the mechanics, you can take a look at the attached, but I will be experimenting in the mean time. I am happy to do an off-line if you have a deep desire to get into the weeds on this, but I suspect a bit more experimenting will get the Smalltalk->C->gcc->run end-to-end up.
Thanks once again for the kind background description. -KenD
Hi Ken,
On Mon, Jul 25, 2022 at 06:36:23AM -0700, ken.dickey@whidbey.com wrote:
Dave,
Many thanks for the explanations.
At this point I am using the image scripts to generate a VMMaker image, which on RasPi4 Linux gets close and dies, but I am able to run the CoInterp init methods and generate code.
One wrinkle with the Squeak 6 version is that attempting to open a repo in the Monticello Browser (e.g. VMMakerInbox) generates "Error: primitiveSSLCreate failed".
I recognize this error, it's actually a Linux distro issue that is difficult to work around for precompiled binaries such as the VM.
I am currently running an out of date Ubuntu 16.04 LTS distribution, and for me the new VM distributed with Squeak 6.0 is not able to find a dynamic library required by the SSL plugin, hence the failure to initialize an https session. For me the console error looks like this:
$ ./squeak.sh Using /home/lewis/squeak/Squeak6.0/Squeak6.0-22104-64bit-202206021410-Linux-x64/bin/squeak ... SqueakSSL tryLoading /home/lewis/squeak/Squeak6.0/Squeak6.0-22104-64bit-202206021410-Linux-x64/bin/SqueakSSL.so: dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /home/lewis/squeak/Squeak6.0/Squeak6.0-22104-64bit-202206021410-Linux-x64/bin/SqueakSSL.so)
Obviously I need to update my operating system, but in the mean time the workaround that I use is either of these two things:
1) Use an up to date VM that I have compiled and installed locally.
2) Copy an SqueakSSL.so plugin file from a working VM into the folder for the VM that is not working.
Usually I am doing #1, but if you are building the VMMaker image using Eliot's scripts, you can find an older SqueakSSL.so file and copy it into the folder for whatever VM the scripts have downloaded. Any SSL plugin that you have compiled locally should be fine, or you can copy one from some earlier VM distribution (such as the VM that was packaged with Squeak 5.3 for example).
You can also specify your own VM as a command line option for the various VMMaker scripts. In any case, the solution is to use a precompiled SqueakSSL.so from a different VM build.
Dave
vm-dev@lists.squeakfoundation.org