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

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Nov 2 22:49:54 UTC 2017

Hi Christian,
Your work sounds almost ready for inclusion. We could easily cherrypick the
patches to base files, just emit PR with those.
I see that you have committed some thirdparty sources in
My understanding is that they are either fetched during the build process,
or the libraries are replaced by those distributed with OS as you further
I would thus remove them.

Concerning the right place for putting os specific options, I don't know.

For automating the build, you would have to hack
https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis.yml and
add openbsd to the matrix
Then probably also hack
and maybe other hacks in the others .travis*.sh

For automating the tests, see
and also
The principle is to run an image that will launch the SUnit tests as
prescribed by specification in
The source code enabling this is at https://github.com/hpi-swa/smalltalkCI


2017-11-01 9:46 GMT+01:00 Christian Kellermann <ckeen at pestilenz.org>:

> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171102/2faba576/attachment.html>

More information about the Vm-dev mailing list