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

Ubuntu 20.04编译完成但运行失败 #94

Closed
suiahae opened this issue Aug 20, 2020 · 5 comments
Closed

Ubuntu 20.04编译完成但运行失败 #94

suiahae opened this issue Aug 20, 2020 · 5 comments

Comments

@suiahae
Copy link

suiahae commented Aug 20, 2020

复现步骤

按照README的步骤进行编译,编译完成无报错.

$ cargo build --release

    Updating crates.io index
  Downloaded gstreamer-player v0.16.0
   ...
   Compiling async-std v1.6.3
   ...
   Compiling netease-cloud-music-gtk v1.1.2 (/home/ubtuee/Downloads/netease-cloud-music-gtk)
    Finished release [optimized] target(s) in 11m 41s

错误结果

但打包安装后发现无法使用,页面无法加载:
image
image

从命令行启动播放器,会显示报错信息:

$ ./netease-cloud-music-gtk 
thread 'async-std/runtime' panicked at 'cannot call `Executor::enter()` if already inside an `Executor`', /builddir/build/BUILD/rustc-1.45.2-src/src/libstd/macros.rs:13:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'async-std/runtime' panicked at 'cannot call `Executor::enter()` if already inside an `Executor`', /builddir/build/BUILD/rustc-1.45.2-src/src/libstd/macros.rs:13:23

补充信息

  1. 在async-std仓库的issue区找到了类似的问题:"Cannot run an executor inside another executor" - in tests async-rs/async-std#795 ("Cannot run an executor inside another executor" - in tests),开发者提交的更改 fix: allow for recursive block-on calls async-rs/async-std#799 称已解决此问题 "Cannot run an executor inside another executor" - in tests async-rs/async-std#795 。「疑惑」
  2. 目前可以使用的只有netease-cloud-music-gtk-ubuntu_18.04_1.1.2_amd64.deb和它内部的可执行文件netease-cloud-music-gtk,新编译的无法正常运行。编译失败的原因大概率为async-std等依赖项的更新导致的。

祝好

@gmg137
Copy link
Owner

gmg137 commented Aug 20, 2020

这应该是 async-std 1.6.3 新引入的 bug,临时解决可以修改Cargo.toml,把 async-std 的依赖版本改为 "=1.6.2"

@suiahae
Copy link
Author

suiahae commented Aug 20, 2020

这应该是 async-std 1.6.3 新引入的 bug,临时解决可以修改Cargo.toml,把 async-std 的依赖版本改为 "=1.6.2"

改过就可以了。但为什在Cargo.toml中依赖项版本写成"^version",而不是更稳定的"=version"呀?

@gmg137
Copy link
Owner

gmg137 commented Aug 20, 2020 via email

@suiahae
Copy link
Author

suiahae commented Aug 20, 2020

明白了

@gmg137
Copy link
Owner

gmg137 commented Aug 21, 2020

问题已修复

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

2 participants