[GRASS-user] g.extension and GRASS 6.4.1

Hello everybody,
today I tried to use g.extension on GRASS 6.4.1 from OpenSuse 11.4 without
any success, because it complains about missing grass/gis.h.
The dev packages are installed and the needed file is inside
/opt/grass/include/grass/gis.h so I don't understand the problem.
Is there any way to use extension without building GRASS?

Thank you very much

Ciao
Luca

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-and-GRASS-6-4-1-tp6348794p6348794.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi Luca,

On Tue, May 10, 2011 at 7:33 PM, Luca Casagrande
<luca.casagrande@gmail.com> wrote:

Hello everybody,
today I tried to use g.extension on GRASS 6.4.1 from OpenSuse 11.4 without
any success, because it complains about missing grass/gis.h.
The dev packages are installed and the needed file is inside
/opt/grass/include/grass/gis.h so I don't understand the problem.
Is there any way to use extension without building GRASS?

it has probably been fixed 28 hs ago:
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/scripts/g.extension

can you please try that version and report?

thanks
Markus

Thank you very much

Ciao
Luca

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-and-GRASS-6-4-1-tp6348794p6348794.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Thanks Markus for your answer!
After updating g.extension, the error message is this:

GRASS 6.4.1 (concessioni):~ > g.extension extension=r.stream.basins
svnurl=https://svn.osgeo.org/grass/grass-addons
Fetching <r.stream.basins> from GRASS-Addons SVN (be patient)...
A r.stream.basins/main.c
A r.stream.basins/description.html
A r.stream.basins/global.h
A r.stream.basins/catchment.c
A r.stream.basins/io.c
A r.stream.basins/Makefile
Estratta revisione 46230.
Compiling <r.stream.basins>...
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/include/grass
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/bin
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/etc
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/driver
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/driver/db
mkdir -p
/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/fonts
make OBJ.x86_64-unknown-linux-gnu
make[1]: Entering directory
`/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/r.stream.basins'
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p
OBJ.x86_64-unknown-linux-gnu
make[1]: Leaving directory
`/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/r.stream.basins'
gcc -I/opt/grass/include -I/opt/grass/include
-I/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/include
-O2 -I/usr/include/gdal -I/usr/include -DPACKAGE=\""grassmods"\"
-I/opt/grass/include -I/opt/grass/include
-I/home/luca/Dropbox/gis/dati/grass/concessioni/PERMANENT/.tmp/linux-547q.site/11122.0/dist/include
-o OBJ.x86_64-unknown-linux-gnu/io.o -c io.c
In file included from /opt/grass/include/grass/vect/digit.h:3:0,
                 from /opt/grass/include/grass/Vect.h:4,
                 from global.h:6,
                 from io.c:1:
/opt/grass/include/grass/vect/dig_structs.h:22:21: fatal error: ogr_api.h:
No such file or directory
compilation terminated.
make: *** [OBJ.x86_64-unknown-linux-gnu/io.o] Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

Is it still related to GRASS or am I missing some packages?

Thx
Luca

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-and-GRASS-6-4-1-tp6348794p6349403.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On 10/05/11 22:26, Luca Casagrande wrote:

/opt/grass/include/grass/vect/dig_structs.h:22:21: fatal error: ogr_api.h:
No such file or directory
compilation terminated.
make: *** [OBJ.x86_64-unknown-linux-gnu/io.o] Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

Is it still related to GRASS or am I missing some packages?

ogr_api.h is a header file from gdal, so you need to install the gdal headers (libgdal1-dev in Debian).

Moritz

Moritz Lennert wrote:

On 10/05/11 22:26, Luca Casagrande wrote:

/opt/grass/include/grass/vect/dig_structs.h:22:21: fatal error:
ogr_api.h:
No such file or directory
compilation terminated.
make: *** [OBJ.x86_64-unknown-linux-gnu/io.o] Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

Is it still related to GRASS or am I missing some packages?

ogr_api.h is a header file from gdal, so you need to install the gdal
headers (libgdal1-dev in Debian).

Moritz

Thank you Mortiz, this was the reason of my error and now it's fixed.
Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

Thx
L.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-and-GRASS-6-4-1-tp6348794p6351068.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On May 11, 2011, at 3:45 AM, Luca Casagrande wrote:

Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

I'm the one that fixed g.extension. I'm waiting on comments whether there might be any problems installing this (security, side effects,...).

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

On Wed, May 11, 2011 at 3:48 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 3:45 AM, Luca Casagrande wrote:

Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

I'm the one that fixed g.extension. I'm waiting on comments whether there might be any problems installing this (security, side effects,...).

There is one thing: The install script
binaryInstall.src

should update include/Make/Platform.make for the target
installation. The include/ directory is packaged in the main Makefile
but "as-is" and Platform.make therein needs to be updated in
the installation process accordingly.

Markus

On May 11, 2011, at 11:20 AM, Markus Neteler wrote:

On Wed, May 11, 2011 at 3:48 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 3:45 AM, Luca Casagrande wrote:

Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

I'm the one that fixed g.extension. I'm waiting on comments whether there might be any problems installing this (security, side effects,...).

There is one thing: The install script
binaryInstall.src

should update include/Make/Platform.make for the target
installation. The include/ directory is packaged in the main Makefile
but "as-is" and Platform.make therein needs to be updated in
the installation process accordingly.

So far I haven't touched the include/Make files as currently installed. The changes to g.extension take care of necessary changes to the makefiles on-the-fly.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe

On Wed, May 11, 2011 at 6:50 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 11:20 AM, Markus Neteler wrote:

On Wed, May 11, 2011 at 3:48 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 3:45 AM, Luca Casagrande wrote:

Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

I'm the one that fixed g.extension. I'm waiting on comments whether there might be any problems installing this (security, side effects,...).

There is one thing: The install script
binaryInstall.src

should update include/Make/Platform.make for the target
installation. The include/ directory is packaged in the main Makefile
but "as-is" and Platform.make therein needs to be updated in
the installation process accordingly.

So far I haven't touched the include/Make files as currently installed. The changes to g.extension take care of necessary changes to the makefiles on-the-fly.

Apparently r46240 or related leads to a complete failure of the compilation of
the modules. Random example:

GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2svn sh /usr/bin/install
-c -m 644/tools/g.html2man/g.html2man
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/docs/html/i.photo.target.html
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/man/man1/i.photo.target.1
1
/usr/bin/install: /usr/bin/install: cannot execute binary file

The problem is
.... /usr/bin/install -c -m 644/tools/g.html2man ....

Markus

On Thu, May 12, 2011 at 11:16 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Wed, May 11, 2011 at 6:50 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 11:20 AM, Markus Neteler wrote:

On Wed, May 11, 2011 at 3:48 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 11, 2011, at 3:45 AM, Luca Casagrande wrote:

Right now the last troubles is related to missing
/usr/src/packages/BUILD/grass-6.4.1/tools/g.html2man/g.html2man

I'm the one that fixed g.extension. I'm waiting on comments whether there might be any problems installing this (security, side effects,...).

There is one thing: The install script
binaryInstall.src

should update include/Make/Platform.make for the target
installation. The include/ directory is packaged in the main Makefile
but "as-is" and Platform.make therein needs to be updated in
the installation process accordingly.

So far I haven't touched the include/Make files as currently installed. The changes to g.extension take care of necessary changes to the makefiles on-the-fly.

Apparently r46240 or related leads to a complete failure of the compilation of
the modules. Random example:

GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2svn sh /usr/bin/install
-c -m 644/tools/g.html2man/g.html2man
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/docs/html/i.photo.target.html
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/man/man1/i.photo.target.1
1
/usr/bin/install: /usr/bin/install: cannot execute binary file

The problem is
.... /usr/bin/install -c -m 644/tools/g.html2man ....

Fixed in r46244.

The next issue is (compiling GRASS the first time):

GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.2svn sh
/usr/local/grass-6.4.2svn/tools/g.html2man/g.html2man
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/docs/html/r.buffer.html
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/man/man1/r.buffer.1
1
sh: /usr/local/grass-6.4.2svn/tools/g.html2man/g.html2man: No such
file or directory

which is related to
http://trac.osgeo.org/grass/changeset/46243

The only solution will be
- check if $(INSTALL_DATA)/tools/g.html2man/g.html2man is installed,
- otherwise use $(GRASS_HOME)/tools/g.html2man/g.html2man

No idea how to write that in a Makefile...

Markus

On May 12, 2011, at 7:17 AM, Markus Neteler wrote:

sh: /usr/local/grass-6.4.2svn/tools/g.html2man/g.html2man: No such
file or directory

which is related to
http://trac.osgeo.org/grass/changeset/46243

The only solution will be
- check if $(INSTALL_DATA)/tools/g.html2man/g.html2man is installed,
- otherwise use $(GRASS_HOME)/tools/g.html2man/g.html2man

No idea how to write that in a Makefile...

Oops, copied the wrong variable name. It should be MODULE_TOPDIR, just like in html.make.

Fixed in r46445/r46446.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects."

- the wisdom of Tarzan

On Thu, May 12, 2011 at 3:42 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On May 12, 2011, at 7:17 AM, Markus Neteler wrote:

sh: /usr/local/grass-6.4.2svn/tools/g.html2man/g.html2man: No such
file or directory

...

Oops, copied the wrong variable name. It should be MODULE_TOPDIR, just like in html.make.

Fixed in r46445/r46446.

Thanks, much better now :slight_smile: GRASS 6.4 compiled successfully.

Markus

On Thu, May 12, 2011 at 4:17 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Thu, May 12, 2011 at 3:42 PM, William Kyngesburye

...

Thanks, much better now :slight_smile: GRASS 6.4 compiled successfully.

Now we have tested g.extension, too. The situation:

- Linux binary snapshot taken from web site (I forced created some minutes ago)
    http://grass.osgeo.org/grass64/binary/linux/snapshot/
- installed into user's home into the $HOME/grass64/ directory
- g.extension failed upon wrong parameters in Platform.make

I updated manually Platform.make (differences attached): all fine,
g.extension works.
The missing issue is to update the script
binaryInstall.src
which generates grass-6.4.2svn-x86_64-unknown-linux-gnu-12_05_2011-install.sh
in order to have a correct include/Make/Platform.make after installed.

Markus

(attachments)

Platform.make.diff (1.11 KB)

On Thu, May 12, 2011 at 5:55 PM, Markus Neteler <neteler@osgeo.org> wrote:
...

- g.extension failed upon wrong parameters in Platform.make

I updated manually Platform.make (differences attached): all fine,
g.extension works.
The missing issue is to update the script
binaryInstall.src
which generates grass-6.4.2svn-x86_64-unknown-linux-gnu-12_05_2011-install.sh
in order to have a correct include/Make/Platform.make after installed.

I have implemented a solution for this, please retry from SVN.

Markus