gdbm: fix lmod global name 'spack_cc' undefined (#7225)
Prior to this commit, running `spack module refresh` with `gdbm` installed throws the warning: ```console ==> Warning: Could not write module file [/Users/oxberry1/spack/share/spack/lmod/darwin-sierra-x86_64/Core/gdbm/1.14.1.lua] ==> Warning: --> global name 'spack_cc' is not defined <-- ``` This warning is repeated for every `gdbm` installation in Spack. The cause of the issue seems to be the same as in spack/spack (#6089): using `spack_cc`, `spack_cxx`, or similar inside `configure_args` causes the warnings to throw when module files are generated. Moving the use of `spack_cc` into `setup_environment` seems to fix the problem, even though it's a bit of a kludge.
This commit is contained in:
parent
8766daf9de
commit
c7274eb1f5
1 changed files with 3 additions and 1 deletions
|
@ -45,10 +45,12 @@ class Gdbm(AutotoolsPackage):
|
|||
|
||||
depends_on("readline")
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
spack_env.set('CC', spack_cc)
|
||||
|
||||
def configure_args(self):
|
||||
config_args = [
|
||||
'--enable-libgdbm-compat',
|
||||
'CC=%s' % spack_cc
|
||||
]
|
||||
|
||||
return config_args
|
||||
|
|
Loading…
Reference in a new issue