[GRASS-dev] Error: undefined reference to `OGR_GT_Flatten' when compiling grass with GDAL

Even Rouault even.rouault at spatialys.com
Tue Jan 5 08:26:49 PST 2016


> -L/misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/grass-7.0.2/dist.x
> 86_64-unknown-linux-gnu/lib
> -L/misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/grass-7.0.2/dist.
> x86_64-unknown-linux-gnu/lib -Wl,--export-dynamic
> -Wl,-rpath-link,/misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/gras
> s-7.0.2/dist.x86_64-unknown-linux-gnu/lib -o
> /misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/grass-7.0.2/dist.x86
> _64-unknown-linux-gnu/bin/d.path OBJ.x86_64-unknown-linux-gnu/main.o
> OBJ.x86_64-unknown-linux-gnu/select.o    -lgrass_display.7.0.2
> -lgrass_vector.7.0.2 -lgrass_gis.7.0.2   -lm
> /misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/grass-7.0.2/dist.x86
> _64-unknown-linux-gnu/lib/libgrass_vector.7.0.2.so: undefined reference to
> `OGR_GT_Flatten'
> collect2: error: ld returned 1 exit status
> make: ***
> [/misc/fluo6/andre/projekte/custom_gfz_python/tmp/grass/grass-7.0.2/dist.x8
> 6_64-unknown-linux-gnu/bin/d.path] Error 1

It could mean that you are compiling against GDAL 2.0 headers, but the linking 
is done against GDAL 1.X instead.

I guess the OGR_GT_Flatten dependency must comes from the resolution of GDAL 
2.0 "#define wkbFlatten(x)  OGR_GT_Flatten((OGRwkbGeometryType)(x))" from 
ogr_core.h.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the grass-dev mailing list