<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi Christian,</div><div>Thanks!<br></div><div>Your work sounds almost ready for inclusion. We could easily cherrypick the patches to base files, just emit PR with those.<br></div>I see that you have committed some thirdparty sources in <a href="https://github.com/ckeen/opensmalltalk-vm/commit/227f059f587a35970ebc3072fd8dca45c4887de5">https://github.com/ckeen/opensmalltalk-vm/commit/227f059f587a35970ebc3072fd8dca45c4887de5</a><br></div>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 decided.<br></div>I would thus remove them.</div><div><br></div><div>Concerning the right place for putting os specific options, I don't know.</div><div><br></div>For automating the build, you would have to hack <a href="https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis.yml">https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis.yml</a> and add openbsd to the matrix</div><div>Then probably also hack <a href="https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis_build.sh">https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis_build.sh</a></div><div>and maybe other hacks in the others .travis*.sh<br></div><br></div><div>For automating the tests, see <a href="https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis_test.sh">https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/.travis_test.sh</a><br></div>and also <a href="https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/tests/smalltalkCI.sh">https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/tests/smalltalkCI.sh</a><br></div>The principle is to run an image that will launch the SUnit tests as prescribed by specification in <a href="https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/tests/smalltalk.ston">https://github.com/ckeen/opensmalltalk-vm/blob/OpenBSD_PoC/tests/smalltalk.ston</a><br></div>The source code enabling this is at <a href="https://github.com/hpi-swa/smalltalkCI">https://github.com/hpi-swa/smalltalkCI</a><br></div><div><br></div><div>Nicolas<br></div><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-11-01 9:46 GMT+01:00 Christian Kellermann <span dir="ltr"><<a href="mailto:ckeen@pestilenz.org" target="_blank">ckeen@pestilenz.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Dear List,<br>
<br>
I have managed to successfully build a pharo cog spur VM on the<br>
OpenBSD operating system (<a href="http://openbsd.org" rel="noreferrer" target="_blank">http://openbsd.org</a>).  I have put up some<br>
patches on a fork of the opensmalltalk-vm github repo:<br>
<a href="https://github.com/ckeen/opensmalltalk-vm/tree/OpenBSD_PoC" rel="noreferrer" target="_blank">https://github.com/ckeen/<wbr>opensmalltalk-vm/tree/OpenBSD_<wbr>PoC</a><br>
<br>
I habe briefly started current Squeak with it also, but did not<br>
build a specific VM for it.<br>
<br>
I would consider this a proof of concept at the moment and would<br>
like to discuss how to get this into the main repo.  OpenBSD needs<br>
a couple of changes, all of them pretty minor. Mostly this is due<br>
to different location of include files (errno) or unsupported linker<br>
flags (-lrt) or not included by default search paths (/usr/X11R6/{include,<br>
lib), /usr/local/{include,lib})/<br>
<br>
However just hacking them into the mvm script for one machine does<br>
not seem right, are these files generated by something else?<br>
<br>
I have also disabled the building of third party components. I am<br>
currently relying on them being installed already by the OS package<br>
manager.  If this gets integrated in a real OpenBSD package these<br>
dependencies would be made explicit in the package's meta information.<br>
<br>
Also how do you test these VMs? I am a SmallTalk beginner so I am<br>
not yet familiar with the available tooling that's out there.<br>
<br>
To reproduce this build on OpenBSD, make sure you compile/install<br>
the resulting binaries into a partition that is mounted with the<br>
OpenBSD specific wxallowed flag (usually /usr/local). Otherwise the<br>
JIT will just cause a segmentation fault as mapping memory writable<br>
and executable at the same time is prohibited by default.<br>
<br>
My next planned steps would be:<br>
<br>
- Get the needed patches into your repo<br>
- Build all VMs under OpenBSD, once I know how to test those properly<br>
- Propose an update to the outdated OpenBSD squeak package<br>
- Propose a port of Pharo to be included in the OpenBSD ports tree<br>
- Write a plugin for OpenBSD's sndio sound system (Pulse seems to<br>
  work but that is usually not installed)<br>
<br>
Looking forward to hearing your opinion.<br>
<br>
Kind regards,<br>
<br>
Christian<br>
<br>
P.S.: There is also still some issue with the FFI binding a ByteArray<br>
from libc (i.e. the 'environ' Variable). This fails for two reasons:<br>
LibC is looking for the wrong libc module name ('libc.so.6' instead<br>
of 'libc.so' or more specific to OpenBSD 'libc.so.<major>.<minor>'<br>
for example 'libc.so.90.0'). And then I get an External Allocation<br>
error. I am not sure whether this is a bug in the VM handling 64bits<br>
or in Pharo. I have not yet tested this behaviour with Squeak yet.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
May you be peaceful, may you live in safety, may you be free from<br>
suffering, and may you live with ease.<br>
</font></span></blockquote></div><br></div>