Git Product home page Git Product logo

Comments (15)

mtoohey31 avatar mtoohey31 commented on May 23, 2024 8

I encountered the same issue while trying to build this project, if you examine the statement at libs/magnum-opus/build.rs:7:50 though, you'll see the statement:

    let vcpkg_root = std::env::var("VCPKG_ROOT").unwrap();

...which is looking for the VCPKG_ROOT environment variable. If this variable is not present, it will panic, so make sure you have correctly set this variable, as the build scripts instruct.

from rustdesk.

rustdesk avatar rustdesk commented on May 23, 2024 7

vcpkg

from rustdesk.

pagran avatar pagran commented on May 23, 2024 2

@15138381412 @TubaxCrypter try build using this command:

RUSTFLAGS="$RUSTFLAGS -A let_underscore_lock" cargo run

from rustdesk.

15138381412 avatar 15138381412 commented on May 23, 2024 1

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 an Err value: LexError { span: Span }', C:\Users\dfh.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.59.2\src\codegen\mod.rs:4577:66
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: 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 default
help: 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_common due to 3 previous errors
error: could not compile hbb_common due to 3 previous errors
When 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?

from rustdesk.

rustdesk avatar rustdesk commented on May 23, 2024

Does it work?

from rustdesk.

LighghtEeloo avatar LighghtEeloo commented on May 23, 2024

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 find magnum and opus separately, which is not working...

Could you tell me the right dependency to install?

from rustdesk.

rustdesk avatar rustdesk commented on May 23, 2024

from rustdesk.

LighghtEeloo avatar LighghtEeloo commented on May 23, 2024

Thanks! I'll give another try.

from rustdesk.

LighghtEeloo avatar LighghtEeloo commented on May 23, 2024

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...

from rustdesk.

mway-pappenberger avatar mway-pappenberger commented on May 23, 2024

I had the same issue. In my case export VCPKG_ROOT=$HOME/vcpkg didn't refer to the correct path. After echoing echo $HOME you can see where you are right now. Just change it to the right path and it should compile:

export VCPKG_ROOT=...

from rustdesk.

johnnyontheweb avatar johnnyontheweb commented on May 23, 2024

I had the same issue. In my case export VCPKG_ROOT=$HOME/vcpkg didn't refer to the correct path. After echoing echo $HOME you can see where you are right now. Just change it to the right path and it should compile:

export VCPKG_ROOT=...

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 for scrap 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 an Err value: ()', libs\scrap\build.rs:134:18
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: 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 an Err value: ()', C:\Users\Giovanni.cargo\git\checkouts\magnum-opus-4bb999f3bcbf6ab0\79be072\build.rs:128:18
note: run with RUST_BACKTRACE=1 environment 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.

from rustdesk.

QYH2MMT4EVER avatar QYH2MMT4EVER commented on May 23, 2024

hello bro ! I am stuck in the same problem !Have you solved this problem?could you give me some help?

from rustdesk.

QYH2MMT4EVER avatar QYH2MMT4EVER commented on May 23, 2024

Does it work?

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 an Err value: LexError { span: Span }', C:\Users\1.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.59.2\src\codegen\mod.rs:4577:66
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: 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!

from rustdesk.

TubaxCrypter avatar TubaxCrypter commented on May 23, 2024

I get magnum-opus v0.4.0 error after cargo run command. All components are installed in the system.
I am trying to do it on windows. Is there any way to fix the problem?

from rustdesk.

JohnnyStreet avatar JohnnyStreet commented on May 23, 2024

From the folder you cloned vcpkg, run vcpkg_bootstrap.bat and then vcpkg 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.

from rustdesk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.