Hi,
It seems some people are having trouble getting Pharo to work on Ubuntu 14.04.1 LTS 64-bit. Here is one way to make things work. Pharo (the VM) is a 32-bit executable dynamically linked to a number of libraries, each of which has to be present in its 32-bit variant in order to run Pharo and/or to use all features. On a clean, stock, fully updated Ubuntu 14.04.1 LTS 64-bit, do the following (the X11, GL and asound libraries are not needed when you run headless on a server): $ sudo apt-get install curl libc6:i386 libssl1.0.0:i386 libX11.6:i386 libGL.1:i386 libasound2:i386 $ curl get.pharo.org/40+vm | bash $ ./pharo Pharo.image eval "ZnClient new get: 'https://google.com'" $ ./pharo-ui Pharo.image HTH, Sven PS: <Pro tip> You can use ldd to check if all dependencies of the VM and its plugins in the pharo-vm directory are satisfied -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org |
This somewhat works. At minimum, the command for downloading the google home page works. On the other hand, the pharo-ui line caused an error: "pharo: could not find any display driver" That's not a huge deal as this is on a remote server and I can run headless. However, when I try to do that (i.e., ./pharo-vm/pharo headless ./Pharo.image &), I get the same message about not finding a display driver.On Sat, Feb 14, 2015 at 2:15 PM, Sven Van Caekenberghe <[hidden email]> wrote: Hi, -- |
Sorry, Jeff, it most certainly works ;-)
./pharo is the headless version ./pharo-ui is the version for running a GUI these are both bash scripts that use the binary inside pharo-vm you can look at what's in them to understand what is going on I don't want to be rude, but either you understand command line unix or you don't. To make things easier, there are the 2 top level scripts. I have no time to explain this from first principles, sorry. > On 15 Feb 2015, at 23:10, J.F. Rick <[hidden email]> wrote: > > This somewhat works. At minimum, the command for downloading the google home page works. On the other hand, the pharo-ui line caused an error: "pharo: could not find any display driver" > > That's not a huge deal as this is on a remote server and I can run headless. However, when I try to do that (i.e., ./pharo-vm/pharo headless ./Pharo.image &), I get the same message about not finding a display driver. > > I do get both vm-display-X11 and vm-display-null showing up as available drivers. > > Cheers, > > Jeff > > On Sat, Feb 14, 2015 at 2:15 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Hi, > > It seems some people are having trouble getting Pharo to work on Ubuntu 14.04.1 LTS 64-bit. > > Here is one way to make things work. > > Pharo (the VM) is a 32-bit executable dynamically linked to a number of libraries, each of which has to be present in its 32-bit variant in order to run Pharo and/or to use all features. > > On a clean, stock, fully updated Ubuntu 14.04.1 LTS 64-bit, do the following (the X11, GL and asound libraries are not needed when you run headless on a server): > > $ sudo apt-get install curl libc6:i386 libssl1.0.0:i386 libX11.6:i386 libGL.1:i386 libasound2:i386 > > $ curl get.pharo.org/40+vm | bash > > $ ./pharo Pharo.image eval "ZnClient new get: 'https://google.com'" > > $ ./pharo-ui Pharo.image > > HTH, > > Sven > > PS: <Pro tip> You can use ldd to check if all dependencies of the VM and its plugins in the pharo-vm directory are satisfied > > -- > Sven Van Caekenberghe > Proudly supporting Pharo > http://pharo.org > http://association.pharo.org > http://consortium.pharo.org > > > > > > -- > Jochen "Jeff" Rick, Ph.D. > http://www.je77.com/ > Skype ID: jochenrick |
I understand unix quite well. All the ./pharo does is redirect to the vm with the --nodisplay flag. Then pharo exits. It seems like it is just doing the command and then dies. That's definitely different behaviour than a usual headless pharo.When I try it without the "eval "ZnClient new get: 'https://google.com'"" part, I get the following in the terminal: Usage: [--no-preferences|--preference-file=<FILE>][<subcommand>] [--help] [--copyright] [--version] [--list] [ --no-quit ] --help print this help message --copyright print the copyrights --version print the version for the image and the vm --list list a description of all active command line handlers --no-quit keep the image running without activating any other command line handler <subcommand> a valid subcommand in --list Preference File Modification: --preference-file load the preferences from the given <FILE> --no-default-preferences do not load any preferences from the default locations Documentation: A PharoCommandLineHandler handles default command line arguments and options. The PharoCommandLineHandler is activated before all other handlers. It first checks if another handler is available. If so it will activate the found handler. On Sun, Feb 15, 2015 at 5:39 PM, Sven Van Caekenberghe <[hidden email]> wrote: Sorry, Jeff, it most certainly works ;-) -- |
BTW, these are pharo-users questions ...
> On 16 Feb 2015, at 01:17, J.F. Rick <[hidden email]> wrote: > > I understand unix quite well. Fine. > All the ./pharo does is redirect to the vm with the --nodisplay flag. So ? > When I try it without the "eval "ZnClient new get: 'https://google.com'"" part, I get the following in the terminal: > > Usage: [--no-preferences|--preference-file=<FILE>][<subcommand>] [--help] [--copyright] [--version] [--list] [ --no-quit ] > --help print this help message > --copyright print the copyrights > --version print the version for the image and the vm > --list list a description of all active command line handlers > --no-quit keep the image running without activating any other command line handler > <subcommand> a valid subcommand in --list > > Preference File Modification: > --preference-file load the preferences from the given <FILE> > --no-default-preferences do not load any preferences from the default locations > > Documentation: > A PharoCommandLineHandler handles default command line arguments and options. > The PharoCommandLineHandler is activated before all other handlers. > It first checks if another handler is available. If so it will activate the found handler. > > Then pharo exits. It seems like it is just doing the command and then dies. Yes, Pharo runs and exits because you do not tell it what to do, like any command line utility. Try --list to see all the options. > That's definitely different behaviour than a usual headless pharo. I don't understand what you are referring to. This is the way it works with the so called Zero Config system, since quite a while, maybe this can help: http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/ZeroConf.pdf (which might not be 100% up to date, I did not check, but it should help). But the point is, what I said before works perfectly, why go look further ? What is your concrete problem ? > Cheers, > > Jeff > > > > On Sun, Feb 15, 2015 at 5:39 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Sorry, Jeff, it most certainly works ;-) > > ./pharo is the headless version > ./pharo-ui is the version for running a GUI > > these are both bash scripts that use the binary inside pharo-vm > you can look at what's in them to understand what is going on > > I don't want to be rude, but either you understand command line unix or you don't. To make things easier, there are the 2 top level scripts. I have no time to explain this from first principles, sorry. > > > On 15 Feb 2015, at 23:10, J.F. Rick <[hidden email]> wrote: > > > > This somewhat works. At minimum, the command for downloading the google home page works. On the other hand, the pharo-ui line caused an error: "pharo: could not find any display driver" > > > > That's not a huge deal as this is on a remote server and I can run headless. However, when I try to do that (i.e., ./pharo-vm/pharo headless ./Pharo.image &), I get the same message about not finding a display driver. > > > > I do get both vm-display-X11 and vm-display-null showing up as available drivers. > > > > Cheers, > > > > Jeff > > > > On Sat, Feb 14, 2015 at 2:15 PM, Sven Van Caekenberghe <[hidden email]> wrote: > > Hi, > > > > It seems some people are having trouble getting Pharo to work on Ubuntu 14.04.1 LTS 64-bit. > > > > Here is one way to make things work. > > > > Pharo (the VM) is a 32-bit executable dynamically linked to a number of libraries, each of which has to be present in its 32-bit variant in order to run Pharo and/or to use all features. > > > > On a clean, stock, fully updated Ubuntu 14.04.1 LTS 64-bit, do the following (the X11, GL and asound libraries are not needed when you run headless on a server): > > > > $ sudo apt-get install curl libc6:i386 libssl1.0.0:i386 libX11.6:i386 libGL.1:i386 libasound2:i386 > > > > $ curl get.pharo.org/40+vm | bash > > > > $ ./pharo Pharo.image eval "ZnClient new get: 'https://google.com'" > > > > $ ./pharo-ui Pharo.image > > > > HTH, > > > > Sven > > > > PS: <Pro tip> You can use ldd to check if all dependencies of the VM and its plugins in the pharo-vm directory are satisfied > > > > -- > > Sven Van Caekenberghe > > Proudly supporting Pharo > > http://pharo.org > > http://association.pharo.org > > http://consortium.pharo.org > > > > > > > > > > > > -- > > Jochen "Jeff" Rick, Ph.D. > > http://www.je77.com/ > > Skype ID: jochenrick > > > > > > -- > Jochen "Jeff" Rick, Ph.D. > http://www.je77.com/ > Skype ID: jochenrick |
Thanks for the pointer to the ZeroConf. This is my first time using that. I'm used to the usual Ubuntu installation which provides a pharo-vm-x (GUI) and pharo-vm-nox (headless). The command line functionality is cool, but that's not what I want. By playing around, I figured out how to get --no-quit to work. I was trying ./pharo --headless --no-quit ./Pharo.image & and I needed ./pharo --headless ./Pharo.image --no-quit & I guess that makes sense knowing that --no-quit is actually to be processed by the script and not a flag for the VM. Anyway, I think I got it figured out. Thanks for the help, Jeff On Sun, Feb 15, 2015 at 9:34 PM, Sven Van Caekenberghe <[hidden email]> wrote: BTW, these are pharo-users questions ... -- |
> On 16 Feb 2015, at 05:34, J.F. Rick <[hidden email]> wrote: > > Thanks for the pointer to the ZeroConf. This is my first time using that. I'm used to the usual Ubuntu installation which provides a pharo-vm-x (GUI) and pharo-vm-nox (headless). The command line functionality is cool, but that's not what I want. By playing around, I figured out how to get --no-quit to work. I was trying > ./pharo --headless --no-quit ./Pharo.image & > and I needed > ./pharo --headless ./Pharo.image --no-quit & > I guess that makes sense knowing that --no-quit is actually to be processed by the script and not a flag for the VM. > > Anyway, I think I got it figured out. Thanks for the help, Well, after sleeping over it, I too figured that it was the --no-quit that you were looking for. Still, the --headless is not needed with the plain pharo command ;-) BTW, having your server running in an image is not what I would recommend. I would always use an .st start up script. Not that it would not work, it is just safer, clearer. > Jeff > > On Sun, Feb 15, 2015 at 9:34 PM, Sven Van Caekenberghe <[hidden email]> wrote: > BTW, these are pharo-users questions ... > > > On 16 Feb 2015, at 01:17, J.F. Rick <[hidden email]> wrote: > > > > I understand unix quite well. > > Fine. > > > All the ./pharo does is redirect to the vm with the --nodisplay flag. > > So ? > > > When I try it without the "eval "ZnClient new get: 'https://google.com'"" part, I get the following in the terminal: > > > > Usage: [--no-preferences|--preference-file=<FILE>][<subcommand>] [--help] [--copyright] [--version] [--list] [ --no-quit ] > > --help print this help message > > --copyright print the copyrights > > --version print the version for the image and the vm > > --list list a description of all active command line handlers > > --no-quit keep the image running without activating any other command line handler > > <subcommand> a valid subcommand in --list > > > > Preference File Modification: > > --preference-file load the preferences from the given <FILE> > > --no-default-preferences do not load any preferences from the default locations > > > > Documentation: > > A PharoCommandLineHandler handles default command line arguments and options. > > The PharoCommandLineHandler is activated before all other handlers. > > It first checks if another handler is available. If so it will activate the found handler. > > > > Then pharo exits. It seems like it is just doing the command and then dies. > > Yes, Pharo runs and exits because you do not tell it what to do, like any command line utility. Try --list to see all the options. > > > That's definitely different behaviour than a usual headless pharo. > > I don't understand what you are referring to. This is the way it works with the so called Zero Config system, since quite a while, maybe this can help: > > http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/ZeroConf.pdf > > (which might not be 100% up to date, I did not check, but it should help). > > But the point is, what I said before works perfectly, why go look further ? > > What is your concrete problem ? > > > Cheers, > > > > Jeff > > > > > > > > On Sun, Feb 15, 2015 at 5:39 PM, Sven Van Caekenberghe <[hidden email]> wrote: > > Sorry, Jeff, it most certainly works ;-) > > > > ./pharo is the headless version > > ./pharo-ui is the version for running a GUI > > > > these are both bash scripts that use the binary inside pharo-vm > > you can look at what's in them to understand what is going on > > > > I don't want to be rude, but either you understand command line unix or you don't. To make things easier, there are the 2 top level scripts. I have no time to explain this from first principles, sorry. > > > > > On 15 Feb 2015, at 23:10, J.F. Rick <[hidden email]> wrote: > > > > > > This somewhat works. At minimum, the command for downloading the google home page works. On the other hand, the pharo-ui line caused an error: "pharo: could not find any display driver" > > > > > > That's not a huge deal as this is on a remote server and I can run headless. However, when I try to do that (i.e., ./pharo-vm/pharo headless ./Pharo.image &), I get the same message about not finding a display driver. > > > > > > I do get both vm-display-X11 and vm-display-null showing up as available drivers. > > > > > > Cheers, > > > > > > Jeff > > > > > > On Sat, Feb 14, 2015 at 2:15 PM, Sven Van Caekenberghe <[hidden email]> wrote: > > > Hi, > > > > > > It seems some people are having trouble getting Pharo to work on Ubuntu 14.04.1 LTS 64-bit. > > > > > > Here is one way to make things work. > > > > > > Pharo (the VM) is a 32-bit executable dynamically linked to a number of libraries, each of which has to be present in its 32-bit variant in order to run Pharo and/or to use all features. > > > > > > On a clean, stock, fully updated Ubuntu 14.04.1 LTS 64-bit, do the following (the X11, GL and asound libraries are not needed when you run headless on a server): > > > > > > $ sudo apt-get install curl libc6:i386 libssl1.0.0:i386 libX11.6:i386 libGL.1:i386 libasound2:i386 > > > > > > $ curl get.pharo.org/40+vm | bash > > > > > > $ ./pharo Pharo.image eval "ZnClient new get: 'https://google.com'" > > > > > > $ ./pharo-ui Pharo.image > > > > > > HTH, > > > > > > Sven > > > > > > PS: <Pro tip> You can use ldd to check if all dependencies of the VM and its plugins in the pharo-vm directory are satisfied > > > > > > -- > > > Sven Van Caekenberghe > > > Proudly supporting Pharo > > > http://pharo.org > > > http://association.pharo.org > > > http://consortium.pharo.org > > > > > > > > > > > > > > > > > > -- > > > Jochen "Jeff" Rick, Ph.D. > > > http://www.je77.com/ > > > Skype ID: jochenrick > > > > > > > > > > > > -- > > Jochen "Jeff" Rick, Ph.D. > > http://www.je77.com/ > > Skype ID: jochenrick > > > > > > -- > Jochen "Jeff" Rick, Ph.D. > http://www.je77.com/ > Skype ID: jochenrick |
Well, after sleeping over it, I too figured that it was the --no-quit that you were looking for. Still, the --headless is not needed with the plain pharo command ;-) I had actually found the --no-quit option a long time ago but never thought that it had to come after the image name. BTW, having your server running in an image is not what I would recommend. I would always use an .st start up script. Not that it would not work, it is just safer, clearer. I was planning to use the startup.st file in the image directory for that. Or does that not work with this? Cheers, Jeff -- |
|
It's probably obvious to you now but arguments up to and including the image name are processed by the VM and arguments thereafter are left for the image. Indeed. I've just always been used to practice of setting flags first when executing a unix command. Perhaps this would be worthwhile adding as a note in the documentation that spits out. Based on that feedback, I tried "./pharo --headless --no-quit ./Pharo.image" pretty quickly. It didn't occur to me then that order might make a difference as one set of tags is for the VM and the other is for the scripting ability. Now that I better understand it, it makes sense. But a note of warning there would have been helpful. It seems we've come a long way from the early days of the Squeak VM. Cheers, Jeff |
Hi Jeff,
On Mon, Feb 16, 2015 at 9:06 AM, J.F. Rick <[hidden email]> wrote:
+1. Note that the VM itself does this. Heres what the Mac VM spits out when given the -help flag: McStalker.oscogvm$ ./build.macos32x86/squeak.stack.spur/Fast.app/Contents/MacOS/Squeak -help Usage: ./build.macos32x86/squeak.stack.spur/Fast.app/Contents/MacOS/Squeak [<option>...] [<imageName> [<argument>...]] ./build.macos32x86/squeak.stack.spur/Fast.app/Contents/MacOS/Squeak [<option>...] -- [<argument>...] Common <option>s: -help print this help message, then exit -memory <size>[mk] use fixed heap size (added to image size) ...
best,
Eliot |
In reply to this post by Sven Van Caekenberghe-2
And if you want to have athens graphics, e.g. when you want to
use Roassal2, you might need to add cairo apt-get install libcairo2-dev:i386 On Ubuntu 14.10 this currently results in a broken package. I could fix that with sudo apt-get update sudo apt-get autoclean sudo apt-get clean sudo apt-get autoremove |
Free forum by Nabble | Edit this page |