-
Notifications
You must be signed in to change notification settings - Fork 2.4k
glib not building on RedHat 7 with dtrace #6965
Description
On my redhat 7 that has dtrace installed, spack fail to build glib, this likely relates to PYTHONHOME being defined when depending on python, this makes system python scripts that sbang to system python exit with error
ImportError: No module named site
Summary
Expected Result
spack install glib
Actual Result
==> Applied patch no-Werror=format-security.patch
==> Building glib [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
'make' '-j48'
4 errors found in build log:
[ ... ]
562 Making all in glib
563 make[2]: Entering directory `/dev/shm/cibo19/spack-stage/spack-stage-giUdzE/glib-2.55.1/glib'
564 GEN glibconfig-stamp
565 GEN glib_probes.h
566 GEN glib_probes.lo
567 ImportError: No module named site
568 make[2]: *** [glib_probes.h] Error 1
569 make[2]: *** Waiting for unfinished jobs....
570 ImportError: No module named site
571 make[2]: *** [glib_probes.lo] Error 1
Steps to reproduce the issue
$ which dtrace
$ head $(which dtrace)
$ dtrace
Usage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>] ### OK
$ spack install --keep-stage [email protected]%[email protected]
$ spack env [email protected]%[email protected] dtrace
ImportError: No module named site ### python error
$ spack env [email protected]%[email protected] /bin/bash
$ dtrace
ImportError: No module named site ### python error
$ unset PYTHONHOME
$ dtrace
Usage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>] ### OK