mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 19:26:56 -05:00
Failed to build on Manjaro 21.0.1 #14
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk-rustdesk#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LighghtEeloo on GitHub (Apr 11, 2021).
A library maintained by the author failed to build with:
I'm new to Rust and is looking for a word of inspiration; you don't need to tell me everything, just a place to start is enough for me. I guess this is easy, so don't feel upset for this newbie question.
@rustdesk commented on GitHub (Apr 11, 2021):
vcpkg
@rustdesk commented on GitHub (Apr 28, 2021):
Does it work?
@LighghtEeloo commented on GitHub (Apr 30, 2021):
No...
I guess the real problem is missing
magnum-opus, which I'm still trying to find where I can install. In fact, I can only findmagnumandopusseparately, which is not working...Could you tell me the right dependency to install?
@rustdesk commented on GitHub (Apr 30, 2021):
check out new readme, there is debian and fedora build script.
https://github.com/rustdesk/rustdesk#how-to-build-on-linux
@LighghtEeloo commented on GitHub (Apr 30, 2021):
Thanks! I'll give another try.
@LighghtEeloo commented on GitHub (Apr 30, 2021):
In fact, what you've just updated still can't provide
magnum-opus. I've placed the sciter lib, yet I'm still stuck with the dependency...@mtoohey31 commented on GitHub (Jun 19, 2021):
I encountered the same issue while trying to build this project, if you examine the statement at
libs/magnum-opus/build.rs:7:50though, you'll see the statement:...which is looking for the
VCPKG_ROOTenvironment variable. If this variable is not present, it will panic, so make sure you have correctly set this variable, as the build scripts instruct.@mway-pappenberger commented on GitHub (Jul 12, 2022):
I had the same issue. In my case
export VCPKG_ROOT=$HOME/vcpkgdidn't refer to the correct path. Afterechoing echo $HOMEyou can see where you are right now. Just change it to the right path and it should compile:export VCPKG_ROOT=...@johnnyontheweb commented on GitHub (Jan 24, 2023):
I'm on Windows and fixing system variable does not solve the problem. VCPKG_ROOT path is correct. This is the complete error:
error: failed to run custom build command forscrap v0.5.0 (C:\Users\Giovanni.cargo\rustdesk\libs\scrap)`Caused by:
process didn't exit successfully:
C:\Users\Giovanni\.cargo\rustdesk\target\debug\build\scrap-439b97e8b6f672fb\build-script-build(exit code: 101)--- stdout
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=yuv
cargo:rustc-link-search=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\include
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=vpx
cargo:rustc-link-search=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\include
rerun-if-changed=C:\Users\Giovanni.cargo\rustdesk\libs\scrap\vpx_ffi.h
rerun-if-changed=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\include
--- stderr
C:\Users\Giovanni.cargo\rustdesk\libs\scrap\vpx_ffi.h:1:10: fatal error: 'vpx/vp8.h' file not found
C:\Users\Giovanni.cargo\rustdesk\libs\scrap\vpx_ffi.h:1:10: fatal error: 'vpx/vp8.h' file not found, err: true
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: ()', libs\scrap\build.rs:134:18note: run with
RUST_BACKTRACE=1environment variable to display a backtracewarning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for
magnum-opus v0.4.0 (https://github.com/rustdesk/magnum-opus#79be072c)Caused by:
process didn't exit successfully:
C:\Users\Giovanni\.cargo\rustdesk\target\debug\build\magnum-opus-41b25c55ce0c06c3\build-script-build(exit code: 101)--- stdout
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=opus
cargo:rustc-link-search=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\include
rerun-if-changed=C:\Users\Giovanni.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\79be072\opus_ffi.h
rerun-if-changed=C:\Users\Giovanni.cargo\vcpkg\installed\x64-windows-static\include
--- stderr
C:\Users\Giovanni.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\79be072\opus_ffi.h:1:10: fatal error: 'opus/opus_multistream.h' file not found
C:\Users\Giovanni.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\79be072\opus_ffi.h:1:10: fatal error: 'opus/opus_multistream.h' file not found, err: true
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: ()', C:\Users\Giovanni.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\79be072\build.rs:128:18note: run with
RUST_BACKTRACE=1environment variable to display a backtrace`as you can see, opus/opus_multistream.h cannot be found because it is under VCPKG_ROOT\buildtrees . Maybe error installing vcpkg?
ps.
in https://rustdesk.com/docs/en/dev/build/windows/ all the backslashes are wrong.
@QYH2MMT4EVER commented on GitHub (Mar 5, 2023):
hello bro ! I am stuck in the same problem !Have you solved this problem?could you give me some help?
@QYH2MMT4EVER commented on GitHub (Mar 5, 2023):
C:\Users\1\rustdesk>cargo run
Compiling protobuf-parse v3.2.0
Compiling zstd-sys v1.6.2+zstd.1.5.1
Compiling zstd-safe v4.1.3+zstd.1.5.1
Compiling tokio-util v0.7.4
Compiling flutter_rust_bridge_codegen v1.61.1
Compiling tokio-rustls v0.23.4
Compiling webm-sys v1.0.3
Compiling mio-named-pipes v0.1.7
Compiling scrap v0.5.0 (C:\Users\1\rustdesk\libs\scrap)
Compiling windows v0.30.0
Compiling digest v0.10.6
Compiling encoding_rs v0.8.31
Compiling tfc v0.6.1 (https://github.com/fufesou/The-Fat-Controller#a5f13e6e)
Compiling url v2.3.1
Compiling winit v0.26.1
Compiling clipboard-win v4.4.2
Compiling webm v1.0.2
Compiling zstd v0.9.2+zstd.1.5.1
Compiling winreg v0.10.1
Compiling num-bigint v0.4.3
Compiling serde_json v1.0.89
error: failed to run custom build command for
scrap v0.5.0 (C:\Users\1\rustdesk\libs\scrap)Caused by:
process didn't exit successfully:
C:\Users\1\rustdesk\target\debug\build\scrap-80d6c6f8afe2291c\build-script-build(exit code: 101)--- stdout
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=yuv
cargo:rustc-link-search=C:\Users\1\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\1\vcpkg\installed\x64-windows-static\include
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=vpx
cargo:rustc-link-search=C:\Users\1\vcpkg\installed\x64-windows-static\lib
cargo:include=C:\Users\1\vcpkg\installed\x64-windows-static\include
rerun-if-changed=C:\Users\1\rustdesk\libs\scrap\vpx_ffi.h
rerun-if-changed=C:\Users\1\vcpkg\installed\x64-windows-static\include
--- stderr
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: LexError { span: Span }', C:\Users\1.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.59.2\src\codegen\mod.rs:4577:66note: run with
RUST_BACKTRACE=1environment variable to display a backtracewarning: build failed, waiting for other jobs to finish...
what should i do to fix up this problem ! plz help me ! I did everything as your guide but still dese not work!
@15138381412 commented on GitHub (Apr 5, 2023):
D:\Rust\project\RustDeskV1.19\rustdesk>cargo run
Compiling hbb_common v0.1.0 (D:\Rust\project\RustDeskV1.19\rustdesk\libs\hbb_common)
Compiling confy v0.4.0 (https://github.com/open-trade/confy#630cc28a)
Compiling scrap v0.5.0 (D:\Rust\project\RustDeskV1.19\rustdesk\libs\scrap)
Compiling rpassword v6.0.1
Compiling systray v0.4.1 (https://github.com/liyue201/systray-rs#84cca4b4)
Compiling base64 v0.13.0
Compiling whoami v1.2.1
error: failed to run custom build command for
scrap v0.5.0 (D:\Rust\project\RustDeskV1.19\rustdesk\libs\scrap)Caused by:
process didn't exit successfully:
D:\Rust\project\RustDeskV1.19\rustdesk\target\debug\build\scrap-183e9c06fe093478\build-script-build(exit code: 101)--- stdout
cargo:rustc-link-search=native=D:\Rust\work\vcpkg\installed\x64-windows-static\lib
cargo:rustc-link-lib=yuv
cargo:rustc-link-lib=jpeg
cargo:rustc-link-lib=turbojpeg
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=yuv
cargo:rustc-link-search=D:\Rust\work\vcpkg\installed\x64-windows-static\lib
cargo:include=D:\Rust\work\vcpkg\installed\x64-windows-static\include
cargo:rustc-link-search=native=D:\Rust\work\vcpkg\installed\x64-windows-static\lib
cargo:rustc-link-lib=vpx
cargo:info=x64-windows-static
cargo:rustc-link-lib=static=vpx
cargo:rustc-link-search=D:\Rust\work\vcpkg\installed\x64-windows-static\lib
cargo:include=D:\Rust\work\vcpkg\installed\x64-windows-static\include
rerun-if-changed=D:\Rust\project\RustDeskV1.19\rustdesk\libs\scrap\vpx_ffi.h
rerun-if-changed=D:\Rust\work\vcpkg\installed\x64-windows-static\include
--- stderr
thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: LexError { span: Span }', C:\Users\dfh.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.59.2\src\codegen\mod.rs:4577:66note: run with
RUST_BACKTRACE=1environment variable to display a backtracewarning: build failed, waiting for other jobs to finish...
error: non-binding let on a synchronization lock
--> libs\hbb_common\src\config.rs:659:13
|
659 | let _ = CONFIG.read().unwrap(); // for lock
| ^ ^^^^^^^^^^^^^^^^^^^^^^ this binding will immediately drop the value assigned to it
| |
| this lock is not assigned to a binding and is immediately dropped
|
= note:
#[deny(let_underscore_lock)]on by defaulthelp: consider binding to an unused variable to avoid immediately dropping the value
|
659 | let _unused = CONFIG.read().unwrap(); // for lock
| ~~~~~~~
help: consider immediately dropping the value
|
659 | drop(CONFIG.read().unwrap()); // for lock
| ~~~~~ +
error: non-binding let on a synchronization lock
--> libs\hbb_common\src\config.rs:670:13
|
670 | let _ = CONFIG.read().unwrap(); // for lock
| ^ ^^^^^^^^^^^^^^^^^^^^^^ this binding will immediately drop the value assigned to it
| |
| this lock is not assigned to a binding and is immediately dropped
|
help: consider binding to an unused variable to avoid immediately dropping the value
|
670 | let _unused = CONFIG.read().unwrap(); // for lock
| ~~~~~~~
help: consider immediately dropping the value
|
670 | drop(CONFIG.read().unwrap()); // for lock
| ~~~~~ +
error: non-binding let on a synchronization lock
--> libs\hbb_common\src\config.rs:811:13
|
811 | let _ = CONFIG.read().unwrap(); // for lock
| ^ ^^^^^^^^^^^^^^^^^^^^^^ this binding will immediately drop the value assigned to it
| |
| this lock is not assigned to a binding and is immediately dropped
|
help: consider binding to an unused variable to avoid immediately dropping the value
|
811 | let _unused = CONFIG.read().unwrap(); // for lock
| ~~~~~~~
help: consider immediately dropping the value
|
811 | drop(CONFIG.read().unwrap()); // for lock
| ~~~~~ +
error: could not compile
hbb_commondue to 3 previous errorserror: could not compile
hbb_commondue to 3 previous errorsWhen I directly run the source code of Version 1.1.9, I encountered this problem. However, the latest version V1.2.0 did not have this issue. Does anyone know how to fix it?
@TubaxCrypter commented on GitHub (Apr 11, 2023):
I get
magnum-opus v0.4.0error aftercargo runcommand. All components are installed in the system.I am trying to do it on windows. Is there any way to fix the problem?
@pagran commented on GitHub (Apr 14, 2023):
@15138381412 @TubaxCrypter try build using this command:
@JohnnyStreet commented on GitHub (Aug 4, 2023):
From the folder you cloned vcpkg, run
vcpkg_bootstrap.batand thenvcpkg update. It did not work on the checkout head they recommended so I just used the latest which works (for now) but then you get to a missing vp8.h which is where I'm currently stuck.@thinfell commented on GitHub (Jun 4, 2024):
我自己解决了 这个问题 问题的原因 我大概分析出来了
1.进行 cargo 运行时 它会去找vcpkg VCPKG_ROOT/installed/[对应的操作系统,例如:x64-linux,arm64-android]/lib
2.你有时候不注意,以为已经vcpkg安装了所有需要的依赖, 但是你没注意,上面的 [对应的操作系统,例如:x64-linux,arm64-android] 对应的目录里面是不对应的, 你默认安装 例如 vcpkg install libvpx 这个可能安装到x64-linux目录 但是你此时是用arm64-android目录的依赖 这样就莫名其妙的找不到,明明好像已经安装了.
3.针对2的问题 你最好把每个 [对应的操作系统,例如:x64-linux,arm64-android] 对应的依赖都安装一次,安装方法
重复安装对应的每个目录
4.感谢大家看完,我是这样解决这个问题的,因为我看了好多解决办法,都没能解决我的问题.