omerbenamram / rules_python_pyo3_repro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rules_python_pyo3_repro

To reproduce:

bazel build //crate:wheel

The error:

ERROR: /workspaces/core/rules_python_pyo3_repro/crate/BUILD:3:20: Compiling Rust cdylib wheel (1 files) failed: (Exit 1): process_wrapper failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper --arg-file bazel-out/k8-fastbuild/bin/external/crate_index__libc-0.2.132/libc_build_script.linksearchpaths ... (remaining 44 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
warning: unused variable: `py`
  --> crate/lib.rs:11:13
   |
11 |         let py = gil.python();
   |             ^^ help: if this is intentional, prefix it with an underscore: `_py`
   |
   = note: `#[warn(unused_variables)]` on by default

error: linking with `/usr/bin/gcc` failed: exit status: 1
  |
  = note: "/usr/bin/gcc" "-Wl,--version-script=/tmp/rustcQm1RLK/list" "-m64" "/tmp/rustcQm1RLK/symbols.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.0.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.1.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.10.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.11.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.12.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.13.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.14.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.15.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.2.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.3.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.4.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.5.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.6.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.7.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.8.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.test_wheel.6a0e4594-cgu.9.rcgu.o" "bazel-out/k8-fastbuild/bin/crate/test_wheel.47rq6bnr9pmo2o8p.rcgu.o" "-Wl,--as-needed" "-L" "bazel-out/k8-fastbuild/bin/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "bazel-out/k8-fastbuild/bin/_solib_k8/_U@python_Ux86_U64-unknown-linux-gnu_S_S_Clibpython___Ulib" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__cfg-if-1.0.0" "-L" "bazel-out/k8-opt-exec-2B5CBBC6/bin/external/crate_index__indoc-impl-0.3.6" "-L" "bazel-out/k8-opt-exec-2B5CBBC6/bin/external/crate_index__proc-macro-hack-0.5.19" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__indoc-0.3.6" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__libc-0.2.132" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__instant-0.1.12" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__scopeguard-1.1.0" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__lock_api-0.4.7" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__smallvec-1.9.0" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__parking_lot_core-0.8.5" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__parking_lot-0.11.2" "-L" "bazel-out/k8-opt-exec-2B5CBBC6/bin/external/crate_index__paste-impl-0.1.18" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__paste-0.1.18" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__unindent-0.1.10" "-L" "bazel-out/k8-opt-exec-2B5CBBC6/bin/external/crate_index__pyo3-macros-0.15.2" "-L" "bazel-out/k8-fastbuild/bin/external/crate_index__pyo3-0.15.2" "-L" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lpython3.9" "-Wl,-Bstatic" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__pyo3-0.15.2/libpyo3-347917124.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__parking_lot-0.11.2/libparking_lot-562795347.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__parking_lot_core-0.8.5/libparking_lot_core-1026260461.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__smallvec-1.9.0/libsmallvec-2817645600.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__lock_api-0.4.7/liblock_api-1905824261.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__scopeguard-1.1.0/libscopeguard-3277956108.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__instant-0.1.12/libinstant-931817820.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__cfg-if-1.0.0/libcfg_if-2241051819.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__libc-0.2.132/liblibc-1459862495.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__unindent-0.1.10/libunindent-671975132.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__paste-0.1.18/libpaste-1452554666.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/execroot/__main__/bazel-out/k8-fastbuild/bin/external/crate_index__indoc-0.3.6/libindoc-326842318.rlib" "-Wl,--start-group" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-69edc9ac8de4d39c.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-254ac8a4d96ed89e.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-8bed7ede368468ef.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-9da1150e6aeada6b.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-dec39a40a22b358c.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7a90882341200e38.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-6a5da46a37549d0a.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-6dc3d1df7e408d5b.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-9d89ad14c568d44a.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-ecbdf47025adae10.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-29db3ffec771ef22.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8b55ad9e1a2080d1.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f37a55941b8b3bbd.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-c1d45d3d6971ce0d.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-18ac7cbb154ecd62.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-80c5909c82700e85.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-aa7f747e2f6af7d5.rlib" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-60d544c9f51ce476.rlib" "-Wl,--end-group" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d1bd89f2a607e488.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/vscode/.cache/bazel/_bazel_vscode/7255ddeb64dd9eef1a2f9716c8280c8f/external/rust_linux_x86_64__x86_64-unknown-linux-gnu_tools/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "bazel-out/k8-fastbuild/bin/crate/libtest_wheel.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs" "-Wl,-rpath,$ORIGIN/../_solib_k8/_U@python_Ux86_U64-unknown-linux-gnu_S_S_Clibpython___Ulib" "-fuse-ld=lld" "-Wl,-no-as-needed" "-Wl,-z,relro,-z,now" "-B/usr/bin" "-pass-exit-codes" "-ldl" "-lpthread" "-lstdc++" "-lm"
  = note: ld.lld: error: unable to find library -lpython3.9
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error; 1 warning emitted

Target //crate:wheel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 32.514s, Critical Path: 20.21s
INFO: 154 processes: 109 internal, 45 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

About


Languages

Language:Starlark 85.4%Language:Rust 14.6%