<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 12:21 AM, Luke Gorrie <span dir="ltr"><<a href="mailto:luke@snabb.co" target="_blank">luke@snabb.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><div dir="ltr">Hi Ben & all,<div><br></div><div>I revised the nix packaging. I'll do a little testing and cleaning up and then send it upstream. Quick testing or feedback would be really welcome!</div><div><br></div><div>This (long, single line) command installs the VMs (cog, spur, spur64) behind a simple wrapper:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">nix-env --option tarball-ttl 0 -f <a href="https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz" target="_blank">https://github.com/lukego/<wbr>nixpkgs/archive/pharo6.tar.gz</a> -iA pharo.vm</font></blockquote><div><br></div></div></blockquote><div><br></div><div>After I did that and it spent a few minutes pulling in and compiling dependencies and compiling the VM,</div><div>I ran it again, and it completed immediately taking minimal action.  Thats cool! </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>Then you can start an image like this:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">pharo-vm ...</font></div></blockquote><div><br></div></div></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>You can also install a few off-the-shelf images with dedicated startup scripts. Here's how to install all of them:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">nix-env --option tarball-ttl 0 -f <a href="https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz" target="_blank">https://github.com/lukego/<wbr>nixpkgs/archive/pharo6.tar.gz</a> -iA pharo</font></blockquote><div><br></div></div></blockquote><div><br></div><div>When I ran that, it kicked off a few more minutes compiling.  Is that expected?</div><div>Also I got an error "error: detected 64-bit image but 64-bit VM is not available"</div><div>perhaps since I'm on 32-bit Debian (Jessie-8).  Is there some way to guard against such error?</div><div>So the following did commands seem to have not been installed.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>Then you can start one of those images with these shell commands:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace">pharo-6.0<br></font><font face="monospace, monospace">pharo64-6.0<br></font></blockquote></div></blockquote><div><br></div><div>Since Pharo 6 is not yet released, what are the implications of naming these pharo-6.dev </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font face="monospace, monospace"></font><font face="monospace, monospace">pharo-5.0<br></font><font face="monospace, monospace">moose-6.1</font><font face="monospace, monospace"><br></font><font face="monospace, monospace">pharo-launcher-2017.02.28</font></blockquote><div><br></div><div>There is a little automatic testing: Each image is started under Xvfb to see if it crashes.</div><div><br></div><div>I am having some trouble doing "Save as..." to persist these images. The image seems to suggest saving them in the root directory, rather than the current directory, and I haven't managed to actually save an image. Weird. Have to look a bit harder. Let me know if you see the problem!</div></div></blockquote><div><br></div><div>Is it directory permissions on the image file, or directory containing the image file? </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>btw: The images are <a href="https://github.com/lukego/nixpkgs/blob/pharo6/pkgs/development/pharo/images/default.nix" target="_blank">maintained manually</a>. Could be automated in the future with a program to generate that file. Or maybe packaging images is the wrong idea and the launcher is better. Time will tell.</div></div></blockquote><div><br></div><div>I think at least packaging the bleeding edge (i.e. atm Pharo 6) is wrong, since it changes fast.</div><div>If Squeak adopts this, it may make more sense for them.  Squeak trunk works more with an incremental growth of an Image, with a chain of updates scripts (someone might provide more detail), whereas Pharo has more of a bootstrap process where each build is not a child of the previous build, which is where PharoLauncher is useful. </div><div><br></div><div>Packing the other images is maybe also wrong.  How would you deal with user state being stored in the image when a new build download in available?</div><div><br></div><div>cheers -ben</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 April 2017 at 23:00, Luke Gorrie <span dir="ltr"><<a href="mailto:luke@snabb.co" target="_blank">luke@snabb.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 18 April 2017 at 18:59, Ben Coman <span dir="ltr"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>This worked fine for me on 32bit Debian 8 Jessie, resulting in...</div></div></div></blockquote><div><br></div><div>Cool! Thanks for testing that.</div><div><br></div><div>The reason you see some "Jan 1 1970" timestamps is that nix resets file modification times back to the epoch to make the build more reproducible.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Being able to try a compiler upgrade and then cleanly rollback is a great feature.  I gather that under the covers, so switching between two environments is just a quick link change? </div></div></div></div></div></div></blockquote><div><br></div><div>Yep.</div><div><br></div><div>You can also skip the symlinks and construct the software environment you want with a custom $PATH. Here is a command to start a sub-shell with exactly the build environment used for compiling the vm:</div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><p class="gmail-m_-4294511783863441899m_4076428431066425177gmail-p1"><span class="gmail-m_-4294511783863441899m_4076428431066425177gmail-s1"><font face="monospace, monospace">$ nix-shell <a href="https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz" target="_blank">https://github.com/lukego/nixp<wbr>kgs/archive/pharo6.tar.gz</a> -A pkgs.pharo-vm</font></span></p></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div>This will start a shell with $PATH including exactly the expected versions of bash, gcc, autoconf, libtool, etc, that the build would use. Good for trouble shooting.</div><div><br></div><div>The binaries that you build will also remember exactly which shared objects they are supposed to link with (e.g. which build of glibc):</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><font face="monospace, monospace">$ ldd $(which ls)</font></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        linux-gate.so.1 (0xf7767000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        librt.so.1 => /nix/store/djclawhih7363vlvsbr<wbr>gfi1fr8l3glix-glibc-2.25/lib/<wbr>librt.so.1 (0xf7759000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        libacl.so.1 => /nix/store/v480rw5maz01wh5ysrm<wbr>a8mhl6qy1kvjd-acl-2.2.52/lib/<wbr>libacl.so.1 (0xf774f000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        libattr.so.1 => /nix/store/h6k7bwddlfzv1sbwxbn<wbr>l795h0317wrwp-attr-2.4.47/lib/<wbr>libattr.so.1 (0xf7749000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        libpthread.so.0 => /nix/store/djclawhih7363vlvsbr<wbr>gfi1fr8l3glix-glibc-2.25/lib/<wbr>libpthread.so.0 (0xf772b000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><span style="font-family:monospace,monospace">        libc.so.6 => /nix/store/djclawhih7363vlvsbr<wbr>gfi1fr8l3glix-glibc-2.25/lib/<wbr>libc.so.6 (0xf7573000)</span><br></div></div><div class="gmail_extra"><div class="gmail_quote"><font face="monospace, monospace"><br></font></div></div><div class="gmail_extra"><div class="gmail_quote"><font face="monospace, monospace">        /nix/store/djclawhih7363vlvsbr<wbr>gfi1fr8l3glix-glibc-2.25/lib/<wbr>ld-linux.so.2 (0xf7769000)</font></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>More nice tricks here: <a href="https://gist.github.com/travisbhartwell/f972aab227306edfcfea" target="_blank">https://gist.github.com/<wbr>travisbhartwell/f972aab227306e<wbr>dfcfea</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Now would any of the other dialects like to add to this? </div><div>At a minimum, perhaps just adding sources filesto...</div><div><a href="https://github.com/lukego/nixpkgs/blob/pharo6/pkgs/development/pharo/vm/share.nix" target="_blank">https://github.com/lukego/nixp<wbr>kgs/blob/pharo6/pkgs/developme<wbr>nt/pharo/vm/share.nix</a>  </div></div></div></div></div></blockquote><div><br></div><div>That would be neat!</div><div><br></div><div><br></div></div></div></div>
</blockquote></div><br></div>
<br></blockquote></div><br></div></div>