[Vm-dev] Proof of Concept of a pharo cog spur VM to OpenBSD

Stuart Cassoff aa72 at bell.net
Thu Nov 2 17:45:13 UTC 2017


Hi,

Maybe have a look at
https://github.com/aryler/ostoobsd

Stu

> ---------- Original Message ----------
> From: Christian Kellermann <ckeen at pestilenz.org>
> Date: November 1, 2017 at 4:46 AM
> 
> 
>  
> Dear List,
> 
> I have managed to successfully build a pharo cog spur VM on the
> OpenBSD operating system (http://openbsd.org).  I have put up some
> patches on a fork of the opensmalltalk-vm github repo:
> https://github.com/ckeen/opensmalltalk-vm/tree/OpenBSD_PoC
> 
> I habe briefly started current Squeak with it also, but did not
> build a specific VM for it.
> 
> I would consider this a proof of concept at the moment and would
> like to discuss how to get this into the main repo.  OpenBSD needs
> a couple of changes, all of them pretty minor. Mostly this is due
> to different location of include files (errno) or unsupported linker
> flags (-lrt) or not included by default search paths (/usr/X11R6/{include,
> lib), /usr/local/{include,lib})/
> 
> However just hacking them into the mvm script for one machine does
> not seem right, are these files generated by something else?
> 
> I have also disabled the building of third party components. I am
> currently relying on them being installed already by the OS package
> manager.  If this gets integrated in a real OpenBSD package these
> dependencies would be made explicit in the package's meta information.
> 
> Also how do you test these VMs? I am a SmallTalk beginner so I am
> not yet familiar with the available tooling that's out there.
> 
> To reproduce this build on OpenBSD, make sure you compile/install
> the resulting binaries into a partition that is mounted with the
> OpenBSD specific wxallowed flag (usually /usr/local). Otherwise the
> JIT will just cause a segmentation fault as mapping memory writable
> and executable at the same time is prohibited by default.
> 
> My next planned steps would be:
> 
> - Get the needed patches into your repo
> - Build all VMs under OpenBSD, once I know how to test those properly
> - Propose an update to the outdated OpenBSD squeak package
> - Propose a port of Pharo to be included in the OpenBSD ports tree
> - Write a plugin for OpenBSD's sndio sound system (Pulse seems to
>   work but that is usually not installed)
> 
> Looking forward to hearing your opinion.
> 
> Kind regards,
> 
> Christian
> 
> P.S.: There is also still some issue with the FFI binding a ByteArray
> from libc (i.e. the 'environ' Variable). This fails for two reasons:
> LibC is looking for the wrong libc module name ('libc.so.6' instead
> of 'libc.so' or more specific to OpenBSD 'libc.so.<major>.<minor>'
> for example 'libc.so.90.0'). And then I get an External Allocation
> error. I am not sure whether this is a bug in the VM handling 64bits
> or in Pharo. I have not yet tested this behaviour with Squeak yet.
> 
> -- 
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.


More information about the Vm-dev mailing list