[Vm-dev] Fwd: Nix package for Pharo flavor of opensmalltalk-vm

Luke Gorrie luke at snabb.co
Tue Apr 18 21:00:00 UTC 2017


On 18 April 2017 at 18:59, Ben Coman <btc at openinworld.com> wrote:

> This worked fine for me on 32bit Debian 8 Jessie, resulting in...
>

Cool! Thanks for testing that.

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.

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?
>

Yep.

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:

$ nix-shell https://github.com/lukego/nixpkgs/archive/pharo6.tar.gz -A
pkgs.pharo-vm

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.

The binaries that you build will also remember exactly which shared objects
they are supposed to link with (e.g. which build of glibc):

$ ldd $(which ls)
        linux-gate.so.1 (0xf7767000)
        librt.so.1 =>
/nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/librt.so.1
(0xf7759000)
        libacl.so.1 =>
/nix/store/v480rw5maz01wh5ysrma8mhl6qy1kvjd-acl-2.2.52/lib/libacl.so.1
(0xf774f000)
        libattr.so.1 =>
/nix/store/h6k7bwddlfzv1sbwxbnl795h0317wrwp-attr-2.4.47/lib/libattr.so.1
(0xf7749000)
        libpthread.so.0 =>
/nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/libpthread.so.0
(0xf772b000)
        libc.so.6 =>
/nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/libc.so.6
(0xf7573000)


/nix/store/djclawhih7363vlvsbrgfi1fr8l3glix-glibc-2.25/lib/ld-linux.so.2
(0xf7769000)


More nice tricks here:
https://gist.github.com/travisbhartwell/f972aab227306edfcfea

Now would any of the other dialects like to add to this?
> At a minimum, perhaps just adding sources filesto...
> https://github.com/lukego/nixpkgs/blob/pharo6/pkgs/
> development/pharo/vm/share.nix
>

That would be neat!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170418/4d3587e8/attachment-0001.html>


More information about the Vm-dev mailing list