Using host python

20 views
Skip to first unread message

Miguel Angel Salazar de Troya

unread,
May 13, 2016, 12:08:09 PM5/13/16
to hashdist
Hello

I am trying to install FEniCS using hashdist (and the standard profile https://bitbucket.org/fenics-project/fenics-developer-tools/src/1f0004e74673136538c9356fcf8a17bf68f4ad92/install/profiles/fenics.Linux.yaml?at=master&fileviewer=file-view-default) I changed it to use host python, so I typed the options

python:
  host: true
  use_python_host_packages: true

but I get this error:

[python] Building python/hpcbop7xg4vh, follow log with:
[python]   tail -f /home/miguel/.hashdist/tmp/python-hpcbop7xg4vh-3/_hashdist/build.log
[python|ERROR] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 127
[python|ERROR] command failed (code=127); raising

So I go to the build.log file and I see:

2016/05/13 08:26:47 - INFO: [package:run_job] running [u'/bin/bash', '_hashdist/build.sh']
2016/05/13 08:26:47 - INFO: [package:run_job] environment:
2016/05/13 08:26:47 - INFO: [package:run_job]   {'ARTIFACT': u'/home/miguel/.hashdist/bld/python/hpcbop7xg4vh',
2016/05/13 08:26:47 - INFO: [package:run_job]    'BASH': u'/bin/bash',
2016/05/13 08:26:47 - INFO: [package:run_job]    'BUILD': u'/home/miguel/.hashdist/tmp/python-hpcbop7xg4vh-1',
2016/05/13 08:26:47 - INFO: [package:run_job]    'HASHDIST_CPU_COUNT': '4',
2016/05/13 08:26:47 - INFO: [package:run_job]    'HDIST_CONFIG': '{"gc_roots":"/home/miguel/.hashdist/gcroots","build_stores":[{"dir":"/home/miguel/.hashdist/bld"}],"source_caches":[{"dir":"/home/miguel/.hashdist/src"}],"cache":"/home/miguel/.hashdist/cache","build_temp":"/home/miguel/.hashdist/tmp"}',
2016/05/13 08:26:47 - INFO: [package:run_job]    'HDIST_IMPORT': '',
2016/05/13 08:26:47 - INFO: [package:run_job]    'HDIST_IMPORT_PATHS': '',
2016/05/13 08:26:47 - INFO: [package:run_job]    'HDIST_VIRTUALS': '',
2016/05/13 08:26:47 - INFO: [package:run_job]    'PATH': u'/usr/bin:/bin',
2016/05/13 08:26:47 - INFO: [package:run_job]    'PWD': u'/home/miguel/.hashdist/tmp/python-hpcbop7xg4vh-1'}
2016/05/13 08:26:47 - INFO: [package:run_job] _hashdist/build.sh: line 3: -c: command not found
2016/05/13 08:26:47 - ERROR: [package:run_job] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 127
2016/05/13 08:26:47 - ERROR: [package:run_job] command failed (code=127); raising

then I go to the _hashdist/build.sh script and I see:

set -e
export HDIST_IN_BUILD=yes
PYTHON_DIR=$( -c "import sys;sys.stdout.write(sys.prefix)")
mkdir ${ARTIFACT}/bin
ln -s ${PYTHON_DIR}/bin/python2.7 ${ARTIFACT}/bin/python2.7
ln -s ${PYTHON_DIR}/bin/python2.7-config ${ARTIFACT}/bin/python2.7-config
ln -s python2.7 ${ARTIFACT}/bin/python
ln -s python2.7-config ${ARTIFACT}/bin/python-config

line 3 is: PYTHON_DIR=$( -c "import sys;sys.stdout.write(sys.prefix)")

Should not there be something in front of "-c" to tell bash to use python?

Thanks
Miguel

Johannes Ring

unread,
May 13, 2016, 12:42:01 PM5/13/16
to hashdist

The HOST_PYTHON parameter must be set when using host python. You can either set it in your profile or you can extend from for instance debian.yaml instead of linux.yaml.

Johannes


--
You received this message because you are subscribed to the Google Groups "hashdist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hashdist+u...@googlegroups.com.
To post to this group, send email to hash...@googlegroups.com.
Visit this group at https://groups.google.com/group/hashdist.
To view this discussion on the web visit https://groups.google.com/d/msgid/hashdist/891d6bea-70dd-4bb8-a167-0ca340845219%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages