netcdf-c icon indicating copy to clipboard operation
netcdf-c copied to clipboard

ConfigPackageLocation needs to be absolute path

Open DennisHeimbigner opened this issue 1 year ago • 4 comments

Using cmake version 3.28.3 under Cygwin.

When I started using the new changes to the cmake build, I encountered this error

CMake Error at /usr/share/cmake-3.28.3/Modules/CMakePackageConfigHelpers.cmake:275 (file):
  file RELATIVE_PATH must be passed a full path to the directory:
  d:/tmp/netcdf/lib/cmake/netCDF
Call Stack (most recent call first):
  CMakeLists.txt:1807 (configure_package_config_file)

Has anyone else seen this?

DennisHeimbigner avatar Mar 15 '24 18:03 DennisHeimbigner

Could you post a longer file but add the --trace-expand option to cmake? It will add A LOT more output, but could help figure out what exactly cmake is mad about

K20shores avatar Mar 18 '24 16:03 K20shores

That is a distinctly odd path to see on Cygwin (/cygdrive/d/tmp/netcdf/lib/cmake/netCDF would be more common): did you add CMake and Ninja to the package-install list? I've gotten netCDF to compile on Cygwin using CMake, but then it crashes when I try running the tests.

DWesl avatar Apr 04 '24 16:04 DWesl

@DennisHeimbigner as I recall there is a cygwin environmental variable which can be used to modify the pathing scheme cygwin uses. I forget what it is, off the top of my head, but could that be at play here?

WardF avatar Apr 04 '24 16:04 WardF

CYGWIN and CYGWIN_NOWINPATH (alternate description) are the environment variables that I know of that affect Cygwin path handling, but neither of those mention that kind of path handling.

Support for Windows absolute paths varies on Cygwin: some programs handle them just fine, others see they start with a letter and decide they're relative paths, which results in some odd file names, especially if you don't notice for a while.

Current attempt to use CMake on Cygwin is here

DWesl avatar Apr 05 '24 15:04 DWesl