spack: Problem installing Python 2.7.11

Surprisingly, I’m having problems installing Python 2.7.11 with Spack (CentOS 7). I have no problems with python@3:

$ spack install python@2.7:2.8

results in…

ux-x86_64/gcc-4.9.3/netcdf-4.4.0-rx32ppcgwsxk2fxbexopuwk3xvtvrqbd/lib:/home2/rpfische/spack/opt/spack/linux-x86_64/gcc-4.9.3/git-2.8.1-jacg3hncs6kq6gt5ctbjayu64lbnsaxv/lib64 ./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
    echo "generate-posix-vars failed" ; \
    rm -f ./pybuilddir.txt ; \
    exit 1 ; \
fi
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib64/python2.7/sysconfig.py", line 636, in <module>
    _main()
  File "/usr/lib64/python2.7/sysconfig.py", line 624, in _main
    _generate_posix_vars()
  File "/usr/lib64/python2.7/sysconfig.py", line 304, in _generate_posix_vars
    raise IOError(msg)
IOError: invalid Python installation: unable to open /tmp/rpfische/spack-stage/spack-stage-8orwGQ/Python-2.7.11/pyconfig-64.h (No such file or directory)
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1

Enclosed is the full build log; does anyone know why this might be happening?

spack_build.txt

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 25 (19 by maintainers)

Commits related to this issue

Most upvoted comments

@davydden I don’t think the essential problem comes from using prefix or prefix/lib and prefix/include although you are right that it would be another way to fix the current symptom . The deeper problem comes up whenever a general install prefix is used for multiple dependencies from outside of spack (e.g. /usr or /usr/local). If one wants to use package1 (openssl) from such a location but not package2 (python) that is also installed there, then it is necessary for the package2 replacement paths to come first on the compile/link line. If you remove /usr/local paths in filter_system_paths, then a dependency from there will not be found. This is why I was wondering if it might not be better to sort the paths.

The problem is caused because $SPACK_ROOT/lib/spack/env/cc adds libraries of dependencies to the rpath including /usr/lib and /usr/lib64.

I thought this shouldn’t happen since #2083, I’ll try to see tomorrow if I can reproduce the issue. Which OS are you on?