[GRASSLIST:3120] Problem with monitor....

Hi users,
I have got a proble passing from grass5.0.2 to grass5.3
I execute as root:
# make distclean
# rm -rf /usr/local/grass5
# rm -f /usr/local/bin/
# ./configure --prefix=/mnt/maxtor_linux/grass_home/grass53 --with-bindir=/mnt/maxtor_linux/grass_home/ --with-postgres-includes=/usr/include/pgsql/server/ --with-motif --with-motif-includes=/usr/X11R6/LessTif/Motif1.2/include/ --with-motif-libs=/usr/X11R6/LessTif/Motif1.2/lib/ --with-blas --with-lapack --with-glw --with-dbm --with-dbm-includes=/usr/include/gdbm --with-freetype --with-freetype-includes=/usr/include/freetype2/ --without-readline --with-fftw --prefix=/usr/local/ --with-proj --with-proj-libs=/usr/local/lib --with-cxx
# make
# make install

everything works fine, but unexpected :
- my binary aren't in /mnt/maxtor_linux/grass_home/ directory but in /usr/local/grass53
- when i call d.mon start=x0 i get this error message:

    GRASS:~ > d.mon start=x0
    ERROR: In main.c: Couldn't get socket path.
    Failed to get socket name for monitor <x0>.
    Problem selecting x0. Will try once more
    Failed to get socket name for monitor <x0>.

My system is a RedHat9 strike.

First i didn't had any lilo files in my ....../grass53/dev directory, so i run the script create_fifos.sh and now they are here, but nothing change......

Does anyone have any idea on how to solve my problem?

Thanks

-------------
Ing. Massimiliano Cannata
Istituto di Scienze della Terra - SUPSI
C.P. 72 - CH-6952 Canobbio (Ticino, Switzerland)
Tel +41 91 /935 12 25 - Fax +41 91 /935 12 09
eMail: massimiliano.cannata@supsi.ch
Internet: http://www.ist.supsi.ch

Massimiliano Cannata wrote:

Hi users,
I have got a proble passing from grass5.0.2 to grass5.3
I execute as root:

# ./configure --prefix=/mnt/maxtor_linux/grass_home/grass53

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

--with-fftw --prefix=/usr/local/ --with-proj

              ^^^^^^^^^^^^^^^^^^^^

The second --with-prefix=... switch overrides the first.

everything works fine, but unexpected :
- my binary aren't in /mnt/maxtor_linux/grass_home/ directory but in
/usr/local/grass53

That's because of the --prefix=/usr/local/ switch.

- when i call d.mon start=x0 i get this error message:

    GRASS:~ > d.mon start=x0
    ERROR: In main.c: Couldn't get socket path.

Possible reasons for this error are:

1. It couldn't figure out your username (does the "whoami" program
give the correct information)?

2. It couldn't create the /tmp/grass-<username> directory.

3. The /tmp/grass-<username> directory already exists, but you don't
own it.

4. /tmp/grass-<username> already exists, but it isn't a directory.

    Failed to get socket name for monitor <x0>.
    Problem selecting x0. Will try once more
    Failed to get socket name for monitor <x0>.

These are a direct consequence of the driver failing to start due to
the above error.

My system is a RedHat9 strike.

First i didn't had any lilo files in my ....../grass53/dev directory, so
i run the script create_fifos.sh and now they are here, but nothing
change......

The dev directory and create_fifos.sh are only relevant if you used
the --enable-fifo switch (which only exists for compatibility reasons,
and shouldn't be used).

--
Glynn Clements <glynn.clements@virgin.net>

Ok thanks for the help, now i've compiled all the grass code on my external drive and got no error.
Now i can run grass with:
#> /mnt/maxtor_linux/grass_home/grass53/bin/grass53
but still remain some problem.....

- Monitor problem:
I can run a monitor only if i am ROOT, otherwise i get the same old error: ERROR: In main.c: Couldn't get socket path.

whoami gives the rigth answer;
/tmp/grass-<username> is a directory, exist and i'm the owner;

what am i missing? maybe mounting my external drive (where i put my bin)?
i use in fstab: /dev/sda5 /mnt/maxtor_linux ext2 defaults 1 2

- Library problem:
I cannot see libproj.so.0 because my LD_LIBRARY_PATH doesn't contain the path /usr/local/lib.
if i run:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
everything goes fine.....

but it should be already contemplate in some grass variable, in fact i run:

CFLAGS="-O3 -march=pentium4 -Wall" LDFLAGS="-s" ./configure --prefix=/mnt/maxtor_linux/grass_home/grass53 --with-bindir=/mnt/maxtor_linux/grass_home/ --with-postgres-includes=/usr/include/pgsql/server/ --with-motif --with-motif-includes=/usr/X11R6/LessTif/Motif1.2/include/ --with-motif-libs=/usr/X11R6/LessTif/Motif1.2/lib/ --with-blas --with-lapack --with-glw --with-dbm --with-dbm-includes=/usr/include/gdbm --with-freetype --with-freetype-includes=/usr/include/freetype2/ --without-readline --with-fftw --with-proj --with-proj-libs=/usr/local/lib --with-cxx

Any helps to give me?
Thanks, and sorry for my limited linux knowledge

Glynn Clements wrote:

- when i call d.mon start=x0 i get this error message:

   GRASS:~ > d.mon start=x0
   ERROR: In main.c: Couldn't get socket path.
   
Possible reasons for this error are:

1. It couldn't figure out your username (does the "whoami" program
give the correct information)?

2. It couldn't create the /tmp/grass-<username> directory.

3. The /tmp/grass-<username> directory already exists, but you don't
own it.

4. /tmp/grass-<username> already exists, but it isn't a directory.

   Failed to get socket name for monitor <x0>.
   Problem selecting x0. Will try once more
   Failed to get socket name for monitor <x0>.
   
These are a direct consequence of the driver failing to start due to
the above error.

-------------
Ing. Massimiliano Cannata
Istituto di Scienze della Terra - SUPSI
C.P. 72 - CH-6952 Canobbio (Ticino, Switzerland)
Tel +41 91 /935 12 25 - Fax +41 91 /935 12 09
eMail: massimiliano.cannata@supsi.ch
Internet: http://www.ist.supsi.ch

Massimiliano Cannata wrote:

Ok thanks for the help, now i've compiled all the grass code on my
external drive and got no error.
Now i can run grass with:
#> /mnt/maxtor_linux/grass_home/grass53/bin/grass53
but still remain some problem.....

- Monitor problem:
I can run a monitor only if i am ROOT, otherwise i get the same old
error: ERROR: In main.c: Couldn't get socket path.

whoami gives the rigth answer;

If you delete/rename the ~/.grassrc5 file, then start GRASS (in text
mode), does your username appear in the "mapset" field of the startup
screen?

/tmp/grass-<username> is a directory, exist and i'm the owner;

what am i missing? maybe mounting my external drive (where i put my bin)?
i use in fstab: /dev/sda5 /mnt/maxtor_linux ext2 defaults 1 2

No problem there. If you have "strace" installed, you could try:

  strace $GISBASE/driver/XDRIVER x0 "" ""

The output should contain two consecutive line like:

  lstat("/tmp/grass-glynn", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
  chmod("/tmp/grass-glynn", 0700) = 0

(except with your username). Maybe one of them failed, in which case,
what is the error code (EACCES etc)?

- Library problem:
I cannot see libproj.so.0 because my LD_LIBRARY_PATH doesn't contain the
path /usr/local/lib.
if i run:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
everything goes fine.....

but it should be already contemplate in some grass variable, in fact i run:

The configure switches only control where the linker looks for
libraries when GRASS is being built. They don't affect where the
loader (ld-linux.so) looks for libraries when you run programs.

If you are installing shared libraries in /usr/local/lib, you need to
either:

a) add /usr/local/lib to /etc/ld.so.conf, and run "ldconfig" whenever
you add more libraries, or

b) add /usr/local/lib to LD_LIBRARY_PATH in the shell startup scripts
(e.g. /etc/profile).

The GRASS startup script ($GISBASE/etc/Init.sh) adds the GRASS library
directory ($GISBASE/lib) to LD_LIBRARY_PATH, which deals with any
shared libraries which are part of GRASS itself.

OTOH, it assumes that any external shared libraries which it uses are
already installed correctly. And, in this case, libproj.so.0 wasn't
installed correctly; the mere presence of the library isn't
sufficient; the OS' loader has to be able to find it (and it won't
look in /usr/local/lib unless it's told to).

--
Glynn Clements <glynn.clements@virgin.net>

Thanks for all the advise, I defenitly resolve all my problem with the monitor.
I delete and recreate the user and now everythings works.

Glynn Clements wrote:

Massimiliano Cannata wrote:

Ok thanks for the help, now i've compiled all the grass code on my external drive and got no error.
Now i can run grass with:
#> /mnt/maxtor_linux/grass_home/grass53/bin/grass53
but still remain some problem.....

- Monitor problem:
I can run a monitor only if i am ROOT, otherwise i get the same old error: ERROR: In main.c: Couldn't get socket path.

whoami gives the rigth answer;
   
If you delete/rename the ~/.grassrc5 file, then start GRASS (in text
mode), does your username appear in the "mapset" field of the startup
screen?

/tmp/grass-<username> is a directory, exist and i'm the owner;

what am i missing? maybe mounting my external drive (where i put my bin)?
i use in fstab: /dev/sda5 /mnt/maxtor_linux ext2 defaults 1 2
   
No problem there. If you have "strace" installed, you could try:

strace $GISBASE/driver/XDRIVER x0 "" ""

The output should contain two consecutive line like:

lstat("/tmp/grass-glynn", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
chmod("/tmp/grass-glynn", 0700) = 0

(except with your username). Maybe one of them failed, in which case,
what is the error code (EACCES etc)?

- Library problem:
I cannot see libproj.so.0 because my LD_LIBRARY_PATH doesn't contain the path /usr/local/lib.
if i run:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
everything goes fine.....

but it should be already contemplate in some grass variable, in fact i run:
   
The configure switches only control where the linker looks for
libraries when GRASS is being built. They don't affect where the
loader (ld-linux.so) looks for libraries when you run programs.

If you are installing shared libraries in /usr/local/lib, you need to
either:

a) add /usr/local/lib to /etc/ld.so.conf, and run "ldconfig" whenever
you add more libraries, or

b) add /usr/local/lib to LD_LIBRARY_PATH in the shell startup scripts
(e.g. /etc/profile).

The GRASS startup script ($GISBASE/etc/Init.sh) adds the GRASS library
directory ($GISBASE/lib) to LD_LIBRARY_PATH, which deals with any
shared libraries which are part of GRASS itself.

OTOH, it assumes that any external shared libraries which it uses are
already installed correctly. And, in this case, libproj.so.0 wasn't
installed correctly; the mere presence of the library isn't
sufficient; the OS' loader has to be able to find it (and it won't
look in /usr/local/lib unless it's told to).

--
-------------
note: change my e-mail reference to massimiliano.cannata@supsi.ch
      because the old one will be deleted soon.
-------------
Ing. Massimiliano Cannata
Istituto di Scienze della Terra - SUPSI
C.P. 72 - CH-6952 Canobbio (Ticino, Switzerland)
Tel +41 91 /935 12 25 - Fax +41 91 /935 12 09
eMail: massimiliano.cannata@supsi.ch
Internet: http://www.ist.supsi.ch