Giter Club home page Giter Club logo

buck2-python-toolchain-problem's Introduction

UPDATE: this is now a working hermetic python3 implementation!

Leaving the repro steps below for posterity.

Repro steps

Expected behavior

  1. Run buck2 build --target-platforms //:linux //:test on macOS or buck2 build --target-platforms //:macos //:test on Linux
  2. buck2 builds successfully because it knows to download python for the execution platform as opposed to the target platform.

Actual behavior

  1. Run buck2 build --target-platforms //:linux //:test on macOS or buck2 build --target-platforms //:macos //:test on Linux
  2. buck2 fails with the following error:
$ buck2 build --target-platforms //:linux //:test
Action failed: root//:test (json)
Local command returned non-zero exit code 126
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/root/21b199e98f91f821/__test__/json' buck-out/v2/gen/toolc ...<omitted>... n_file.py --arg hello ./world.txt --filename buck-out/v2/gen/root/21b199e98f91f821/__test__/out.json (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:
/Users/dan/devel/buck2-python-toolchain-problem/buck-out/v2/gen/toolchains/21b199e98f91f821-21b199e98f91f821/__python__/__python/python/install/bin/python3: /Users/dan/devel/buck2-python-toolchain-problem/buck-out/v2/gen/toolchains/21b199e98f91f821-21b199e98f91f821/__python__/__python/python/install/bin/python3: cannot execute binary file
Build ID: 84703265-25da-41e7-a709-b62506709b2c
Network: Up: 0B  Down: 34MiB
Jobs completed: 63. Time elapsed: 4.8s.
Cache hits: 0%. Commands: 2 (cached: 0, remote: 0, local: 2)
BUILD FAILED
Failed to build 'root//:test (root//:linux#21b199e98f91f821)'

Sure enought that's the Linux version of python, but I asked for the macOS version:

$ file buck-out/v2/gen/toolchains/21b199e98f91f821-21b199e98f91f821/__python__/__python/python/install/bin/python
buck-out/v2/gen/toolchains/21b199e98f91f821-21b199e98f91f821/__python__/__python/python/install/bin/python: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped

buck2-python-toolchain-problem's People

Contributors

jazzdan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.