Hi,
I’m having trouble with:
./configure --enable-64bit --enable-largefile --with-libs=/usr/lib64 --with-postgres=yes --with-odbc=yes --with-opencl=yes --with-gdal=/usr/local/bin/gdal-config -with-pdal=/usr/bin/pdal-config --with-postgres-includes=/home/zls/dev/postgresql-13.3/src/interfaces/libpq/
.
.
.
checking for png_read_image in -lpng… yes
checking whether to use PostgreSQL… yes
checking for location of PostgreSQL includes… /home/zls/dev/postgresql-13.3/src/interfaces/libpq/
checking for libpq-fe.h… no configure: error: *** Unable to locate PostgreSQL includes.
I tried various folders and then downloaded/unzipped https://www.postgresql.org/ftp/source/v13.3/postgresql-13.3.tar.bz2
into my dev folder - but still get the above ‘includes’ error.
I’m working on Ubuntu 20.04 and downloaded GRASS src as follows:
zls@ZolAW17ubuntu:~/dev$ git clone https://github.com/OSGeo/grass.git grass-latest_20210619.git
then cd grass-latest_20210619.git and ./configure (as above)
Thanks in advance,
Zoltan
···
--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
[www.geograph.co.za](http://www.geograph.co.za)
=============================================
The correct folder(s) were: -with-postgres-includes=/usr/include/postgresql --with-freetype-includes=/usr/include/freetype2
(Had to add the freetype include folder as well)
Apologies for the ‘noise’.
Regards,
Zoltan
···
On 2021/06/19 11:32, Zoltan wrote:
Hi,
I’m having trouble with:
./configure --enable-64bit --enable-largefile --with-libs=/usr/lib64 --with-postgres=yes --with-odbc=yes --with-opencl=yes --with-gdal=/usr/local/bin/gdal-config -with-pdal=/usr/bin/pdal-config --with-postgres-includes=/home/zls/dev/postgresql-13.3/src/interfaces/libpq/
.
.
.
checking for png_read_image in -lpng… yes
checking whether to use PostgreSQL… yes
checking for location of PostgreSQL includes… /home/zls/dev/postgresql-13.3/src/interfaces/libpq/
checking for libpq-fe.h… no configure: error: *** Unable to locate PostgreSQL includes.
I tried various folders and then downloaded/unzipped https://www.postgresql.org/ftp/source/v13.3/postgresql-13.3.tar.bz2
into my dev folder - but still get the above ‘includes’ error.
I’m working on Ubuntu 20.04 and downloaded GRASS src as follows:
zls@ZolAW17ubuntu:~/dev$ git clone https://github.com/OSGeo/grass.git grass-latest_20210619.git
then cd grass-latest_20210619.git and ./configure (as above)
Thanks in advance,
Zoltan
--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
[www.geograph.co.za](http://www.geograph.co.za)
=============================================
--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
[www.geograph.co.za](http://www.geograph.co.za)
=============================================
On Sat, Jun 19, 2021 at 12:36 PM Zoltan <zoltans@geograph.co.za> wrote:
Hi Devs,
Sorted!
The correct folder(s) were: -with-postgres-includes=/usr/include/postgresql --with-freetype-includes=/usr/include/freetype2
(Had to add the freetype include folder as well)
Hi Markus/Māris,
Thanks for your interest.
@Māris: I did provide the log tail-end on my first post.
@Markus: I started off the process using Google/Duck-Duck-Go to piece together what info I needed, as I wanted ECW support and one or two other add-ons.
Far too many websites offering help, come up.
I read through a couple but only later the Grasswiki you referred to below - and then only noticing the with-XXX-includes folder directives.
my bad
Regards and keep well,
Zoltan
···
On 2021-06-21 07:20, Maris Nartiss wrote:
Please include relevant part of configure.log where exact reasons of
failure will be seen.
Māris.
On 2021-06-20 18:42, Markus Neteler wrote:
Hi Zoltan,
On Sat, Jun 19, 2021 at 12:36 PM Zoltan [<zoltans@geograph.co.za>](mailto:zoltans@geograph.co.za) wrote:
Hi Devs,
Sorted!
The correct folder(s) were: -with-postgres-includes=/usr/include/postgresql --with-freetype-includes=/usr/include/freetype2
(Had to add the freetype include folder as well)
Glad you solved it.
BTW, there is a wiki page with hints:
[https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions](https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions)
Please feel free to improve it as needed.
Best
Markus
--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
[www.geograph.co.za](http://www.geograph.co.za)
=============================================
I then did a ./configure (without extra parameters) and tried to bumble my way through the errors I was getting.
I fired off my initial email to grass-dev as I was not finding the solution.
I then found the grass-wiki recipe and corrected the problems by copy/paste the ./configure for Ubuntu 20.04
So, a few thoughts from my side.
In the github install (all versions of grass), add a pointer to the grasswiki page, especially at the ./configure paragraph. (I would find it more reliable and easy to manage a link to one source of info, than to copy the source into contents of other documents)
Amend the configure script error message to suggest the that the with-XXX-includes= parameter should be used, instead of just:
configure: error: *** Unable to locate FreeType includes.
As most apt installed products go to specific directories, is it possible to let the configure script not first try a few obvious places before crashing with the error message? If they are not ‘apt installed’, then they likely go to /usr/**local/**XXX
HTH, and thanks again for your persistence.
Regards,
Zoltan
···
On 2021/06/21 13:32, Markus Neteler wrote:
Hi Zoltan,
Where would you expect this info, i.e. a link to the wiki?
Maybe we can improve things
Hi Markus/Māris,
Thanks for your interest.
@Māris: I did provide the log tail-end on my first post.
@Markus: I started off the process using Google/Duck-Duck-Go to piece together what info I needed, as I wanted ECW support and one or two other add-ons.
Far too many websites offering help, come up.
I read through a couple but only later the Grasswiki you referred to below - and then only noticing the with-XXX-includes folder directives.
my bad
Regards and keep well,
Zoltan
On 2021-06-21 07:20, Maris Nartiss wrote:
Please include relevant part of configure.log where exact reasons of
failure will be seen.
Māris.
On 2021-06-20 18:42, Markus Neteler wrote:
Hi Zoltan,
On Sat, Jun 19, 2021 at 12:36 PM Zoltan [<zoltans@geograph.co.za>](mailto:zoltans@geograph.co.za) wrote:
Hi Devs,
Sorted!
The correct folder(s) were: -with-postgres-includes=/usr/include/postgresql --with-freetype-includes=/usr/include/freetype2
(Had to add the freetype include folder as well)
Glad you solved it.
BTW, there is a wiki page with hints:
[https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions](https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions)
Please feel free to improve it as needed.
Best
Markus
--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
[www.geograph.co.za](http://www.geograph.co.za)
=============================================
I then did a ./configure (without extra parameters) and tried to bumble my way through the errors I was getting.
I fired off my initial email to grass-dev as I was not finding the solution.
I then found the grass-wiki recipe and corrected the problems by copy/paste the ./configure for Ubuntu 20.04
So, a few thoughts from my side.
In the github install (all versions of grass), add a pointer to the grasswiki page, especially at the ./configure paragraph.
(I would find it more reliable and easy to manage a link to one source of info, than to copy the source into contents of other documents)
Agreed but there are so many supported operating systems that the
INSTALL file would become too long.
Amend the configure script error message to suggest the that the with-XXX-includes= parameter should be used, instead of just:
configure: error: *** Unable to locate FreeType includes.
As most apt installed products go to specific directories, is it possible to let the configure script not first try a few obvious places before crashing with the error message? If they are not 'apt installed', then they likely go to /usr/local/XXX
2021-06-22 0:24 GMT+03:00, Markus Neteler <neteler@osgeo.org>:
Maybe others here have suggestions how to improve the current
(message) situation?
We are free to change messages in configure.in file, still it would be
hard to customize for all potential failure scenarios. One option
would be to create a longer version of message like: "FOO not found.
Consult configure.log for exact reason of failure and seek in GRASS
WIKI for potential solutions."
Perhaps all that is required is that, if config does an error-exit, then print a message: "Have you read grasswiki...blah...blah"
Regards,
Z
On 2021-06-22 07:49, Maris Nartiss wrote:
2021-06-22 0:24 GMT+03:00, Markus Neteler <neteler@osgeo.org>:
Maybe others here have suggestions how to improve the current
(message) situation?
We are free to change messages in configure.in file, still it would be
hard to customize for all potential failure scenarios. One option
would be to create a longer version of message like: "FOO not found.
Consult configure.log for exact reason of failure and seek in GRASS
WIKI for potential solutions."
FWIW, running configure with
--with-freetype-includes=/usr/include/freetype2 was always mandatory and
sufficient for building GRASS on my PC. I didn't always remember this
detail, so some of my builds were slightly more difficult than the
others.
GRASS configure script uses pkg-config, but not for FreeType 2
detection. So it defaults to a hard-coded path,
which is now /usr/include/freetype. It is worth checking how many
distributions put FreeType 2 headers there instead
of /usr/include/freetype2. In other words, this default path might be
well out of date.
In terms of improving this situation (such that GRASS configure "just
works" for most users), the following changes could add to a more
useful error message:
1. Default to /usr/include/freetype2 if that's the most common location
in supported distributions now.
2. Use pkg-config to detect the necessary FreeType 2 CFLAGS
automatically.
As a side note, it might be a good time to migrate to a current version
of autoconf (2.69 seems to be a popular choice).
FWIW, running configure with
--with-freetype-includes=/usr/include/freetype2 was always mandatory and
sufficient for building GRASS on my PC. I didn't always remember this
detail, so some of my builds were slightly more difficult than the
others.
GRASS configure script uses pkg-config, but not for FreeType 2
detection. So it defaults to a hard-coded path,
which is now /usr/include/freetype. It is worth checking how many
distributions put FreeType 2 headers there instead
of /usr/include/freetype2. In other words, this default path might be
well out of date.
In terms of improving this situation (such that GRASS configure "just
works" for most users), the following changes could add to a more
useful error message:
1. Default to /usr/include/freetype2 if that's the most common location
in supported distributions now.
2. Use pkg-config to detect the necessary FreeType 2 CFLAGS
automatically.
As a side note, it might be a good time to migrate to a current version
of autoconf (2.69 seems to be a popular choice).