[GRASS-dev] G7: OGSF compilation error on Ubuntu 14.04

Markus Neteler neteler at osgeo.org
Wed Jun 25 08:04:27 PDT 2014


Hi,

I try to help to compile 7.0 on an Ubuntu box 14.04. We fail to compile OGSF:


alba at alba:~/source_code/grass70_release$ cd
/home/alba/source_code/grass70_release/lib/ogsf

alba at alba:~/source_code/grass70_release/lib/ogsf$ make
gcc  -g -O2  -fPIC
-I/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include
-I/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include
  -I/usr/include/gdal -I/usr/include  -DPACKAGE=\""grasslibs"\"
-I/usr/include/postgresql   -I/usr/include/libavcodec
-I/usr/include/libavformat -I/usr/include/libswscale
-I/usr/include/libavutil
-I/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include
-I/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include
-o OBJ.x86_64-unknown-linux-gnu/GK2.o -c GK2.c
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:105:0,
                 from
/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include/grass/defs/gis.h:64,
                 from
/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include/grass/gis.h:636,
                 from GK2.c:21:
/usr/include/x86_64-linux-gnu/bits/stat.h:91:21: error: field
‘st_atim’ has incomplete type
     struct timespec st_atim;  /* Time of last access.  */
                     ^
/usr/include/x86_64-linux-gnu/bits/stat.h:92:21: error: field
‘st_mtim’ has incomplete type
     struct timespec st_mtim;  /* Time of last modification.  */
                     ^
/usr/include/x86_64-linux-gnu/bits/stat.h:93:21: error: field
‘st_ctim’ has incomplete type
     struct timespec st_ctim;  /* Time of last status change.  */
                     ^
In file included from
/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include/grass/defs/gis.h:64:0,
                 from
/home/alba/source_code/grass70_release/dist.x86_64-unknown-linux-gnu/include/grass/gis.h:636,
                 from GK2.c:21:
/usr/include/x86_64-linux-gnu/sys/stat.h:365:31: error: array type has
incomplete element type
         const struct timespec __times[2],
                               ^
/usr/include/x86_64-linux-gnu/sys/stat.h:372:54: error: array type has
incomplete element type
 extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
                                                      ^
make: *** [OBJ.x86_64-unknown-linux-gnu/GK2.o] Error 1


Something is overriding the time definition. I found
http://stackoverflow.com/questions/14947691/c-system-file-bits-stat-h-suddenly-breaks-with-error-field-st-atim-has-inc

but dunno what to do next.

Any Ubuntu user who knows the trick?

thanks
Markus


More information about the grass-dev mailing list