-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Installation issue: gdal+lerc #31680
Description
Steps to reproduce the issue
spack install -j 16 --verbose --reuse [email protected]%[email protected]+python+png+curl+sqlite3 ^[email protected]+ssl ^[email protected]%[email protected]Error message
Error message
==> Error: NoLibrariesError: Unable to recursively locate lerc libraries in /sw/spack/hydrogpu-2022-06/apps/lerc/3.0-gcc-11.3.0-6qfhczi/mnt/a/sw/spack/spackgpu/develop-20220714/var/spack/repos/builtin/packages/gdal/package.py:398, in setup_run_environment:
395 libs = []
396 for dep in self.spec.dependencies(deptype='link'):
397 query = self.spec[dep.name]398 libs.extend(filter_system_paths(query.libs.directories))
399 if sys.platform == 'darwin':
400 env.prepend_path('DYLD_FALLBACK_LIBRARY_PATH', ':'.join(libs))
401 else:See build log for details:
/tmp/svcbwswmanage/spack-stage/spack-stage-gdal-3.5.1-s5t4d4w5dzr4y74cohvfpkqg54ohumqf/spack-build-out.txt
Information on your system
$ spack debug report
- Spack: 0.19.0.dev0 (875b032)
- Python: 3.6.8
- Platform: linux-rhel8-sandybridge
- Concretizer: clingo
Additional information
This seems similar to several other issues related to build problems where a dependency does not have a +shared variant. In this case, gdal depends on the lerc package, which produces apps/lerc/3.0-gcc-11.3.0-6qfhczi/lib64/liblerc.so. My workaround is to build gdal with ~lerc. Another solution is to add a libs() property to the lerc package.py. However, I think the logic in lib/spack/spack/spec.py for _libs_default_handler(descriptor, spec, cls)might be wrong. It seems like it should find liblerc.so for a package named "lerc" without requiring specific code, and I think the case where there is no +shared property is falling through the loop and throwing the NoLibrariesError when it should have found the library.
As I mentioned, this is fixable by changing lerc/package.py, but appears to apply to other packages as well.
spack-build-out.txt
spack-build-env.txt
Tagging @adamjstewart who maintains gdal, but this probably is not really a gdal issue. There is no maintainer for lerc listed by spack maintainers lerc
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have run
spack maintainers <name-of-the-package>and @mentioned any maintainers - I have uploaded the build log and environment files
- I have searched the issues of this repo and believe this is not a duplicate