[gdal-dev] Attempting a coherent CMAKE problem report from a git clone- steps taken

chris english englishchristophera at gmail.com
Fri Mar 4 11:02:09 PST 2022


Concerning (executed in either git download directory or build):
~/gdal$ git describe
v3.3.0-2898-gba4e7c404b

Condition: was building and stopped with
[ 89%] Built target gcore_mdreader
CMakeFiles/GDAL.dir/build.make:2661: *** target pattern contains no '%'.
Stop.
make[1]: *** [CMakeFiles/Makefile2:4871: CMakeFiles/GDAL.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

As we were building objects in gcore, the
'CMakeFiles/GDAL.dir/build.make:2661:'
refers to ~/gdal/build/gcore/CMakeFiles/GDAL.dir/build.make, line 2661 that
is in the neighborhood of a problem at line 2667:
GEOS::geos_c-NOT FOUND
Well, that could be bad, and says the problem is local rather than with the
git.
Perhaps a sudo ldconfig is called for. Done.
In ~/gdal/build rm CMakeCache.txt
Run cmake .. again
Copy and paste all output to editor and down at bottom find
IMPORTED_LOCATION not set for imported target "GEOS::geos_c" configuration
  "Release".
OK, so not something that ldconfig fixes. Pass in libgeos...how?
Resorting to ccmake ..
Pg 25 of 44
GEOS_DIR  /usr/local/lib/cmake/GEOS
contains:
ls /usr/local/lib/cmake/GEOS
geos-config.cmake  geos-config-version.cmake  geos-targets.cmake
 local.cmake
So, nothing looking very useful, change to /usr/local/lib and try again
change to /usr/local/lib/libgeos_c.so
And try:
build$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
-DCMAKE_BUILD_TYPE=Release -DGEOS_DIR=/usr/local/lib/libgeos_c
And finally, this is where I am stuck.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220304/5b9dc41b/attachment.html>


More information about the gdal-dev mailing list