[GRASS-user] Add-on compilation errors in GRASS 7

Joseph Bailey misc2345 at outlook.com
Mon Sep 8 13:48:01 PDT 2014





Hi all,
I am really struggling to to use the r.geomorphon (or indeed any) add-on in GRASS 7 (it's not available in 6) and I have spent a great many hours trying to get this working before seeking advice here. Any help would be hugely appreciated. I really am a GRASS novice so I may well have missed something obvious, despite trying to be thorough. This is also my first post here so I hope it's up to scratch.
First, system Info:                                                                     GRASS version: 7.0.0beta3                                                       GRASS SVN Revision: 61541                                                       Build Date: 2014-09-08                                                          Build Platform: x86_64-unknown-linux-gnu                                        GDAL/OGR: 1.11.0                                                                PROJ.4: 4.8.0                                                                   GEOS: 3.4.2                                                                     SQLite: 3.8.2                                                                   Python: 2.7.6                                                                   wxPython: 2.8.12.1                                                              Platform: Linux-3.13.0-35-generic-x86_64-with-Ubuntu-14.04-trusty                           How I got to this stage:As you can see from System Info, I compiled GRASS GIS 7.0.0beta3 from source code via "svn checkout http://svn.osgeo.org/grass/grass/tags/release_20140806_grass_7_0_0beta3", but I had also tried it via "svn co https://svn.osgeo.org/grass/grass/trunk" before, with the same negative result. I cannot use the stable version of GRASS GIS 7 (I tried that first) because of the issue with g.extension, which is fixed in these later versions (see http://lists.osgeo.org/pipermail/grass-user/2014-June/070480.html). I've compiled and installed GRASS 7 using the instructions from the OSGeo Ubuntu Wiki page (http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GRASS_GIS) and have been sure run the commands under 'Dependencies'.
A post on this issue appears here - http://lists.osgeo.org/pipermail/grass-user/2013-February/067241.html
The compilation set-up that I've used is as follows (this does not produce any errors):CFLAGS="-O2 -Wall" LDFLAGS="-s" ./configure \--enable-largefile=yes \--with-nls \--with-cxx \--with-python=yes \--with-wxwidgets \--with-cairo \--with-freetype=yes \--with-freetype-includes="/usr/include/freetype2/" \--with-opengl-libs=/usr/include/GL \--with-postgres=yes \--with-postgres-includes="/usr/include/postgresql" \--with-sqlite=yes \--with-mysql=yes \--with-mysql-includes="/usr/include/mysql" \--with-odbc=no \--with-geos=yes
And here's the summary once compiled (does anything stand out as being missing?):  BLAS support:                no  C++ support:                  yes  Cairo support:                yes  DWG support:                no  FFMPEG support:          no  FFTW support:               yes  FreeType support:         yes  GDAL support:               yes  GEOS support:               yes  LAPACK support:           no  Large File support (LFS):   yes  libLAS support:              no  MySQL support:            yes  NetCDF support:           no  NLS support:                 yes  ODBC support:              yes  OGR support:                yes  OpenCL support:           no  OpenGL support:           yes  OpenMP support:           no  PNG support:                 yes  POSIX thread support:  no  PostgreSQL support:    yes  Readline support:          no  Regex support:              yes  SQLite support:             yes  TIFF support:               yes  wxWidgets support:     yes  X11 support:                yes
Finally, here's the output upon attempting to install r.geomorphon via g.extension (g.extension extension=r.geomorphon svnurl=http://svn.osgeo.org/grass/grass-addons/grass7). I've also put another couple of error-filled outputs from other add-ons below. Many thanks in advance, Joe
g.extension extension=r.geomorphon svnurl=http://svn.osgeo.org/grass/grass-addons/grass7Fetching <r.geomorphon> from GRASS-Addons SVN (be patient)...Compiling...geom.c: In function ‘ternary_rotate’:geom.c:22:9: warning: unused variable ‘res’ [-Wunused-variable]     int res;         ^geom.c: At top level:geom.c:2:15: warning: ‘dirs’ defined but not used[-Wunused-variable] static double dirs[8] = { 0.7854, 0., 5.4978, 4.7124,3.9270, 3.1416, 2.3562, 1.5708 }; /* radians */               ^geom.c: In function ‘shape’:geom.c:252:26: warning: ‘rymax’ may be useduninitialized in this function [-Wmaybe-uninitialized]  rymax = ry > rymax ? ry : rymax;                          ^geom.c:251:26: warning: ‘rymin’ may be useduninitialized in this function [-Wmaybe-uninitialized]  rymin = ry < rymin ? ry : rymin;                          ^geom.c:250:26: warning: ‘rxmax’ may be useduninitialized in this function [-Wmaybe-uninitialized]  rxmax = rx > rxmax ? rx : rxmax;                          ^geom.c:249:26: warning: ‘rxmin’ may be useduninitialized in this function [-Wmaybe-uninitialized]  rxmin = rx < rxmin ? rx : rxmin;                          ^geom.c:232:15: warning: ‘avg_x_square’ may be useduninitialized in this function [-Wmaybe-uninitialized]  avg_x_square += pattern->x[i] * pattern->x[i];               ^main.c: In function ‘main’:main.c:312:20: warning: unused variable ‘formC’[-Wunused-variable]  int formA, formB, formC;                    ^main.c:312:13: warning: unused variable ‘formB’[-Wunused-variable]  int formA, formB, formC;             ^main.c:312:6: warning: unused variable ‘formA’[-Wunused-variable]  int formA, formB, formC;      ^main.c:93:28: warning: unused variable ‘radius’[-Wunused-variable]     int row, cur_row, col, radius;                            ^main.c:91:15: warning: unused variable ‘n’ [-Wunused-variable]     int i, j, n;               ^main.c:91:12: warning: unused variable ‘j’ [-Wunused-variable]     int i, j, n;            ^main.c:553:1: warning: control reaches end of non-voidfunction [-Wreturn-type] } ^memory.c: In function ‘open_map’:memory.c:10:9: warning: unused variable ‘bufsize’[-Wunused-variable]     int bufsize;         ^memory.c:7:9: warning: unused variable ‘fd’ [-Wunused-variable]     int fd;         ^memory.c: In function ‘shift_buffers’:memory.c:75:39: warning: unused variable ‘aspect_tmp’[-Wunused-variable]     FCELL *tmp_elev_buf, *slope_tmp, *aspect_tmp;                                       ^memory.c:75:27: warning: unused variable ‘slope_tmp’[-Wunused-variable]     FCELL *tmp_elev_buf, *slope_tmp, *aspect_tmp;                           ^memory.c: In function ‘write_contrast_colors’:memory.c:131:23: warning: unused variable ‘cats’[-Wunused-variable]     struct Categories cats;                       ^multires.c: In function ‘pattern_matching’:multires.c:23:29: warning: suggest parentheses aroundcomparison in operand of ‘&’ [-Wparentheses]     return (result & source == source) ? 1 : 0;                             ^pattern.c: In function ‘calc_pattern’:pattern.c:134:24: warning: ‘nadir_distance’ may be useduninitialized in this function [-Wmaybe-uninitialized]   pattern->distance[i] = nadir_distance;                        ^pattern.c:128:24: warning: ‘zenith_distance’ may be useduninitialized in this function [-Wmaybe-uninitialized]   pattern->distance[i] = zenith_distance;                        ^pattern.c:133:25: warning: ‘nadir_height’ may be useduninitialized in this function [-Wmaybe-uninitialized]   pattern->elevation[i] = nadir_height; //ZMIANA!                         ^pattern.c:127:25: warning: ‘zenith_height’ may be useduninitialized in this function [-Wmaybe-uninitialized]   pattern->elevation[i] = zenith_height; //ZMIANA!                         ^Installing...Updating metadata file...WARNING: Unable to parse 'http://grass.osgeo.org/addons/grass7/modules.xml'. Metadata file not updated.Installation of <r.geomorphon> successfully finished


-- END of OUTPUT 1 --        
I also get errors when attempting to install other add-ons, e.g. r.bioclim:
g.extension extension=r.bioclim svnurl=http://svn.osgeo.org/grass/grass-addons/grass7Fetching <r.bioclim> from GRASS-Addons SVN (be patient)...Compiling.../bin/sh: 1: cannot create /usr/local/grass-7.0.0beta3/locale/scriptstrings/r.bioclim_to_translate.c: Directorynonexistentmake: [/usr/local/grass-7.0.0beta3/locale/scriptstrings/r.bioclim_to_translate.c] Error 2 (ignored)Installing...Updating metadata file...WARNING: Unable to parse 'http://grass.osgeo.org/addons/grass7/modules.xml'. Metadata file not updated.Installation of <r.bioclim> successfully finished


 -- END of OUTPUT 2 --        
e.g. r.stream.basins:
Fetching <r.stream.basins> from GRASS-Addons SVN (be patient)...Compiling...io.c: In function ‘ram_write_map’:io.c:221:10: warning: ‘c’ may be used uninitialized inthis function [-Wmaybe-uninitialized]   G_debug(1, "ram_null:Cannot convert to null at: %d %d",r, c);          ^io.c: In function ‘seg_write_map’:io.c:531:12: warning: ‘c’ may be used uninitialized inthis function [-Wmaybe-uninitialized]   G_warning(_("Unable to convert to null at: %d %d"), r,            ^Installing...Updating metadata file...WARNING: Unable to parse 'http://grass.osgeo.org/addons/grass7/modules.xml'. Metadata file not updated.Installation of <r.stream.basins> successfully finished
 -- END of OUTPUT 3 -- --- END  ---

   

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140908/f698fd3c/attachment-0001.html>


More information about the grass-user mailing list