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 Use v8-rs as dependency #73

Open
shashwatmi opened this issue Oct 30, 2023 · 0 comments
Open

Unable to Use v8-rs as dependency #73

shashwatmi opened this issue Oct 30, 2023 · 0 comments

Comments

@shashwatmi
Copy link

I cloned this repo and tried to use it with a project. I kept getting compile error.

Compiling rust_v8 v0.1.0 (/home/dashgrim/Hobby/rust_v8)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/dashgrim/.zi/polaris/sbin:/home/dashgrim/.zi/polaris/bin:/opt/google-cloud-sdk/bin:/home/dashgrim/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/dashgrim/.dotnet/tools:/opt/flutter/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "cc" "-m64" "/tmp/rustcmzpFj1/symbols.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.1xo0pw92zumni8ad.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.2j2kd6lpkr8qrsgv.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.3d53hqrbhu94juvd.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.3i4kwd0hjsfr6tj5.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.4gj1xyrmfaevv6dg.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.4ifwxznb7s04ewg1.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.57ffpxitl4mvysmm.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.xn638yckeg0496u.rcgu.o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329.4mo1byzqdfiveym3.rcgu.o" "-Wl,--as-needed" "-L" "/home/dashgrim/Hobby/rust_v8/target/debug/deps" "-L" "/home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out" "-L" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libv8_rs.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libtungstenite-9961ea8e8dfe173e.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libdata_encoding-281848dae1a21b66.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/librand-0a2b99a0426995d4.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/librand_chacha-8fcb5cd1b7859883.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libppv_lite86-9f7b2cf79ffaa1ac.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/librand_core-552b738e1c220784.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libgetrandom-b0d9a65cb35c8d46.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/liblibc-b4f8d4944d5e31bd.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libutf8-cfab47f8af6d4908.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libbyteorder-f3c18f300695b17d.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libsha1-28079daf4659fc6c.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libcpufeatures-1a1bb2803d18eb52.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libcfg_if-292db5e7ed008e20.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libdigest-08470a8d9e90dfd7.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libblock_buffer-fbe61f8189a599a5.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libcrypto_common-b41429ccba3653a9.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libgeneric_array-913787f76a7f1208.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libtypenum-167f102ced626c3a.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libhttparse-1f0d32fb3a9db302.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libthiserror-88c0e7ef58ab6d3e.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/liburl-878cde2bd28b809f.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libidna-1a7aa4133990cde9.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libunicode_normalization-9fe0753dcaacbf48.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libtinyvec-b3a8eaa4903d8283.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libtinyvec_macros-32fec4c241f716a3.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libunicode_bidi-ee6e4cf88b31a11a.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libform_urlencoded-c1228ad647521324.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libpercent_encoding-6835d1725645ad15.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/liblog-6f1659940e5e3d45.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libhttp-414e06c1212ea44b.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libbytes-bebbc22f39754596.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libfnv-eabbba41d4112d22.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libserde_aux-d5f06af58ab7b880.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libchrono-95b1d8f3e6d61234.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libnum_traits-fa93c336fb63c01e.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libiana_time_zone-1fdfb6dbb5b0bc6a.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libserde_json-e1d8ee33c79d7f89.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libryu-1b8c11fa54e87e65.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libitoa-e3e7cf5f838198a9.rlib" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/libserde-6fdcf79a985cbde3.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6498d8891e016dca.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-3debdee1a9058d84.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-8339c5bd5cbc92bf.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-160ebcebb54c11ba.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-95c75789f1b65e37.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7e8094f2d6258832.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-bac9783ef1b45db0.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-a1cd87df2f2d8e76.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-7fd06d468d7dba16.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-5ac19487656e05bf.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c7c35d32cf825c11.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-c523f1571362e70b.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-85f17c92b770a911.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-598d3ba148dadcea.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a58ec2dab545caa4.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-f9dda8cca149f0fc.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-7ba4c315dd7a3503.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5ac2993e19124966.rlib" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-df2fb7f50dec519a.rlib" "-Wl,-Bdynamic" "-lv8" "-lv8_monolith_debug" "-ldl" "-lc" "-lc" "-lm" "-lrt" "-lpthread" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/dashgrim/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/dashgrim/Hobby/rust_v8/target/debug/deps/rust_v8-226109a21f9f9329" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out/libv8_monolith_debug.a(bounded-page-allocator.o): in function `v8::base::BoundedPageAllocator::FreePages(void*, unsigned long)':
          ./../../src/base/bounded-page-allocator.cc:130:(.text+0xa11): undefined reference to `operator delete(void*)'
          /usr/bin/ld: ./../../src/base/bounded-page-allocator.cc:135:(.text+0xac5): undefined reference to `operator delete(void*)'
          /usr/bin/ld: /home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out/libv8_monolith_debug.a(bounded-page-allocator.o): in function `v8::base::BoundedPageAllocator::ReleasePages(void*, unsigned long, unsigned long)':
          ./../../src/base/bounded-page-allocator.cc:150:(.text+0xcbc): undefined reference to `operator delete(void*)'
          /usr/bin/ld: ./../../src/base/bounded-page-allocator.cc:164:(.text+0xe1d): undefined reference to `operator delete(void*)'
          /usr/bin/ld: ./../../src/base/bounded-page-allocator.cc:177:(.text+0xf24): undefined reference to `operator delete(void*)'
          /usr/bin/ld: /home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out/libv8_monolith_debug.a(bounded-page-allocator.o):./../../src/base/bounded-page-allocator.cc:181: more undefined references to `operator delete(void*)' follow
          /usr/bin/ld: /home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out/libv8_monolith_debug.a(bounded-page-allocator.o): in function `__cxx_global_var_init':
          ./../../build/linux/debian_bullseye_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:74:(.text.startup+0xc): undefined reference to `std::ios_base::Init::Init()'
          /usr/bin/ld: /home/dashgrim/Hobby/rust_v8/target/debug/build/v8_rs-cbc8ae7deaa11078/out/libv8_monolith_debug.a(bounded-page-allocator.o): in function `__cxx_global_var_init':
          ./../../src/base/bounded-page-allocator.cc:(.text.startup+0x13): undefined reference to `std::ios_base::Init::~Init()'

My Cargo file looks like this

[package]
name = "rust_v8"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
v8_rs = { path = "/home/dashgrim/Hobby/v8-rs" }
v8_rs_derive = { path = "/home/dashgrim/Hobby/v8-rs/v8-rs-derive" }

Am i doing something wrong?

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

1 participant