spack/build_environment.py: Clean MAKEFLAGS, DISPLAY and TERM (#26092)

clean_environment(): Unset three more environment variables:

MAKEFLAGS: Affects make, can eg indirectly inhibit enabling parallel build
DISPLAY: Tests of GUI widget libraries might try to connect to an X server
TERM: Could make testsuites attempt to color their output
This commit is contained in:
bernhardkaindl 2021-09-22 00:23:10 +02:00 committed by GitHub
parent 92f199d57b
commit 979c355c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,6 +171,13 @@ def clean_environment():
env.unset('CMAKE_PREFIX_PATH')
# Affects GNU make, can e.g. indirectly inhibit enabling parallel build
env.unset('MAKEFLAGS')
# Could make testsuites attempt to color their output
env.unset('TERM')
# Tests of GUI widget libraries might try to connect to an X server
env.unset('DISPLAY')
# Avoid that libraries of build dependencies get hijacked.
env.unset('LD_PRELOAD')
env.unset('DYLD_INSERT_LIBRARIES')