Opened 8 years ago

Closed 8 years ago

#2779 closed defect (fixed)

v.external compile error --without-gdal --with-postgres

Reported by: Papillon81 Owned by: martinl
Priority: normal Milestone: 7.0.2
Component: Compiling Version: 7.0.1
Keywords: Cc: grass-dev@…
CPU: x86-64 Platform: Linux

Description

The module v.external gives a compile error when compiling GRASS 7.0.1 --without-gdal --with-postgres.

The following error shows up: main.c:27:21: fatal error: ogr_api.h: No such file or directory

It seems like the ogr_api.h header should be conditionally included in the main.c file or the v.external module should not be compiled at all when gdal is disabled.

Change History (7)

comment:1 by neteler, 8 years ago

The GDAL library is a requirement (see https://grass.osgeo.org/grass70/source/REQUIREMENTS.html)

Why would you want to compile GRASS GIS without GDAL?

comment:2 by Papillon81, 8 years ago

I saw that, yes. Why does GRASS offer a compile-time switch then? ;)

comment:3 by martinl, 8 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:4 by neteler, 8 years ago

I think in is unavoidable for being able to set a path:

  --with-gdal[=path/gdal-config]
                          enable GDAL/OGR support (gdal-config with path,
                          e.g. '--with-gdal=/usr/local/bin/gdal-config')

comment:5 by martinl, 8 years ago

Component: VectorCompiling

comment:6 by martinl, 8 years ago

I am unable to reproduce this error in relbr70 with --without-gdal --with-postgres. It's compiled fine. BTW, I fixed some related issues in r66591.

comment:7 by martinl, 8 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in r66597, backported to relbr70 as r66598. Closing, feel free to re-open if needed.

Note: See TracTickets for help on using tickets.