From 90c824311372e1f10c218e467747298f601f1684 Mon Sep 17 00:00:00 2001 From: Mike Pozulp Date: Mon, 5 Mar 2018 04:28:37 -0800 Subject: [PATCH] add -ldl to silo ldflags when building with static hdf5 in order to fix #7384 (#7385) --- var/spack/repos/builtin/packages/silo/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 96b2f60b4b..e348f0003b 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -48,6 +48,11 @@ class Silo(Package): patch('remove-mpiposix.patch', when='@4.8:4.10.2') + def flag_handler(self, name, flags): + if name == 'ldflags' and self.spec['hdf5'].satisfies('~shared'): + flags.append('-ldl') + return (flags, None, None) + def install(self, spec, prefix): config_args = [ '--enable-fortran' if '+fortran' in spec else '--disable-fortran',