[GRASS-user] libgrass_gmath

Colleagues,

    I'm trying to do a simple dissolve on a vector map and getting a library error

v.dissolve inp=vmap out=dom_mid_60 column=dom_mid_60
      . . .
v.extract: error while loading shared libraries: libgrass_gmath.6.4.2.so: cannot open shared object file: No such file or directory

However

ls -l /usr/local/grass-6.4.2/lib

shows

-rwxr-xr-x. 1 root root 77615 Dec 21 2012 libgrass_gmath.6.4.2.so
lrwxrwxrwx. 1 root root 23 Dec 21 2012 libgrass_gmath.so ->
libgrass_gmath.6.4.2.so

just as I would expect, with read and execute permissions.

Oddly, I'm running GRASS 6.4.3, but all the libraries are 6.4.2. This is on Scientific Linux 6 (derived from RedHat Enterprise linux 6).

Thanks in advance for any help or suggestions, Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts office 406-994-4548
Professor and Head FAX 406-994-3190
Department of Ecology email droberts@montana.edu
Montana State University
Bozeman, MT 59717-3460

Dave wrote:

I'm trying to do a simple dissolve on a vector map and getting a

library error

v.dissolve inp=vmap out=dom_mid_60 column=dom_mid_60
. . .
. . .
v.extract: error while loading shared libraries:
libgrass_gmath.6.4.2.so: cannot open shared object file: No such file or
directory

However

ls -l /usr/local/grass-6.4.2/lib

shows

-rwxr-xr-x. 1 root root 77615 Dec 21 2012 libgrass_gmath.6.4.2.so
lrwxrwxrwx. 1 root root 23 Dec 21 2012 libgrass_gmath.so ->
libgrass_gmath.6.4.2.so

just as I would expect, with read and execute permissions.

Oddly, I'm running GRASS 6.4.3, but all the libraries are 6.4.2. This
is on Scientific Linux 6 (derived from RedHat Enterprise linux 6).

Hi,

try:

GRASS> g.version -r

:slight_smile:

GRASS> echo $GISBASE
GRASS> echo $GRASS_LD_LIBRARY_PATH
GRASS> ls $GISBASE/lib
GRASS> echo $LD_LIBRARY_PATH

that should show you where the grass install is located.

It's usually fine to have many versions of GRASS installed
at the same time, they can all run self-contained.

--> you might check if the 6.4.2 install is listed in /etc/ld.so.conf
or /etc/ld.so.conf.d/*, if so change it to the location of the 6.4.3
libraries and re-run `ldconfig` (as root).

good luck,
Hamish

Hi Hamish. Thanks for the help.

g.version -r returns 6.4.3

echo $GISBASE returns /usr/local/grass-6.4.3
echo $GRASS_LD_LIBRARY_PATH returns /usr/local/grass-6.4.3/lib
echo $LD_LIBRARY_PATH returns /usr/local/grass-6.4.3/lib

All good so far. However,

ls $GISBASE/lib shows no libgrass_gmath

I compiled 6.4.3 from source (can't remember specifically why). I run 6.4.2 on my machine at work and it's fine. It's odd that the error message specifically complains about 6.4.2 even when everything points to 6.4.3.

The v.dissolve script seems to run fine until it calls v.extract. I've had a quick look at the source code, but I'm not so good at C. I ran make in the lib directory with only a couple of warnings and I don't see anything really problematic.

Worst case scenario is I could go back to 6.4.2. 7.0 doesn't come close to compiling on this machine at present.

Thanks, Dave

On 02/17/2014 12:33 PM, Hamish wrote:

Dave wrote:

     I'm trying to do a simple dissolve on a vector map and getting a
library error

v.dissolve inp=vmap out=dom_mid_60 column=dom_mid_60
        . . .
v.extract: error while loading shared libraries:
libgrass_gmath.6.4.2.so: cannot open shared object file: No such file or
directory

However

ls -l /usr/local/grass-6.4.2/lib

shows

-rwxr-xr-x. 1 root root 77615 Dec 21 2012 libgrass_gmath.6.4.2.so
lrwxrwxrwx. 1 root root 23 Dec 21 2012 libgrass_gmath.so ->
libgrass_gmath.6.4.2.so

just as I would expect, with read and execute permissions.

Oddly, I'm running GRASS 6.4.3, but all the libraries are 6.4.2. This
is on Scientific Linux 6 (derived from RedHat Enterprise linux 6).

Hi,

try:

GRASS> g.version -r

:slight_smile:

GRASS> echo $GISBASE
GRASS> echo $GRASS_LD_LIBRARY_PATH
GRASS> ls $GISBASE/lib
GRASS> echo $LD_LIBRARY_PATH

that should show you where the grass install is located.

It's usually fine to have many versions of GRASS installed
at the same time, they can all run self-contained.

--> you might check if the 6.4.2 install is listed in /etc/ld.so.conf
or /etc/ld.so.conf.d/*, if so change it to the location of the 6.4.3
libraries and re-run `ldconfig` (as root).

good luck,
Hamish

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts office 406-994-4548
Professor and Head FAX 406-994-3190
Department of Ecology email droberts@montana.edu
Montana State University
Bozeman, MT 59717-3460

On Tue, Feb 18, 2014 at 2:50 PM, Dave Roberts
<dvrbts@ecology.msu.montana.edu> wrote:
...

7.0 doesn't come close to compiling on this machine at present.

If you want assistance here, let me know (perhaps after having checked
grasswiki.osgeo.org/wiki/Compile_and_Install ).

Markus

Markus,

    Despite (or perhaps because of) downloading and installing new wxPython, gdal, fftw, and others I have forgotten, compiling grass7_trunk generated numerous errors. libgrass_gmath.7.0.svn.so compiled successfully, but then whether I set --with-fftw or --without=fftw libgrass_gnath generated numerous errors related to missing references in fftw. E.g. in r.gwflow

/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_execute'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_plan_dft_2d'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_destroy_plan'

   I noticed that the routines generating the errors are routines I don't call, so despite the errors I tried make install and it worked!
However, I still have the problem that v.dissolve doesn't work.

Oh well, at least I can get back to work, Dave

On 02/19/2014 04:05 PM, Markus Neteler wrote:

Thanks for the good words, Dave - no need for that!

Quick notes inline, it is already tomorrow here:

On Wed, Feb 19, 2014 at 11:52 PM, Dave Roberts
<dvrbts@ecology.msu.montana.edu> wrote:

Hi Markus,

   You're a saint. I'm at work right now, so I'll have to run the suggested
commands below when I get home. I did cd into gmath, but I don't remember
the error, so I'll re-run.

sure - tomorrow I'll be travelling, so I may take some time to answer.

    In the meantime, I built grass70-svn on my Arch box from the AUR
repository. It had an unresolved dependency on liblas, which I thought was
perhaps a typo for libblas. Nonetheless I deleted the reference to liblas
in the Makefile and it built successfully (at least as far as I can tell).

Please always post these errors so that we get the sorted out...

    I prefer to run from the CLI, but I did think that d.mon x0 was a pretty
primitive beast. Now with d.mon wx0 I have reversible zoom and pan, and
that's sweet!

Great, I am likewise happy about that for myself.

    Apparently some of my 6.4.2 vectors are in topology 5.0 and need rebuilt,
so It looks like I shouldn't mix 6.4.2 and 7.0 on the same location.

Well, you can do (or simply keep it separated by mapset - a same
location is fine.

Nonetheless we have the easy thing to automate it all:
http://grasswiki.osgeo.org/wiki/Convert_all_GRASS_6_vector_maps_to_GRASS_7

You're a scholar and a gentleman, Dave

You are most welcome.

Markus

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts office 406-994-4548
Professor and Head FAX 406-994-3190
Department of Ecology email droberts@montana.edu
Montana State University
Bozeman, MT 59717-3460

Dave,

On Sun, Feb 23, 2014 at 11:58 PM, Dave Roberts
<dvrbts@ecology.msu.montana.edu> wrote:

Markus,

   Despite (or perhaps because of) downloading and installing new wxPython,
gdal, fftw, and others I have forgotten, compiling grass7_trunk generated
numerous errors. libgrass_gmath.7.0.svn.so compiled successfully, but then
whether I set --with-fftw or --without=fftw libgrass_gnath generated
numerous errors related to missing references in fftw. E.g. in r.gwflow

/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_execute'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_plan_dft_2d'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_destroy_plan'

Do you have both fftw and fftw-devel installed?

  I noticed that the routines generating the errors are routines I don't
call, so despite the errors I tried make install and it worked!
However, I still have the problem that v.dissolve doesn't work.

This will be a cascaded dependency issue: once
libgrass_gmath.7.0.svn.so is right, also v.dissolve will start to
work.

Markus

Hi Markus,

    Installing fftw-devel is what got libgrass_gmath to compile without errors, but it didn't help downstream. I'm sure you're right about the cascade; I feel close, but can't quite get there yet.

Dave

On 02/23/2014 04:06 PM, Markus Neteler wrote:

Dave,

On Sun, Feb 23, 2014 at 11:58 PM, Dave Roberts
<dvrbts@ecology.msu.montana.edu> wrote:

Markus,

    Despite (or perhaps because of) downloading and installing new wxPython,
gdal, fftw, and others I have forgotten, compiling grass7_trunk generated
numerous errors. libgrass_gmath.7.0.svn.so compiled successfully, but then
whether I set --with-fftw or --without=fftw libgrass_gnath generated
numerous errors related to missing references in fftw. E.g. in r.gwflow

/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_execute'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_plan_dft_2d'
/libgrass_gmath.7.0.svn.so: undefined reference to `fftw_destroy_plan'

Do you have both fftw and fftw-devel installed?

   I noticed that the routines generating the errors are routines I don't
call, so despite the errors I tried make install and it worked!
However, I still have the problem that v.dissolve doesn't work.

This will be a cascaded dependency issue: once
libgrass_gmath.7.0.svn.so is right, also v.dissolve will start to
work.

Markus

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts office 406-994-4548
Professor and Head FAX 406-994-3190
Department of Ecology email droberts@montana.edu
Montana State University
Bozeman, MT 59717-3460

hi Dave,

On Mon, Feb 24, 2014 at 1:33 AM, Dave Roberts
<dvrbts@ecology.msu.montana.edu> wrote:

Hi Markus,

   Installing fftw-devel is what got libgrass_gmath to compile without
errors, but it didn't help downstream. I'm sure you're right about the
cascade; I feel close, but can't quite get there yet.

I would suggest to recompile from scratch:

make distclean
sh configure .... <<- your parameters
make ...

Then check for any remaining issues (if any).

Markus