[GRASS-dev] [GRASS GIS] #2779: v.external compile error --without-gdal --with-postgres

#2779: v.external compile error --without-gdal --with-postgres
------------------------+-------------------------
Reporter: Papillon81 | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.2
Component: Vector | Version: 7.0.1
Keywords: | CPU: x86-64
Platform: Linux |
------------------------+-------------------------
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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+-------------------------
  Reporter: Papillon81 | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.2
Component: Vector | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------

Comment (by neteler):

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?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+-------------------------
  Reporter: Papillon81 | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.2
Component: Vector | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+-------------------------

Comment (by Papillon81):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+----------------------
  Reporter: Papillon81 | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.2
Component: Vector | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+----------------------
Changes (by martinl):

* status: new => assigned
* cc: grass-dev@… (added)
* owner: grass-dev@… => martinl

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+----------------------
  Reporter: Papillon81 | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.2
Component: Vector | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+----------------------

Comment (by neteler):

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')
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+----------------------
  Reporter: Papillon81 | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.2
Component: Compiling | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+----------------------
Changes (by martinl):

* component: Vector => Compiling

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+----------------------
  Reporter: Papillon81 | Owner: martinl
      Type: defect | Status: assigned
  Priority: normal | Milestone: 7.0.2
Component: Compiling | Version: 7.0.1
Resolution: | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+----------------------

Comment (by martinl):

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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#2779: v.external compile error --without-gdal --with-postgres
-------------------------+---------------------
  Reporter: Papillon81 | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.2
Component: Compiling | Version: 7.0.1
Resolution: fixed | Keywords:
       CPU: x86-64 | Platform: Linux
-------------------------+---------------------
Changes (by martinl):

* status: assigned => closed
* resolution: => fixed

Comment:

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2779#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>