#977545 libnetcdf-mpi-dev: The provided CMake config file (netCDFConfig.cmake) refers to non-existing directories

Package:
libnetcdf-mpi-dev
Source:
netcdf-parallel
Description:
creation, access, and sharing of array-oriented scientific data
Submitter:
Julien Bigot
Date:
2026-08-04 15:53:03 UTC
Severity:
important
#977545#5
Date:
2020-12-16 14:53:16 UTC
From:
To:
Dear Maintainer,

Using the parallel version of NetCDF from CMake leads to invalid path found.

  The provided CMake config file is installed to the canonical path
/usr/lib/x86_64-linux-gnu/cmake/netCDF_mpi/netCDFConfig.cmake but in order
to be found by CMake, it must be used from the actual path
/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/cmake/netCDF/netCDFConfig.cmake
( Cf. https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure
on unix-like systems, the path has to contain either lib/ or share/ just
before the package name.) Hence I used the following command to build my
library depending on NetCDF:
```
cmake -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/netcdf/mpi/
```
This resulted in the following output:
```
CMake Error at /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/cmake/netCDF/netCDFConfig.cmake:25 (message):
  File or directory /usr/lib/x86_64-linux-gnu/netcdf/include referenced by
  variable netCDF_INCLUDE_DIR does not exist !
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/cmake/netCDF/netCDFConfig.cmake:33 (set_and_check)
  CMakeLists.txt:43 (find_package)
```

Indeed, netCDFConfig.cmake sets the variable netCDF_INCLUDE_DIR to
"${PACKAGE_PREFIX_DIR}/include" where PACKAGE_PREFIX_DIR is set to
"${CMAKE_CURRENT_LIST_DIR}/../../../../" (relative to netCDFConfig.cmake
actual path, i.e. /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/cmake/netCDF/)
  This resolves to PACKAGE_PREFIX_DIR=/usr/lib/x86_64-linux-gnu/netcdf and
then netCDF_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/netcdf/include that does
not exist (missing the mpi/ bit). The package libnetcdf-mpi-dev installs its
include files in /usr/lib/x86_64-linux-gnu/netcdf/mpi/include/

I tried to have a look at the source package on salsa to provide a patch,
however the link provided at
https://packages.debian.org/source/sid/netcdf-parallel regarding the Debian
Source Repository is inaccessible to me
( https://salsa.debian.org/mckinstry/netcdf-parallel ) is the
dev-coinstallable branch of https://salsa.debian.org/mckinstry/netcdf the new
canonical source for these packages?

Best regards,
Julien Bigot

#977545#10
Date:
2020-12-16 15:34:46 UTC
From:
To:
Please also note that trying to work-around the issue by specifying
`-DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/` to cmake
instead to leverage the recursive symlink
`/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/` -> `./`
and add an extra element to the path leads to another similar error:
```
CMake Error at /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/lib/cmake/netCDF/
netCDFConfig.cmake:25 (message):
  File or directory /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/x86_64-linux-gnu
  referenced by variable netCDF_LIB_DIR does not exist !
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/lib/cmake/netCDF/netCDFConfig.cmake:
34 (set_and_check)
  CMakeLists.txt:43 (find_package)
```

I believe both issues could be solved by creating the symlink
`/usr/lib/x86_64-linux-gnu/netcdf/mpi/lib/${DEB_HOST_MULTIARCH}` -> `../`
instead.

Best regards,
Julien Bigot

#977545#15
Date:
2026-08-04 15:51:38 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
netcdf-parallel, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 977545@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alastair McKinstry <mckinstry@debian.org> (supplier of updated netcdf-parallel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 02 Aug 2026 13:52:47 +0100
Source: netcdf-parallel
Architecture: source
Version: 1:4.10.1-1
Distribution: unstable
Urgency: medium
Maintainer: Alastair McKinstry <mckinstry@debian.org>
Changed-By: Alastair McKinstry <mckinstry@debian.org>
Closes: 977545 1003943 1036168 1123961
Changes:
 netcdf-parallel (1:4.10.1-1) unstable; urgency=medium
 .
   * New upstream release. Closes: #1123961
     Refresh patches
     Fixes: CVE-2025-14932, CVE-2025-14933, CVE-2025-14934,
            CVE-2025-14935, CVE-2025-14936
   * Update d/copyright
   * Update symbols files
   * Fix include path in pkgconfig files. Closes: #1036168, #977545, #1003943
   * d/rules: Ensure repeat builds works
Checksums-Sha1:
 0f99c7cce014952f439846ea92914c7592479530 2637 netcdf-parallel_4.10.1-1.dsc
 fb5b487f66ae12d81979c6fb558ef6deb7034633 25714348 netcdf-parallel_4.10.1.orig.tar.gz
 f5915a5989ee9fee42ad22db6ab9e671539bfefd 54756 netcdf-parallel_4.10.1-1.debian.tar.xz
 d85c8fcf867751a66827c54519e4441b786fb9f9 13947 netcdf-parallel_4.10.1-1_arm64.buildinfo
Checksums-Sha256:
 5dc8e3ad3808261dba7a76e2319f5867e893c596d4074e33da559964c66f951e 2637 netcdf-parallel_4.10.1-1.dsc
 33c27231c478c3b35da7c7758fbdd02da1fe407abcb16ddfe195f69d164f930d 25714348 netcdf-parallel_4.10.1.orig.tar.gz
 a34745b6eb5675b96481ce44c37180c04b672ebe35d66c405e4fb332de0003a9 54756 netcdf-parallel_4.10.1-1.debian.tar.xz
 c0443a580c291d5db09121fea8595b7e41cadf9d6cd305dbfd9c612dcffe17d3 13947 netcdf-parallel_4.10.1-1_arm64.buildinfo
Files:
 bcfca3a1febce62b2fb9cc26899fd0a4 2637 science optional netcdf-parallel_4.10.1-1.dsc
 9d56028b4032c67cd63b3cc5ae3e6b5f 25714348 science optional netcdf-parallel_4.10.1.orig.tar.gz
 ebe18278fd69c93a0d8b988a6ede4507 54756 science optional netcdf-parallel_4.10.1-1.debian.tar.xz
 a5566a083551f839e520ffb084e03118 13947 science optional netcdf-parallel_4.10.1-1_arm64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEgjg86RZbNHx4cIGiy+a7Tl2a06UFAmpyA7oACgkQy+a7Tl2a
06VS2w/+IMxRnAun0ccjtmKIba7AaieiTCb648gcB6SyULpBuAhyLYVh29P7+ife
eBTs8JyXV2gMAPV5370uIKxKt4nu/Bx73SaiFlUc6zZVgLshbRsMdt5PWkuf/oN4
h+gq+I/UGVv1yt6Clm7XqwP6Pgy2fRFTw7A0cG7aDH/Dk1MiSgyw4/lhB5KzUcki
FkwM2lHQxPw/uAbkTy7CsuW0iM1e6Z/61gq5StxLcMqRyeK58+C3c/bqEpy4B+IK
hmUOAAC8xPY0GSEAif/vXxmvBYpiTs5GwdpGvLtmAxQJ1JA0EoT6Gljwfxo6z/6q
gudGRiDF3KdJ+c1tFPxonJFfCzhVvgH6RHszoPwohhBucUgJOM/3p9WXMj07TRAe
6itzgTTIlrFHQb982JDL8XIN2+G09XD5pu2ZjqyUzXv1kS0IHd56756O2kLKjYHa
cBLkELUlnV9RQtHOSpB3R62R7gxiLbZDa/uEvwx3f/eOgrzcyrECe5tglg/rkVDv
jCv2p5tltZqOsYCUvBmaDfl1uffpUziM5gUuek7dxXn1G9FPgt4kqA+1S34Qkd8S
LVMO2oxjtTl1D1SMLvCpNgUBa0JG23LfunWNKrXp8gAYRd3T7F9ZgOw8PJ+bWJbl
wsnsGPwKbjFpoG2XCBwiupNzLrGW0UamvX4ZcYfRZtdVEv1tItU=
=/RUZ
-----END PGP SIGNATURE-----