[GRASS-dev] Windows compilation failed

Hi All,

I tried to install Grass source on Windows 10 using the following link.

https://trac.osgeo.org/grass/wiki/CompileOnWindows

Downloaded the GRASS source from development trunk using the following commands.

cd /usr/src
svn checkout [https://svn.osgeo.org/grass/grass/trunk](https://svn.osgeo.org/grass/grass/trunk) grass_trunk

On Compilation , it failed with following errors.

Started compilation: Tue Dec 12 12:47:54 IST 2017

Errors in:
/usr/src/grass_trunk/raster/r.in.lidar
/usr/src/grass_trunk/raster3d/r3.in.lidar
/usr/src/grass_trunk/vector/v.out.lidar
/usr/src/grass_trunk/vector/v.in.lidar

In case of errors please change into the directory with error and run ‘make’.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

</FINAL ERROR>

On running the make in r.in.lidar directory. it failed with following error.

C:/msys64/usr/src/grass_trunk/dist.x86_64-w64-mingw32/bin/r.in.lidar.exe: error while loading shared libraries: libgrass_raster.7.5.svn.dll: cannot open shared object file: No such file or directory

make: *** […/…/include/Make/Html.make:14: r.in.lidar.tmp.html] Error 1

</RASTOR ERROR>

I have also noticed many related to header files in package.log file. Please find the some of the errors for your reference.

<HEADER_ERRORS>

Status: Preprocessing c:/users/work/appdata/local/temp/tmpgupeez.h

Status: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG -U GNUC -dD “-Dinline=” “-D__inline__=” “-D__extension__=” “-D_Bool=uint8_t” “-D__const=const” “-D__asm__(x)=” “-D__asm(x)=” “-DCTYPESGEN=1” c:/users/work/appdata/local/temp/tmpgupeez.h

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:275:0,

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: from C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: from C:/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h:9,

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: from C:/msys64/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include/grass/gis.h:24,

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: from c:/users/work/appdata/local/temp/tmpgupeez.h:1:

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: C:/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h:35:2: error: #error VARARGS not implemented for this compiler

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: #error VARARGS not implemented for this compiler

Error: gcc -E -I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -I/usr/src/grass_trunk/dist.x86_64-w64-mingw32/include -D__GLIBC_HAVE_LONG_LONG: ^~~~~

Status: Parsing c:/users/work/appdata/local/temp/tmpgupeez.h

Error: C:/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h:176: Syntax error at ‘va_list’

Error: C:/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h:182: Syntax error at ‘va_list’

Error: C:/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h:188: Syntax error at ‘va_list’

Error: C:/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h:193: Syntax error at 'va_list

</HEADER_ERRORS>

Please help us in resolving the above errors.

  • Thanks
    CM Reddy

regarding the lidar errors, have look into

/mswindows/OSGeo4W/package.sh

155 if [ "$MINGW_POSTFIX" = "64" ]; then
156 conf_host=x86_64-w64-mingw32
157 # see https://trac.osgeo.org/osgeo4w/ticket/539#ticket
158 # LAS support only enabled on 64bit
159
conf_opts="--with-liblas=$PWD/mswindows/osgeo4w/liblas-config"
160 else
161 conf_host=i386-w64-mingw32
162 conf_opts=
163 fi

change line 159 to the same as line 162:

conf_opts=

no trailing whitespace or similar

then compilation should work, though the lidar modules aren't available
then; that has to be hopefully fixed at some time.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html

CM Reddy wrote

Hi All,

I tried to install Grass source on Windows 10 using the following link.

https://trac.osgeo.org/grass/wiki/CompileOnWindows

Downloaded the GRASS source from development trunk using the following
commands.

cd /usr/src
svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk

On Compilation , it failed with following errors.

<FINAL ERROR>
Started compilation: Tue Dec 12 12:47:54 IST 2017
--
Errors in:
/usr/src/grass_trunk/raster/r.in.lidar
/usr/src/grass_trunk/raster3d/r3.in.lidar
/usr/src/grass_trunk/vector/v.out.lidar
/usr/src/grass_trunk/vector/v.in.lidar
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

disabled now lidar modules in winGRASS trunk, winGRASS 74 svn and winGRASS
72 svn:

[GRASS-SVN] r71920 - grass/trunk/mswindows/osgeo4w svn_grass at osgeo.org
[GRASS-SVN] r71921 - grass/branches/releasebranch_7_4/mswindows/osgeo4w
svn_grass at osgeo.org
[GRASS-SVN] r71922 - grass/trunk/mswindows/osgeo4w svn_grass at osgeo.org
[GRASS-SVN] r71923 - grass/branches/releasebranch_7_2/mswindows/osgeo4w
svn_grass at osgeo.org

compilation of winGRASS should work now, though without lidar modules.

test by 'svn up' your code and try a new compilation by 'make distclean'
followed by the wiki command.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html

CM Reddy wrote

Hi All,

I tried to install Grass source on Windows 10 using the following link.

https://trac.osgeo.org/grass/wiki/CompileOnWindows

Downloaded the GRASS source from development trunk using the following
commands.

cd /usr/src
svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk

On Compilation , it failed with following errors.

<FINAL ERROR>
Started compilation: Tue Dec 12 12:47:54 IST 2017
--
Errors in:
/usr/src/grass_trunk/raster/r.in.lidar
/usr/src/grass_trunk/raster3d/r3.in.lidar
/usr/src/grass_trunk/vector/v.out.lidar
/usr/src/grass_trunk/vector/v.in.lidar
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

see comment in ticket: https://trac.osgeo.org/osgeo4w/ticket/550#comment:2

--------
hobu:

This was caused by me. I updated LASzip, but libLAS hasn't been updated to
use the new LASzip API. You'll have to revert to the LASzip 2.2.0 version to
use libLAS
-------

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html