surrealdb / surrealdb.py

SurrealDB SDK for Python
https://surrealdb.com
Apache License 2.0
170 stars 49 forks source link

Bug: Failed while Installing surrealdb from github repo #68

Closed samdace closed 10 months ago

samdace commented 10 months ago

Describe the bug

I have both python and rust installed ( i already use them in work ) , i tried to install the with-no rust runtime library but it fails to build and outputs an error message related to cross_beam channel compile error .

Compiling crossbeam-channel v0.5.8 Running rustc --crate-name crossbeam_channel --edition=2018 C:\Users\zaki2\.cargo\registry\src\github.com-1ecc6299db9ec823\crossbeam-channel-0.5.8\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg "feature=\"crossbeam-utils\"" --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=7d555cfdae4e1b1b -C extra-filename=-7d555cfdae4e1b1b --out-dir C:\Users\zaki2\AppData\Local\Temp\pip-req-build-ctjhnckw\target\release\deps -L dependency=C:\Users\zaki2\AppData\Local\Temp\pip-req-build-ctjhnckw\target\release\deps --extern cfg_if=C:\Users\zaki2\AppData\Local\Temp\pip-req-build-ctjhnckw\target\release\deps\libcfg_if-537c6f8aaba5b4b9.rmeta --extern crossbeam_utils=C:\Users\zaki2\AppData\Local\Temp\pip-req-build-ctjhnckw\target\release\deps\libcrossbeam_utils-2621beb9f2d66a0d.rmeta --cap-lints allow error: future cannot be sent between threads safely --> C:\Users\zaki2.cargo\git\checkouts\surrealdb-8c51c5db53af7153\ee3a1c2\lib\src\dbs\iterator.rs:427:2 427 #[async_recursion] ^^^^^^^^^^^^^^^^^^ future created by async block is not Send
      = help: within `[async block@C:\Users\zaki2\.cargo\git\checkouts\surrealdb-8c51c5db53af7153\ee3a1c2\lib\src\dbs\iterator.rs:427:2: 427:20]`, the trait `std::marker::Send` is not implemented for `*const async_executor::State`
  note: future is not `Send` as this value is used across an await
     --> C:\Users\zaki2\.cargo\registry\src\github.com-1ecc6299db9ec823\async-executor-1.5.2\src\lib.rs:936:17
      |
  889 |                 let mut old = with_waker(|waker| {
      |                     ------- has type `std::option::Option<async_executor::LocalQueue>` which is not `Send`
  ...
  936 |                 .await
      |                 ^^^^^^ await occurs here, with `mut old` maybe used later
  937 |             }
      |             - `mut old` is later dropped here
      = note: required for the cast from `[async block@C:\Users\zaki2\.cargo\git\checkouts\surrealdb-8c51c5db53af7153\ee3a1c2\lib\src\dbs\iterator.rs:427:2: 427:20]` to the object type `dyn futures::Future<Output = std::result::Result<(), err::Error>> + std::marker::Send`
      = note: this error originates in the attribute macro `async_recursion` (in Nightly builds, run with -Z macro-backtrace for more info)

  error: could not compile `surrealdb` due to previous error

Steps to reproduce

using python 3.10 run pip install git+https://github.com/surrealdb/surrealdb.py@rust-no-runtime

Expected behaviour

i expect the library to just compile with no problems since python and rust already exist

SurrealDB version

surreal 1.0.0-beta.8+20220930.c246533 for windows on x86_64

surrealdb.py version

surrealdb-beta 0.0.3

Contact Details

houssem.uchiha@gmail.com

Is there an existing issue for this?

Code of Conduct

samdace commented 10 months ago

solved by making sure that only one compiler exists in the machine