GNU bug report logs - #36033
Add Smalltalk Pharo VM

Previous Next

Package: guix-patches;

Reported by: Brian Woodcox <bw <at> inskydata.com>

Date: Fri, 31 May 2019 19:58:01 UTC

Severity: normal

To reply to this bug, email your comments to 36033 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Fri, 31 May 2019 19:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Woodcox <bw <at> inskydata.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 31 May 2019 19:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Woodcox <bw <at> inskydata.com>
To: guix-patches <at> gnu.org
Subject: Add Smalltalk Pharo VM
Date: Fri, 31 May 2019 13:46:50 -0600
[Message part 1 (text/plain, inline)]
Hello,

I have added the Pharo Smalltalk VM package with this patch.

After installing this package, a user can launch an image by executing pharos-vm in the directory that contains the pharos-vm.

To keep things consistent with the current Pharo release, I decided to use the sdl2 <at> 2.0.7 and libgit2 <at> 0.25.1.  If someone feels I should use the latest releases of these packages, I can submit a new patch.

Because of the way Pharo constructs the version and commit date for use internally in the Pharo VM, it is necessary to add this information to the package i.e. commit-info.

This is my first package, so go easy on me. :)

Cheers!

[0001-Add-pharo-vm-package.patch (application/octet-stream, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Fri, 31 May 2019 23:32:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Woodcox <bw <at> inskydata.com>
To: guix-patches <at> gnu.org
Subject: Re: Add Smalltalk Pharo VM
Date: Fri, 31 May 2019 17:30:35 -0600
I notice that there were a couple of errors when this was posted.  The second one was out of my hands (caused by the mailing system).

> On May 31, 2019, at 1:46 PM, Brian Woodcox <bw <at> inskydata.com> wrote:
> 
> Hello,
> 
> I have added the Pharo Smalltalk VM package with this patch.
> 
> After installing this package, a user can launch an image by executing pharos-vm in the directory that contains the pharos-vm.

The above line should read as:

After installing this package, a user can launch an image by executing pharo in the directory that contains the pharo image.

> 
> To keep things consistent with the current Pharo release, I decided to use the sdl2 <at> 2.0.7 and libgit2 <at> 0.25.1.  If someone feels I should use the latest releases of these packages, I can submit a new patch.

The above line should read as:

To keep things consistent with the current Pharo release, I decided to use the sdl2 at 2.0.7 and libgit2 at 0.25.1.  If someone feels I should use the latest releases of these packages, I can submit a new patch.
> 
> Because of the way Pharo constructs the version and commit date for use internally in the Pharo VM, it is necessary to add this information to the package i.e. commit-info.
> 
> This is my first package, so go easy on me. :)
> 
> Cheers!
> 
> <0001-Add-pharo-vm-package.patch>

My apologies.

Brian.



Information forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Fri, 31 May 2019 23:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 36033 <at> debbugs.gnu.org (full text, mbox):

From: Brian Woodcox <bw <at> inskydata.com>
To: 36033 <at> debbugs.gnu.org
Subject: [bug#36033] Add Smalltalk Pharo VM
Date: Fri, 31 May 2019 17:33:00 -0600
[Message part 1 (text/plain, inline)]
I notice that there were a couple of errors when this was posted.  The second one was out of my hands (caused by the mailing system).

> On May 31, 2019, at 1:46 PM, Brian Woodcox <bw <at> inskydata.com <mailto:bw <at> inskydata.com>> wrote:
> 
> Hello,
> 
> I have added the Pharo Smalltalk VM package with this patch.
> 
> After installing this package, a user can launch an image by executing pharos-vm in the directory that contains the pharos-vm.

The above line should read as:

After installing this package, a user can launch an image by executing pharo in the directory that contains the pharo image.

> 
> To keep things consistent with the current Pharo release, I decided to use the sdl2 <at> 2.0.7 and libgit2 <at> 0.25.1.  If someone feels I should use the latest releases of these packages, I can submit a new patch.

The above line should read as:

To keep things consistent with the current Pharo release, I decided to use the sdl2 at 2.0.7 and libgit2 at 0.25.1.  If someone feels I should use the latest releases of these packages, I can submit a new patch.
> 
> Because of the way Pharo constructs the version and commit date for use internally in the Pharo VM, it is necessary to add this information to the package i.e. commit-info.
> 
> This is my first package, so go easy on me. :)
> 
> Cheers!
> 
> <0001-Add-pharo-vm-package.patch>

My apologies.

Brian.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Sat, 01 Jun 2019 13:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 36033 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brian Woodcox <bw <at> inskydata.com>
Cc: 36033 <at> debbugs.gnu.org
Subject: Re: [bug#36033] Add Smalltalk Pharo VM
Date: Sat, 01 Jun 2019 15:23:02 +0200
Hello,

Thanks for working on this, and congrats on your first package, which is
not an easy one!  :-)

Some preliminary comments:

Brian Woodcox <bw <at> inskydata.com> skribis:

> From 49683e04e51cd904571008fa7979a3f58ae0134c Mon Sep 17 00:00:00 2001
> From: "Brian C. Woodcox" <bw <at> InSkyData.com>
> Date: Fri, 31 May 2019 13:14:54 -0600
> Subject: [PATCH] Add pharo-vm package

[...]

> +(define %url "https://github.com/OpenSmalltalk/opensmalltalk-vm.git")

My understanding (but I’m no expert) is that this is a VM that can run
Pharo bytecode, but it’s not “the” Pharo VM.  Is it correct?

> +(define-public pharo-vm
> +  (package
> +    (name "pharo-vm")

Consequently, it looks like this should be called ‘opensmalltalk-vm’,
no?

> +    (arguments
> +     `(#:tests? #f ;; no tests available

Or maybe there’s a special command to run them?

> +               ;; add symlinks
> +               (symlink (string-append (assoc-ref %build-inputs "libgit2") "/lib/libgit2.so")
> +                        (string-append out "/lib/pharo/" pharo-version "/libgit2.so"))
> +               (symlink (string-append (assoc-ref %build-inputs "libssh2") "/lib/libssh2.so")
> +                        (string-append out "/lib/pharo/" pharo-version "/libssh2.so"))
> +               (symlink (string-append (assoc-ref %build-inputs "openssl") "/lib/libssl.so")
> +                        (string-append out "/lib/pharo/" pharo-version "/libssl.so"))
> +               (symlink (string-append (assoc-ref %build-inputs "freetype")"/lib/libfreetype.so.6")
> +                        (string-append out "/lib/pharo/" pharo-version "/libfreetype.so.6")))

Those symlinks look somewhat inelegant to me.  :-)

Could we instead arrange so that the VM searches for those files in
their right place?  Often that involves substituting things like
“libfoo.so” in the code with the corresponding absolute file name (see
for example how this is done for Racket.)

Last question: does this Git checkout contain binaries, such as
Smalltalk images?  IOW, is this being built entirely from source, or is
it bootstrap from opaque binaries?  (I know that Pharo itself is or used
to be bootstrap from very old Smalltalk images and that work was ongoing
to get rid of them and have a nicer bootstrapping story.)

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Sat, 01 Jun 2019 15:10:02 GMT) Full text and rfc822 format available.

Message #17 received at 36033 <at> debbugs.gnu.org (full text, mbox):

From: Brian Woodcox <bw <at> InSkyData.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36033 <at> debbugs.gnu.org
Subject: Re: [bug#36033] Add Smalltalk Pharo VM
Date: Sat, 1 Jun 2019 09:08:27 -0600
[Message part 1 (text/plain, inline)]
Thanks Ludo,

My comments are below.

> On Jun 1, 2019, at 7:23 AM, Ludovic Courtès <ludo <at> gnu.org> wrote:
> 
> Hello,
> 
> Thanks for working on this, and congrats on your first package, which is
> not an easy one!  :-)
> 
> Some preliminary comments:
> 
> Brian Woodcox <bw <at> inskydata.com> skribis:
> 
>> From 49683e04e51cd904571008fa7979a3f58ae0134c Mon Sep 17 00:00:00 2001
>> From: "Brian C. Woodcox" <bw <at> InSkyData.com>
>> Date: Fri, 31 May 2019 13:14:54 -0600
>> Subject: [PATCH] Add pharo-vm package
> 
> [...]
> 
>> +(define %url "https://github.com/OpenSmalltalk/opensmalltalk-vm.git")
> 
> My understanding (but I’m no expert) is that this is a VM that can run
> Pharo bytecode, but it’s not “the” Pharo VM.  Is it correct?

More info —> https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/PharoTour/PharoTour.html
“1. The virtual machine (VM) is the only component that is different for each operating system. The VM is the execution engine (similar to a JVM). It takes Pharo bytcode that is generated each time user compiles a piece of code, converts it to machine code and executes it. Pharo comes with the Cog VM a very fast JITing VM. The VM executable is named:”

> 
>> +(define-public pharo-vm
>> +  (package
>> +    (name "pharo-vm")
> 
> Consequently, it looks like this should be called ‘opensmalltalk-vm’,
> no?
> 
Not exactly —> https://github.com/pharo-project/pharo-vm

“Dear user, we have move PharoVM development to OpenSmalltalk-VM, please go there if you are looking for building a VM.”

In the OpenSmalltalk-VM repository they have build scripts for different vm’s such as squeak, pharo, etc..

So this is to distinguish the one we are packaging.

>> +    (arguments
>> +     `(#:tests? #f ;; no tests available
> 
> Or maybe there’s a special command to run them?
> 
>> +               ;; add symlinks
>> +               (symlink (string-append (assoc-ref %build-inputs "libgit2") "/lib/libgit2.so")
>> +                        (string-append out "/lib/pharo/" pharo-version "/libgit2.so"))
>> +               (symlink (string-append (assoc-ref %build-inputs "libssh2") "/lib/libssh2.so")
>> +                        (string-append out "/lib/pharo/" pharo-version "/libssh2.so"))
>> +               (symlink (string-append (assoc-ref %build-inputs "openssl") "/lib/libssl.so")
>> +                        (string-append out "/lib/pharo/" pharo-version "/libssl.so"))
>> +               (symlink (string-append (assoc-ref %build-inputs "freetype")"/lib/libfreetype.so.6")
>> +                        (string-append out "/lib/pharo/" pharo-version "/libfreetype.so.6")))
> 
> Those symlinks look somewhat inelegant to me.  :-)

Me too, unfortunately, Pharo won’t run without (most of) these.  I didn’t dig deep enough in the code, but if they made some changes, I am pretty sure the symlinks could be done away with.  I found in some cases that pharo found a couple of libraries in the store during the build process.

My hope is that other Pharo users might use Pharo in Guix and maybe this issue can be resolved over time.
> 
> Could we instead arrange so that the VM searches for those files in
> their right place?  Often that involves substituting things like
> “libfoo.so” in the code with the corresponding absolute file name (see
> for example how this is done for Racket.)

Possibly, I would have to look into it when I have some time.
> 
> Last question: does this Git checkout contain binaries, such as
> Smalltalk images?  IOW, is this being built entirely from source, or is
> it bootstrap from opaque binaries?  (I know that Pharo itself is or used
> to be bootstrap from very old Smalltalk images and that work was ongoing
> to get rid of them and have a nicer bootstrapping story.)

Everything in this vm is being built from source.

I skip this file —> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/build.linux64x64/pharo.cog.spur/build/mvm

And use the packages in Guix instead.

The images (which are separate from this) are definitely are built by bootstrapping which will be left to the user at this point.

I think if the developers and users were using Guix, they would enjoy it, as I have a script that will automatically populate the version and date values from any commit.  And it could be installed as a separate package.

P.S. I am very new to Smalltalk as well.  Just started using it a couple of months ago and thought it would be great if it was on Guix.
> 
> Thank you,
> Ludo’.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36033; Package guix-patches. (Thu, 13 Jun 2019 08:47:01 GMT) Full text and rfc822 format available.

Message #20 received at 36033 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brian Woodcox <bw <at> InSkyData.com>
Cc: 36033 <at> debbugs.gnu.org
Subject: Re: [bug#36033] Add Smalltalk Pharo VM
Date: Thu, 13 Jun 2019 10:46:23 +0200
Hi Brian,

Thanks for your explanations.  Please let me know if you have an updated
version of the patch, or if you need guidance on specific issues.

Ludo’.




This bug report was last modified 6 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.