[gdal-dev] Error building GDAL 3.8.3: Installed GEOS not found during build

Eric Patton eric.r.patton at pm.me
Tue Jan 16 08:20:40 PST 2024


I am running into an error while building gdal 3.8.3 from source - it seems GEOS (version 3.12.1) is not being found during the build, despite that fact it was completely installed from source with no errors. I'm using LInux Mint 20.3.

# GDAL build commands used:

$ cmake -DCMAKE_BUILD_TYPE=Release ..
(No obvious errors in output, GEOS seems to be located):

-- The following RECOMMENDED packages have been found:
* GEOS
Geometry Engine - Open Source (GDAL core dependency)

$ cmake --build .
<snip>
[ 95%] Built target gcore_mdreader
CMakeFiles/GDAL.dir/build.make:2687: *** target pattern contains no '%'. Stop.
make[1]: *** [CMakeFiles/Makefile2:5005: CMakeFiles/GDAL.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

# Line 2687 of /usr/local/gdal-3.8.3/build/CMakefiles/GDAL.dir:
libgdal.so.34.3.8.3: GEOS::geos_c-NOTFOUND

# But that's strange:
$ which geos-config
/usr/local/bin/geos-config

$ geos-config --version
3.12.1

# Location of GEOS include dir:

$ cd /usr
$ find . -name "geos_c.h"

./local/geos-3.12.1/_build/capi/geos_c.h
./local/include/geos_c.h

# Location of GEOS_LIBRARY:

$ cd /usr
$ find . -name "*libgeos_c*"

./local/lib/libgeos_c.so.1
./local/lib/libgeos_c.so.1.18.1
./local/lib/libgeos_c.so
./local/geos-3.12.1/_build/lib/libgeos_c.so.1
./local/geos-3.12.1/_build/lib/libgeos_c.so.1.18.1
./local/geos-3.12.1/_build/lib/libgeos_c.so

$ uname -a:

Linux FieldBathy 5.15.0-91-generic #101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Please let me know if there's anything else I can post to help diagnose the error, thanks.

--
Eric Patton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240116/38cffe9b/attachment.htm>


More information about the gdal-dev mailing list