[GRASS-dev] GRASS7: libgrass_vector.so has odd libraster dependency: libgrass_raster.7.0.svn.so not found

Hi,

on a system-wide installation (make install done) we get this bug:

# user not being me:
v.in.ascii: error while loading shared libraries:
/home/neteler/software/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so:
cannot open shared object file: Permission denied

The problem seems to be here:

libgrass_vector.so:
        linux-vdso.so.1 => (0x00007fff239af000)
        libgrass_dbmiclient.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_dbmiclient.7.0.svn.so
(0x00007f6894480000)
        libgrass_dbmibase.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_dbmibase.7.0.svn.so
(0x00007f689426f000)
        libgrass_dgl.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_dgl.7.0.svn.so
(0x00007f6894058000)
        libgrass_dig2.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_dig2.7.0.svn.so
(0x00007f6893e41000)
        libgrass_linkm.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_linkm.7.0.svn.so
(0x00007f6893c3f000)
        libgrass_rtree.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_rtree.7.0.svn.so
(0x00007f6893a35000)
        libgrass_gis.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_gis.7.0.svn.so
(0x00007f6893803000)
        libgdal.so => /usr/local/lib/libgdal.so (0x00007f6892cdb000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6892a3d000)
        libgrass_btree2.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_btree2.7.0.svn.so
(0x00007f689283b000)
        libgrass_gproj.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_gproj.7.0.svn.so
(0x00007f6892632000)
        /home/neteler/software/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so
(0x00007f689240b000) <<---- OUCH
        libc.so.6 => /lib64/libc.so.6 (0x00007f689206a000)
        libgrass_datetime.7.0.svn.so =>
/usr/local/grass-7.0.svn/lib/libgrass_datetime.7.0.svn.so
(0x00007f6891e61000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f6891c4b000)
        libgeos_c.so.1 => /usr/local/lib64/libgeos_c.so.1 (0x00007f6891a3d000)
        libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007f68917ae000)
        ...

because of this:

grass70/lib/vector/Vlib > grep Rast_ *
color_read.c: Rast_init_colors(colors);
color_read.c: ret = Rast__read_colors(buf, "", mapset, colors);
color_read.c: ret = Rast__read_colors(buf, "", G_mapset(), colors);
color_write.c: Rast_init_colors() to initialize the structure and
color_write.c: Rast_add_c_color_rule() to set the category colors.
These routines
color_write.c: color tables, such as Rast_read_colors() or
Rast_make_ramp_colors().
color_write.c: Rast__write_colors(fd, colors);

I don't like this dependency too much but in essence the upper
mentioned off library linking
is the real problem (which I don't know how to solve).

Markus

Markus Neteler wrote:

on a system-wide installation (make install done) we get this bug:

# user not being me:
v.in.ascii: error while loading shared libraries:
/home/neteler/software/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so:
cannot open shared object file: Permission denied

I don't like this dependency too much but in essence the upper
mentioned off library linking
is the real problem (which I don't know how to solve).

This is due to r47525. It should have been $(RASTERLIB), not
$(RASTERDEP).

The *LIB variables contain the linker switch for that library (e.g.
-lgrass_raster.7.0.svn). If using static libraries, it will also
contain the linker switches for any dependencies (shared libraries
have embedded dependency lists).

The *DEP variables contain the full pathname of the library; they're
intended to be used for setting DEPENDENCIES in the Makfile of a
module which uses the library.

--
Glynn Clements <glynn@gclements.plus.com>

On Thu, Mar 15, 2012 at 4:16 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

on a system-wide installation (make install done) we get this bug:

# user not being me:
v.in.ascii: error while loading shared libraries:
/home/neteler/software/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so:
cannot open shared object file: Permission denied

I don't like this dependency too much but in essence the upper
mentioned off library linking
is the real problem (which I don't know how to solve).

This is due to r47525. It should have been $(RASTERLIB), not
$(RASTERDEP).

Thanks for tracing this down.

The *LIB variables contain the linker switch for that library (e.g.
-lgrass_raster.7.0.svn). If using static libraries, it will also
contain the linker switches for any dependencies (shared libraries
have embedded dependency lists).

The *DEP variables contain the full pathname of the library; they're
intended to be used for setting DEPENDENCIES in the Makfile of a
module which uses the library.

Hopefully fixed in r51085.

Markus