[GRASS-dev] compilation error gdal-grass plugin

Hi devs,

I just compiled grass 7.8.3dev (on Ubuntu 18.04) and am now trying to
compile the gdal-grass plugin (gdal-grass-2.4.3).

I am, however, getting the following error message:

paulo@Z600:~/Software/Linux/gdal-grass-2.4.3$ make
g++ -Wall -fPIC -DUSE_CPL
-DGRASS_GISBASE=\"/usr/local/grass78/grass78\" -I/usr/include/gdal
-I/usr/local/grass78/grass78/include   -O2  -c -o ogrgrassdriver.o
ogrgrassdriver.cpp
In file included from /usr/local/grass78/grass78/include/grass/vect/digit.h:3:0,
                 from /usr/local/grass78/grass78/include/grass/vector.h:4,
                 from ogrgrass.h:41,
                 from ogrgrassdriver.cpp:29:
/usr/local/grass78/grass78/include/grass/vect/dig_structs.h:31:10:
fatal error: libpq-fe.h: No such file or directory
 #include <libpq-fe.h>
          ^~~~~~~~~~~~
compilation terminated.
Makefile:43: recipe for target 'ogrgrassdriver.o' failed
make: *** [ogrgrassdriver.o] Error 1
paulo@Z600:~/Software/Linux/gdal-grass-2.4.3$

Looking for a solution, I find the suggestion to install libpq-dev,
but that library is installed already. Any suggestions what I may do
next?

Regards,

Paulo

On 12/26/19 4:42 PM, Paulo van Breugel wrote:

Looking for a solution, I find the suggestion to install libpq-dev,
but that library is installed already. Any suggestions what I may do
next?

./configure --with-postgres-includes=$(pg_config --includedir)

Kind Regards,

Bas

--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1

On Thu, Dec 26, 2019 at 4:55 PM Sebastiaan Couwenberg
<sebastic@xs4all.nl> wrote:

On 12/26/19 4:42 PM, Paulo van Breugel wrote:
> Looking for a solution, I find the suggestion to install libpq-dev,
> but that library is installed already. Any suggestions what I may do
> next?

./configure --with-postgres-includes=$(pg_config --includedir)

Works, great. Thanks!

Kind Regards,

Bas

--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

On Thu, Dec 26, 2019 at 6:16 PM Paulo van Breugel
<p.vanbreugel@gmail.com> wrote:

On Thu, Dec 26, 2019 at 4:55 PM Sebastiaan Couwenberg
<sebastic@xs4all.nl> wrote:
>
> On 12/26/19 4:42 PM, Paulo van Breugel wrote:
> > Looking for a solution, I find the suggestion to install libpq-dev,
> > but that library is installed already. Any suggestions what I may do
> > next?
>
> ./configure --with-postgres-includes=$(pg_config --includedir)

Works, great. Thanks!

Added here:

https://grasswiki.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin#ERROR_2:_compilation_error_libpq-fe.h:_No_such_file_or_directory

Markus