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

GRASS GIS trac at osgeo.org
Wed Feb 25 15:21:11 PST 2015


#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>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list