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

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


This generated file, local.cmake, seems to suggest that the build should
still be pointing (GEOS_DIR) /usr/local/lib/cmake/GEOS, but
GEOS::geos_c location still doesn't get set.
#----------------------------------------------------------------
# Generated CMake target import file for configuration
"Release-DCMAKE_INSTALL_PREFIX=/usr/local".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "GEOS::geos" for configuration
"Release-DCMAKE_INSTALL_PREFIX=/usr/local"
set_property(TARGET GEOS::geos APPEND PROPERTY IMPORTED_CONFIGURATIONS
RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL)
set_target_properties(GEOS::geos PROPERTIES
  IMPORTED_LOCATION_RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL
"${_IMPORT_PREFIX}/lib/libgeos.so.3.10.2"
  IMPORTED_SONAME_RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL
"libgeos.so.3.10.2"
  )

list(APPEND _IMPORT_CHECK_TARGETS GEOS::geos )
list(APPEND _IMPORT_CHECK_FILES_FOR_GEOS::geos
"${_IMPORT_PREFIX}/lib/libgeos.so.3.10.2" )

# Import target "GEOS::geos_c" for configuration
"Release-DCMAKE_INSTALL_PREFIX=/usr/local"
set_property(TARGET GEOS::geos_c APPEND PROPERTY IMPORTED_CONFIGURATIONS
RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL)
set_target_properties(GEOS::geos_c PROPERTIES

IMPORTED_LINK_DEPENDENT_LIBRARIES_RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL
"GEOS::geos"
  IMPORTED_LOCATION_RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL
"${_IMPORT_PREFIX}/lib/libgeos_c.so.1.16.0"
  IMPORTED_SONAME_RELEASE-DCMAKE_INSTALL_PREFIX=/USR/LOCAL "libgeos_c.so.1"
  )

list(APPEND _IMPORT_CHECK_TARGETS GEOS::geos_c )
list(APPEND _IMPORT_CHECK_FILES_FOR_GEOS::geos_c
"${_IMPORT_PREFIX}/lib/libgeos_c.so.1.16.0" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

On Fri, Mar 4, 2022 at 2:02 PM chris english <englishchristophera at gmail.com>
wrote:

> 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/10ecac96/attachment.html>


More information about the gdal-dev mailing list