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

Unable to compile #54

Open
wizard-28 opened this issue May 3, 2022 · 3 comments
Open

Unable to compile #54

wizard-28 opened this issue May 3, 2022 · 3 comments

Comments

@wizard-28
Copy link

wizard-28 commented May 3, 2022

I'm getting this error when compiling inline-python

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.0.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.1.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.10.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.11.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.12.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.13.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.14.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.15.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.2.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.3.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.4.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.5.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.6.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.7.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.8.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.inline_python_macros.a5949a60-cgu.9.rcgu.o" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.1aaldkaizcu410n2.rcgu.rmeta" "/workspace/template-rust-cli/target/debug/deps/inline_python_macros-d8c450be921c21b0.2rcjdduas7srk696.rcgu.o" "-Wl,--as-needed" "-L" "/workspace/template-rust-cli/target/debug/deps" "-L" "/home/gitpod/.pyenv/versions/3.8.10/lib" "-L" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/workspace/template-rust-cli/target/debug/deps/libquote-21822fa3a38b8366.rlib" "/workspace/template-rust-cli/target/debug/deps/libpyo3-261546c4c3c07fdd.rlib" "/workspace/template-rust-cli/target/debug/deps/libparking_lot-f206223fe3856015.rlib" "/workspace/template-rust-cli/target/debug/deps/libparking_lot_core-0e9a36f432955d28.rlib" "/workspace/template-rust-cli/target/debug/deps/libsmallvec-283f2487fcc9f0f1.rlib" "/workspace/template-rust-cli/target/debug/deps/liblock_api-5df3ec707f3ec46c.rlib" "/workspace/template-rust-cli/target/debug/deps/libscopeguard-ff2bb1f39834214d.rlib" "/workspace/template-rust-cli/target/debug/deps/libinstant-e762c784f8da740e.rlib" "/workspace/template-rust-cli/target/debug/deps/libcfg_if-90e3626e3c41eec3.rlib" "/workspace/template-rust-cli/target/debug/deps/liblibc-d730512dede0fd57.rlib" "/workspace/template-rust-cli/target/debug/deps/libproc_macro2-6674289bb05aa6c8.rlib" "/workspace/template-rust-cli/target/debug/deps/libunicode_xid-868c8d90758e5924.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-d4ad3d96db4efeae.rlib" "-Wl,--start-group" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-202fc93d8ccaebf2.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1333333cbe389678.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-93491bde8b3642ba.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-d338f5690e3fda2f.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-2cd7f06709609788.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-05bd833c6cc845b5.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-5543e955d2b2e107.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-a963b8f78c0365f5.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-626bd4749ba5679b.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-1c5c08d77aa4ee1f.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-43c97e136c6f66b3.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-3ad551729ddf5bdf.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-46de9b9399df1cae.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-aa03de290f9594ce.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-020914c5936c5f85.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-89782a6344bc3ddf.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2a6a2797f7a73818.rlib" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib" "-Wl,--end-group" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-16d69221f10b0282.rlib" "-Wl,-Bdynamic" "-lpython3.8" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/gitpod/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/workspace/template-rust-cli/target/debug/deps/libinline_python_macros-d8c450be921c21b0.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/gitpod/.pyenv/versions/3.8.10/lib/libpython3.8.a(floatobject.o): relocation R_X86_64_PC32 against symbol `PyFloat_Type' can not be used when making a shared object; recompile with -fPIC
          /usr/bin/ld: final link failed: bad value
          collect2: error: ld returned 1 exit status
          

error: could not compile `inline-python-macros` due to previous error

This is my Cargo.toml:

[package]
name = "rust-starter"
version = "1.0.0"
edition = "2021"
description = "demo"

[dependencies]
inline-python = "0.8.0"
@Phosphorus-M
Copy link

Exactly the same problem. Some ideas about this?

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.0.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.1.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.10.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.11.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.12.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.13.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.14.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.15.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.2.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.3.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.4.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.5.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.6.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.7.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.8.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.inline_python_macros.150ace64-cgu.9.rcgu.o" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.33ngt6au0u8o8zvc.rcgu.rmeta" "/home/phosphorus/Projects/test-python/target/debug/deps/inline_python_macros-20a064d89e20cf82.2f57ipmp9k5fzy7f.rcgu.o" "-Wl,--as-needed" "-L" "/home/phosphorus/Projects/test-python/target/debug/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/phosphorus/Projects/test-python/target/debug/deps/libquote-36d0079c5cd39e3c.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libpyo3-89aa4611beb8ce8c.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libparking_lot-9033644475b73997.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libparking_lot_core-ffe7222eeccf53cf.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libsmallvec-283f2487fcc9f0f1.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/liblock_api-5df3ec707f3ec46c.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libscopeguard-ff2bb1f39834214d.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libinstant-e762c784f8da740e.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libcfg_if-90e3626e3c41eec3.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/liblibc-f7cc4e82b538969b.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libproc_macro2-8c9b68a29d31b344.rlib" "/home/phosphorus/Projects/test-python/target/debug/deps/libunicode_ident-2d8bc6a785d80132.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-e82e3b26940e74df.rlib" "-Wl,--start-group" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-91db243dd05c003b.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-72269a4525d4f5cf.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-28d8f1c01a28b12d.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5b78018a9f8ae4bc.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-f4160de9657f17b2.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-1cd8b958acdf2395.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-a4c4a7e7edfa8aea.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-061c02acc74ada37.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-2aed706f056a5dfb.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-1e1f90ff4bfdca6f.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-2d16c932daf0ad41.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8f15fae89f489a33.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-81f3d85dace75e64.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-e071db8735f10456.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-6db7e05a8de4df10.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-7c03f666869e802a.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2a6a2797f7a73818.rlib" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib" "-Wl,--end-group" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-b09abe545ed38eb1.rlib" "-Wl,-Bdynamic" "-lpython3.10" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/phosphorus/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/phosphorus/Projects/test-python/target/debug/deps/libinline_python_macros-20a064d89e20cf82.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: cannot find -lpython3.10: No such file or directory
          collect2: error: ld returned 1 exit status
          

error: could not compile `inline-python-macros` due to previous error

@lauglam
Copy link

lauglam commented Dec 10, 2022

@wizard-28
Copy link
Author

Works for me.

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

3 participants