[GRASS-dev] [GRASS GIS] #2598: g.extension compilation fails

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Running GRASS 7.0.1svn(64bit)-2015-02-21, Python 2.7.0, wxPython 2.8.12.0,
Linux-2.6.35.14-106.fc14.x86_64-x86_64-with-fedora-14

running g.extension (from gui or from command line) gives:

--snip--
g.extension extension=r.damflood svnurl=http://svn.osgeo.org/grass/grass-
addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
--snip--

where g.extension appears to be wanting to write temporary files while
compiling (and installing?) to a directory with root privileges, instead
of at $HOME/.grass7/addons which based on manual pages should be the
default local directory if "s" flag is not set.

I have had same problem with various GRASS-6 versions (where I simply
stopped trying to install addons), except for
GRASS-6.4.4svn-x86_64-02-11-2013, where g.extension works but with
messages like:

--snip--
/usr/local/grass6.4.4svn-x86_64-unknown-linux-gnu-
02_11_2013/include/Make/Grass.make:423: warning: overriding
recipe for target `/home/rick/data/grassdata/ns-nad83-utm-
25m-
10m/PERMANENT/.tmp/localhost.localdomain/7565.0/r.flip/bin'
--snip--

as an apparent work-around, which allowed addons to be installed into
$HOME/.grass6/addons directory.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Changes (by martinl):

  * milestone: => 7.0.1

Old description:

Running GRASS 7.0.1svn(64bit)-2015-02-21, Python 2.7.0, wxPython
2.8.12.0, Linux-2.6.35.14-106.fc14.x86_64-x86_64-with-fedora-14

running g.extension (from gui or from command line) gives:

--snip--
g.extension extension=r.damflood svnurl=http://svn.osgeo.org/grass/grass-
addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
--snip--

where g.extension appears to be wanting to write temporary files while
compiling (and installing?) to a directory with root privileges, instead
of at $HOME/.grass7/addons which based on manual pages should be the
default local directory if "s" flag is not set.

I have had same problem with various GRASS-6 versions (where I simply
stopped trying to install addons), except for
GRASS-6.4.4svn-x86_64-02-11-2013, where g.extension works but with
messages like:

--snip--
/usr/local/grass6.4.4svn-x86_64-unknown-linux-gnu-
02_11_2013/include/Make/Grass.make:423: warning: overriding
recipe for target `/home/rick/data/grassdata/ns-nad83-utm-
25m-
10m/PERMANENT/.tmp/localhost.localdomain/7565.0/r.flip/bin'
--snip--

as an apparent work-around, which allowed addons to be installed into
$HOME/.grass6/addons directory.

New description:

Running GRASS 7.0.1svn(64bit)-2015-02-21, Python 2.7.0, wxPython 2.8.12.0,
Linux-2.6.35.14-106.fc14.x86_64-x86_64-with-fedora-14

running g.extension (from gui or from command line) gives:

{{{
--snip--
g.extension extension=r.damflood svnurl=http://svn.osgeo.org/grass/grass-
addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
--snip--
}}}

where g.extension appears to be wanting to write temporary files while
compiling (and installing?) to a directory with root privileges, instead
of at $HOME/.grass7/addons which based on manual pages should be the
default local directory if "s" flag is not set.

I have had same problem with various GRASS-6 versions (where I simply
stopped trying to install addons), except for
GRASS-6.4.4svn-x86_64-02-11-2013, where g.extension works but with
messages like:

{{{
--snip--
/usr/local/grass6.4.4svn-x86_64-unknown-linux-gnu-
02_11_2013/include/Make/Grass.make:423: warning: overriding
recipe for target `/home/rick/data/grassdata/ns-nad83-utm-
25m-
10m/PERMANENT/.tmp/localhost.localdomain/7565.0/r.flip/bin'
--snip--
}}}

as an apparent work-around, which allowed addons to be installed into
$HOME/.grass6/addons directory.

--

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by martinl):

Replying to [ticket:2598 ewcgrass]:

> where g.extension appears to be wanting to write temporary files while
compiling (and installing?) to a directory with root privileges, instead
of at $HOME/.grass7/addons which based on manual pages should be the
default local directory if "s" flag is not set.

To clarify: compilation is always done in tmp dir. If -s flag is given
than the modules is installed to $GISBASE, otherwise to
$HOME.grass7/addons.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by martinl):

Replying to [ticket:2598 ewcgrass]:
{{{
> --snip--
> g.extension extension=r.damflood svnurl=http://svn.osgeo.org/grass
/grass-addons/grass7
}}}

strange please try to run this module with `--v` flag. I cannot reproduce
this error.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by ewcgrass):

Here is the output with the --verbose flag

{{{
g.extension --verbose extension=r.damflood
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
A r.damflood/SWE.c
A r.damflood/SWE.h
A r.damflood/main.c
A r.damflood/r.damflood.html
A r.damflood/dam_failure.png
A r.damflood/Makefile
Checked out revision 64750.
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
mkdir -p /usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu
(Wed Feb 25 18:07:45 2015) Command finished (2 sec)
}}}

Again, g.extension wants to create temporary directories in
/usr/local/grass.... where it does not have permission to do so.

I ran g.extension repeatedly, each time manually creating (as root user)
the directories that are wanting to be created and causing permission
errors (i.e. /bin.x86_64-unknown-linux-gnu, /dist.x86_64-unknown-linux-
gnu, and within this latter one, /driver/db, /fonts, /include/grass,
/lib). As I was approaching of this, these were the messages being
received:

{{{
g.extension --verbose extension=r.damflood
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
A r.damflood/SWE.c
A r.damflood/SWE.h
A r.damflood/main.c
A r.damflood/r.damflood.html
A r.damflood/dam_failure.png
A r.damflood/Makefile
Checked out revision 64750.
mkdir -p /tmp/tmpmAdoGF/r.damflood/bin
mkdir -p /tmp/tmpmAdoGF/r.damflood/etc
mkdir -p /usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/docs
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu/docs': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/docs] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Feb 25 18:43:56 2015) Command finished (2 sec)
}}}

and

{{{
g.extension --verbose extension=r.damflood
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
A r.damflood/SWE.c
A r.damflood/SWE.h
A r.damflood/main.c
A r.damflood/r.damflood.html
A r.damflood/dam_failure.png
A r.damflood/Makefile
Checked out revision 64750.
mkdir -p /tmp/tmpEhkPVn/r.damflood/bin
mkdir -p /tmp/tmpEhkPVn/r.damflood/etc
mkdir -p /tmp/tmpEhkPVn/r.damflood/docs/html
mkdir -p /tmp/tmpEhkPVn/r.damflood/docs/man
mkdir -p /tmp/tmpEhkPVn/r.damflood/docs/man/man1
mkdir -p /usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/tools
Compiling...
mkdir: cannot create directory `/usr/local/grass7.0.1svn-
x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-
linux-gnu/tools': Permission denied
make: *** [/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/tools] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Feb 25 18:45:34 2015) Command finished (2 sec)
}}}

So as I'm creating the requested directories within /dist.x86_64-unknown-
linux-gnu, it's appearing as if g.extension is able to create the
directories and files it needs in /tmp.

Finally, after creating the last of the two directories causing permission
errors (i.e. /dist.x86_64-unknown-linux-gnu/docs and /dist.x86_64-unknown-
linux-gnu/tools), this is what I get as output:

{{{
g.extension --verbose extension=r.damflood
svnurl=http://svn.osgeo.org/grass/grass-addons/grass7
Fetching <r.damflood> from GRASS-Addons SVN repository (be patient)...
A r.damflood/SWE.c
A r.damflood/SWE.h
A r.damflood/main.c
Compiling...
A r.damflood/r.damflood.html
A r.damflood/dam_failure.png
A r.damflood/Makefile
Checked out revision 64750.
mkdir -p /tmp/tmpwy0eZb/r.damflood/bin
mkdir -p /tmp/tmpwy0eZb/r.damflood/etc
mkdir -p /tmp/tmpwy0eZb/r.damflood/docs/html
mkdir -p /tmp/tmpwy0eZb/r.damflood/docs/man
mkdir -p /tmp/tmpwy0eZb/r.damflood/docs/man/man1
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-
gnu
gcc -g -Wall -Werror-implicit-function-declaration -fno-common
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-DPACKAGE=\""grassmods"\" -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -DRELDIR=\"/tmp/tmpwy0eZb/r.damflood\" -o
OBJ.x86_64-unknown-linux-gnu/SWE.o -c SWE.c
SWE.c: In function ‘shallow_water’:
SWE.c:526:5: warning: "/*" within comment
SWE.c:527:5: warning: "/*" within comment
SWE.c:53:25: warning: unused variable ‘volume’
SWE.c:46:68: warning: unused variable ‘Gsx’
SWE.c:46:63: warning: unused variable ‘Gdx’
SWE.c:46:38: warning: unused variable ‘Fdw’
SWE.c:46:33: warning: unused variable ‘Fup’
SWE.c:263:24: warning: ‘vol_res’ may be used
uninitialized in this function
gcc -g -Wall -Werror-implicit-function-declaration -fno-common
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-DPACKAGE=\""grassmods"\" -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -DRELDIR=\"/tmp/tmpwy0eZb/r.damflood\" -o
OBJ.x86_64-unknown-linux-gnu/main.o -c main.c
main.c: In function ‘main’:
main.c:267:3: error: implicit declaration of function
‘G_add_keyword’
main.c:477:3: error: implicit declaration of function
‘G_find_raster2’
main.c:477:17: warning: cast to pointer from integer of
different size
main.c:481:17: warning: cast to pointer from integer of
different size
main.c:485:21: warning: cast to pointer from integer of
different size
main.c:489:20: warning: cast to pointer from integer of
different size
main.c:494:13: warning: cast to pointer from integer of
different size
main.c:497:13: warning: cast to pointer from integer of
different size
main.c:501:13: warning: cast to pointer from integer of
different size
main.c:505:13: warning: cast to pointer from integer of
different size
main.c:511:3: error: implicit declaration of function
‘Rast_open_old’
main.c:587:3: error: implicit declaration of function
‘Rast_allocate_f_buf’
main.c:587:15: warning: assignment makes pointer from
integer without a cast
main.c:589:3: error: implicit declaration of function
‘Rast_allocate_d_buf’
main.c:589:15: warning: assignment makes pointer from
integer without a cast
main.c:591:19: warning: assignment makes pointer from
integer without a cast
main.c:593:18: warning: assignment makes pointer from
integer without a cast
main.c:595:11: warning: assignment makes pointer from
integer without a cast
main.c:596:11: warning: assignment makes pointer from
integer without a cast
main.c:598:11: warning: assignment makes pointer from
integer without a cast
main.c:600:11: warning: assignment makes pointer from
integer without a cast
main.c:603:3: error: implicit declaration of function
‘Rast_window_rows’
main.c:604:3: error: implicit declaration of function
‘Rast_window_cols’
main.c:646:4: error: implicit declaration of function
‘Rast_get_f_row’
main.c:647:4: error: implicit declaration of function
‘Rast_get_d_row’
main.c:719:3: error: implicit declaration of function
‘Rast_close’
main.c:990:5: error: implicit declaration of function
‘Rast_open_new’
main.c:1006:17: warning: assignment makes pointer from
integer without a cast
main.c:1009:15: warning: assignment makes pointer from
integer without a cast
main.c:1012:21: warning: assignment makes pointer from
integer without a cast
main.c:1024:8: error: implicit declaration of function
‘Rast_set_d_null_value’
main.c:1050:7: error: implicit declaration of function
‘Rast_put_d_row’
main.c:1157:12: warning: assignment makes pointer from
integer without a cast
main.c:1160:14: warning: assignment makes pointer from
integer without a cast
main.c:1163:18: warning: assignment makes pointer from
integer without a cast
main.c:1167:15: warning: assignment makes pointer from
integer without a cast
main.c:1168:17: warning: assignment makes pointer from
integer without a cast
main.c:1169:17: warning: assignment makes pointer from
integer without a cast
main.c:1172:15: warning: assignment makes pointer from
integer without a cast
main.c:1173:17: warning: assignment makes pointer from
integer without a cast
main.c:1174:17: warning: assignment makes pointer from
integer without a cast
main.c:1176:20: warning: assignment makes pointer from
integer without a cast
main.c:1181:15: warning: assignment makes pointer from
integer without a cast
main.c:1182:17: warning: assignment makes pointer from
integer without a cast
main.c:1185:20: warning: assignment makes pointer from
integer without a cast
main.c:1289:2: error: implicit declaration of function
‘Rast_put_row’
main.c:240:17: warning: unused variable ‘time’
main.c:235:8: warning: unused variable ‘tmp’
main.c:234:7: warning: unused variable ‘tmp_int’
main.c:225:10: warning: unused variable ‘i_cont’
main.c:218:18: warning: unused variable ‘v_tot’
main.c:218:10: warning: unused variable ‘temp_d’
main.c:217:7: warning: unused variable ‘temp_i’
main.c:216:7: warning: unused variable ‘pippo’
main.c:205:9: warning: unused variable ‘Q’
main.c:166:20: warning: unused variable ‘cellhd’
main.c:1439:1: warning: control reaches end of non-void
function
make: *** [OBJ.x86_64-unknown-linux-gnu/main.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Feb 25 18:49:38 2015) Command finished (3 sec)
}}}

For other modules, I get:

{{{
g.extension --verbose extension=r.basin svnurl=http://svn.osgeo.org/grass
/grass-addons/grass7
Fetching <r.basin> from GRASS-Addons SVN repository (be patient)...
A r.basin/r.basin.html
A r.basin/r.basin1.gif
A r.basin/r.basin2.gif
A r.basin/r.basin.py
A r.basin/Makefile
Checked out revision 64750.
mkdir -p /tmp/tmp5e0Kat/r.basin/bin
mkdir -p /tmp/tmp5e0Kat/r.basin/etc
mkdir -p /tmp/tmp5e0Kat/r.basin/docs/html
mkdir -p /tmp/tmp5e0Kat/r.basin/docs/man
mkdir -p /tmp/tmp5e0Kat/r.basin/docs/man/man1
Compiling...
mkdir -p /tmp/tmp5e0Kat/r.basin/scripts
/usr/bin/install -c r.basin.py /tmp/tmp5e0Kat/r.basin/scripts/r.basin
if [ "/tmp/tmp5e0Kat/r.basin/scripts/r.basin" != "" ] ; then
GISRC=/tmp/grass7-rick-29248/gisrc GISBASE=/usr/local/grass7.0.1svn-x86_64
-unknown-linux-gnu-21_02_2015 PATH="/usr/local/grass7.0.1svn-x86_64
-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/bin:/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/bin:/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/scripts:$PATH"
PYTHONPATH="/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/etc/python:/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/gui/wxpython:$PYTHONPATH"
LD_LIBRARY_PATH="/tmp/tmp5e0Kat/r.basin/bin:/usr/local/grass7.0.1svn-x86_64
-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/scripts:/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/lib:/usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/lib:/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/lib"
LC_ALL=C /tmp/tmp5e0Kat/r.basin/scripts/r.basin --html-description <
/dev/null | grep -v '</body>\|</html>' > r.basin.tmp.html ; fi
VERSION_NUMBER=7.0.1svn VERSION_DATE=2015 \
         python /usr/local/grass7.0.1svn-x86_64-unknown-linux-
gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/tools/mkhtml.py r.basin >
/tmp/tmp5e0Kat/r.basin/docs/html/r.basin.html
rm r.basin.tmp.html
python: can't open file '/usr/local/grass7.0.1svn-x86_64
-unknown-linux-gnu-21_02_2015/dist.x86_64-unknown-linux-
gnu/tools/mkhtml.py': [Errno 2] No such file or directory
make: *** [/tmp/tmp5e0Kat/r.basin/docs/html/r.basin.html]
Error 2
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Feb 25 18:53:44 2015) Command finished (2 sec)
}}}

and

{{{
g.extension --verbose extension=r.flip svnurl=http://svn.osgeo.org/grass
/grass-addons/grass7
Fetching <r.flip> from GRASS-Addons SVN repository (be patient)...
Compiling...
A r.flip/main.c
A r.flip/Makefile
A r.flip/r.flip.html
Checked out revision 64750.
mkdir -p /tmp/tmpN28bVY/r.flip/bin
mkdir -p /tmp/tmpN28bVY/r.flip/etc
mkdir -p /tmp/tmpN28bVY/r.flip/docs/html
mkdir -p /tmp/tmpN28bVY/r.flip/docs/man
mkdir -p /tmp/tmpN28bVY/r.flip/docs/man/man1
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-
gnu
gcc -g -Wall -Werror-implicit-function-declaration -fno-common
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-DPACKAGE=\""grassmods"\" -I/usr/local/grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu/include
-I/usr/local/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/dist.x86_64
-unknown-linux-gnu/include -DRELDIR=\"/tmp/tmpN28bVY/r.flip\" -o
OBJ.x86_64-unknown-linux-gnu/main.o -c main.c
main.c: In function ‘main’:
main.c:46:5: error: implicit declaration of function
‘G_add_keyword’
main.c:74:5: error: implicit declaration of function
‘Rast_open_old’
main.c:75:5: error: implicit declaration of function
‘Rast_get_map_type’
main.c:76:5: error: implicit declaration of function
‘Rast_allocate_d_buf’
main.c:76:12: warning: assignment makes pointer from integer
without a cast
main.c:79:5: error: implicit declaration of function
‘Rast_open_new’
main.c:82:2: warning: pointer/integer type mismatch in
conditional expression
main.c:84:5: error: implicit declaration of function
‘Rast_window_rows’
main.c:85:5: error: implicit declaration of function
‘Rast_window_cols’
main.c:92:2: error: implicit declaration of function
‘Rast_get_d_row’
main.c:100:2: error: implicit declaration of function
‘Rast_put_d_row’
main.c:103:5: error: implicit declaration of function
‘Rast_close’
main.c:106:5: error: implicit declaration of function
‘Rast_read_colors’
main.c:107:2: error: implicit declaration of function
‘Rast_write_colors’
main.c:109:5: error: implicit declaration of function
‘Rast_short_history’
main.c:110:5: error: implicit declaration of function
‘Rast_command_history’
main.c:111:5: error: implicit declaration of function
‘Rast_write_history’
make: *** [OBJ.x86_64-unknown-linux-gnu/main.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
(Wed Feb 25 18:54:56 2015) Command finished (2 sec)
}}}

It's no longer clear to me whether the compilation error is now due to
permission problems, or to some other causes.

As I had indicated earlier, g.extension worked in GRASS-6.4.4svn, where
there appeared to maybe have been some sort of a work-around by using a
/tmp directory located inside the current LOCATION/MAPSET/PERMANENT and
where the addons ended up being installed in $HOME/.grass6/addons?

In fear of having presented too much stuff, I hope that this helps to shed
some light on where the problem might be? Please let me know what next to
do. Thanks.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by isaacullah):

I too encountered this yesterday. I just changed the permissions of my
grass 7 install tree in usr/lib/grass70, with:

{{{
sudo chmod 777 /usr/lib/grass70/scripts
}}}

and it worked fine. The module compiled and installed into
~/.grass7/scripts. I'm not sure why it needed write permissions for
/usr/lib/grass70/scripts, but it seems like that was the problem on my
machine...

I am using the current grass 7.0 stable from the grass-stable ubuntu PPA
repository.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by martinl):

Replying to [comment:5 isaacullah]:
> I too encountered this yesterday.

hm, I tested builds for Ubuntu on Launchpad and it works. Correct
situation is

  * compilation is done in /tmp dir
  * addons installed to .grass7/addons (if no -s flag is given)

No idea what could be wrong.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by ewcgrass):

I have managed to get g.extension to compile several (but not all) addon
modules. I did this by copying (as root user) all files located inside the
grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/include/grass and
/include/Make, grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/tools,
and grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015/lib directories,
into the respective sub-directories inside grass7.0.1svn-x86_64-unknown-
linux-gnu-21_02_2015/dist.x86_64-unknown-linux-gnu. It would appear that
the requirement for the /dist.x86_64-unknown-linux-gnu directory may have
somehow found it's way into a make or other file somewhere, perhaps as a
remnant from past development work? I suggest this because I found
reference to that directory in the /include/Make/Platform.make.orig file.
My search for references to this directory were not extensive, so perhaps
it is present elsewhere too?

I am not a coder, but I do not view what I have done to get g.extension to
compile to be a proper fix (it is a band-aid fix only). However, I am
hoping this information may help those who are more familiar with the code
related to g.extension, or to other compilation activities within GRASS,
to find the source of this problem?

The modules that still refuse to compile appear to be doing so because of
some issues related to file permissions (??) and/or missing header files.
For example, I have not been able to find geos_c.h anywhere within the
/grass7.0.1svn-x86_64-unknown-linux-gnu-21_02_2015 directory, which is
needed to compile r.stream.order, r.stream.snap, v.surf.mass,
v.centerpoint, etc. Also, some errors appear to maybe be related to syntax
errors; for example for modules v.transects and r.stream.basins.

I intend to report back with more information as/if time permits for me to
"explore" more deeply into the remaining compilation problems.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#2598: g.extension compilation fails
----------------------+-----------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: svn-releasebranch70
Keywords: | Platform: Linux
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by ewcgrass):

Have resolved the geos_c.h header file issue by installing the geos-devel
package system-wide. Geos-devel should be added to the optional
requirements.html list.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2598#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>