Skip to content

glib not building on RedHat 7 with dtrace #6965

@luigi-calori

Description

@luigi-calori

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions