[Pharo-project] Silly question: how to start up pharo on a given image?

Schwab,Wilhelm K bschwab at anest.ufl.edu
Mon Mar 26 20:36:02 EDT 2012


Stefano,

Don't worry about the noise  - I'm glad you solved your problem.  The following are some things that might help you or others in the future.

To run latest versions off of Jenkins on Ubuntu, I just dump the image, changes, and Cog.zip contents into one directory and then have a one-line shell script, something like this:

/home/bills/Pharo-1.4/CogVM     /home/bills/Pharo-1.4/Seaside.image
------------- vm ----------------------     --------------------- image --------------------

On Ubuntu at least, Cog looks for .so love in all the wrong places.  The "best" solution I have found (it's ugly) is to create sim links (in the common folder, to wherever the library might be) to each library I want Cog to be able to see.  I have a plain text file called links.txt to help me.  The first few lines are

ln -s /usr/lib/libplplotd.so.9 ./libplplotd.so.9
ln -s /usr/lib/libAccesIO-USB.so ./libAccesIO-USB.so
ln -s /lib/libc.so.6 ./libc.so.6

Faced with a new machine, I can simply issue these commands in a terminal to make the libraries visible.  AFAIK, what Cog should be doing (at least as a first attempt to find a library) is to look for the library as named in #moduleName.  Ubuntu ties its dynamic loading of libraries to ldconfig's "database," which anyone can read and only sudo can modify.  It is s a clever approach to the problem.

For example, on my machine, running

      ldconfig -p | grep libplplotd.so.9

returns

	libplplotd.so.9 (libc6) => /usr/lib/libplplotd.so.9

Asking to load libplplotd.so.9 will cause the system to load /usr/lib/libplplotd.so.9.  That is simply reading the map, which does not require root access.  If you want to add a library, you would either use ldconf.d or simply place the library in usr/lib and then run (as sudo) ldconfig, which scans the default locations and ldconfig.d scripts to rebuild the database.

Right or wrong, this approach seems to work for me.

Bill

________________________________________
From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] on behalf of stefano franchi [stefano.franchi at gmail.com]
Sent: Monday, March 26, 2012 6:35 PM
To: pharo-project at lists.gforge.inria.fr
Subject: Re: [Pharo-project] Silly question: how to start up pharo on a given image?

Ok, it was silly. Looking at the pharo.sh script made it clear.

Sorry for the noise.

Cheers,

Stefano

On Mon, Mar 26, 2012 at 5:13 PM, stefano franchi
<stefano.franchi at gmail.com> wrote:
> Dear all,
>
> this may be a silly question, but I can't find the answer in the pharo
> book or on the list:
>
> how do you start pharo on a specific image? in Visualworks, you'd do
>
> $vw imagename
>
> and from then on, the image and change file would be saved in
> imagename's directory.
>
> But in pharo, it seems the imagename I give on the command line is
> ignored, and I always start with the default image (which, on my
> archlinux system, is located at /usr/share/pharo).
> Since that directory is not writable by default and it contains the
> change file, I get all sort of errors.
> Perhaps it is an installation issue?
>
> Cheers,
>
> Stefano
>
>
> --
> __________________________________________________
> Stefano Franchi
> Associate Research Professor
> Department of Hispanic Studies            Ph:   +1 (979) 845-2125
> Texas A&M University                          Fax:  +1 (979) 845-6421
> College Station, Texas, USA
>
> stefano at tamu.edu
> http://stefano.cleinias.org



--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A&M University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stefano at tamu.edu
http://stefano.cleinias.org





More information about the Pharo-dev mailing list