Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEX build fails with the following error: bad interpreter: No such file or directory #70

Open
vvgolikov opened this issue Apr 24, 2018 · 1 comment
Assignees

Comments

@vvgolikov
Copy link

vvgolikov commented Apr 24, 2018

When I run it with --verbose_failures it gives the following message:

ERROR: /home/vagolikov/.cache/bazel/_bazel_vagolikov/d41052656c7dd24d17b25cebd7e91d28/external/io_bazel_rules_pex/pex/BUILD:4:1: Bootstrapping pex @io_bazel_rules_pex//pex:pex_wrapper failed (Exit 126): bash failed: error executing command 
  (cd /home/vagolikov/.cache/bazel/_bazel_vagolikov/d41052656c7dd24d17b25cebd7e91d28/execroot/__main__ && \
  exec env - \
    LD_LIBRARY_PATH=/data/3rdparty/bpipe/blpapi_cpp_3.10.7.1/Linux:/usr/local/lib \
    PATH=/home/vagolikov/strategy_env/bin:/data/tools/edm/bin:/home/vagolikov/bin:/home/vagolikov/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/vagolikov/bin:/data/tools/edm/bin:/data/tools/eclipse:/data/apps/voltdb/voltdb-community-8.0/bin/ \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; 
        OUTDIR=$(cd bazel-out/host/bin/external/io_bazel_rules_pex/pex && pwd)
        # Workaround really long shebang lines breaking on linux:
        # Use a /tmp path, but keep the actual venv inside the bazel outdir.
        # Avoids having to worry about cleanup, even if sandboxing is off.
        TMPF=$(mktemp)
        ln -sf "$OUTDIR" "$TMPF"
        VENV="${TMPF}/venv"

        bazel-out/host/bin/external/virtualenv/virtualenv --no-download --quiet --clear "$VENV"
        PYTHON="$VENV/bin/python"

        $VENV/bin/pip install pex             --quiet --no-cache-dir --no-index --build bazel-out/host/bin/external/io_bazel_rules_pex/pex/pexbuild             --find-links $(dirname external/pex_src/file/pex-1.1.14.tar.gz)             --find-links $(dirname external/setuptools_src/file/setuptools-20.10.1.tar.gz)

        # Work around setuptools insistance on writing to the source directory,
        # which is discouraged by Bazel (and annoying)
        cp -r $(dirname external/io_bazel_rules_pex/pex/wrapper/setup.py) bazel-out/host/bin/external/io_bazel_rules_pex/pex/.pex_wrapper

        # Use the bootstrapped pex to build pex_wrapper.pex
        $VENV/bin/pex bazel-out/host/bin/external/io_bazel_rules_pex/pex/.pex_wrapper             --disable-cache --no-index -m pex_wrapper -o bazel-out/host/bin/external/io_bazel_rules_pex/pex/pex_wrapper.pex             --find-links $(dirname external/pex_src/file/pex-1.1.14.tar.gz)             --find-links $(dirname external/setuptools_src/file/setuptools-20.10.1.tar.gz)             --find-links $(dirname external/requests_src/file/requests-2.11.1.tar.gz)             --find-links $(dirname external/wheel_src/file/wheel-0.29.0.tar.gz)
    ')

se --sandbox_debug to see verbose messages from the sandbox
/bin/bash: /home/vagolikov/.cache/bazel/_bazel_vagolikov/d41052656c7dd24d17b25cebd7e91d28/bazel-sandbox/7332616064763773160/execroot/__main__/tmp/tmp.9sfXNTjQpu/venv/bin/pip: /home/vagolikov/.cache/bazel/_bazel_vagolikov/d41052656c7dd24d17b25cebd7e91d2: bad interpreter: No such file or directory
Target //src/python/word-count-topology:word-count-topology failed to build
@benley benley self-assigned this Apr 24, 2018
@vvgolikov
Copy link
Author

Version 0.8.0 is compatible with bazel_pex_rules. Version 0.7.0 is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants