Skip to content

Conversation

@lrinQVQ
Copy link

@lrinQVQ lrinQVQ commented May 12, 2025

The hbb_common Submodule was accidentally deleted in c650217

The hbb_common Submodule was accidentally deleted in rustdesk@c650217
@stappersg
Copy link
Contributor

The hbb_common Submodule was accidentally deleted in c650217

Ah, that explains why it felt wrong.

@stappersg
Copy link
Contributor

stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ cargo build --release
error: failed to load manifest for workspace member `/usr/src/rust/rustdesk/rustdesk-server/libs/hbb_common`
referenced by workspace at `/usr/src/rust/rustdesk/rustdesk-server/Cargo.toml`

Caused by:
  failed to read `/usr/src/rust/rustdesk/rustdesk-server/libs/hbb_common/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$

So re-inventing the workaround ...

@stappersg
Copy link
Contributor

So re-inventing the workaround ...

That didn't work, download a fresh copy did neither help.

Help is apriceated

@lrinQVQ
Copy link
Author

lrinQVQ commented Jul 20, 2025

stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ cargo build --release
error: failed to load manifest for workspace member `/usr/src/rust/rustdesk/rustdesk-server/libs/hbb_common`
referenced by workspace at `/usr/src/rust/rustdesk/rustdesk-server/Cargo.toml`

Caused by:
  failed to read `/usr/src/rust/rustdesk/rustdesk-server/libs/hbb_common/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$

So re-inventing the workaround ...
cd /usr/src/rust/rustdesk/rustdesk-server
git submodule update --init --recursive

@stappersg
Copy link
Contributor

Please merge, please do accept the merge request.

Long version:

stappers@messer:~
$ mkdir retry
stappers@messer:~
$ cd retry
stappers@messer:~/retry
$ git clone --recurse-submodules https://github.com/rustdesk/rustdesk-server.git
Cloning into 'rustdesk-server'...
remote: Enumerating objects: 2347, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 2347 (delta 5), reused 2 (delta 2), pack-reused 2333 (from 2)
Receiving objects: 100% (2347/2347), 1.70 MiB | 217.00 KiB/s, done.
Resolving deltas: 100% (1240/1240), done.
stappers@messer:~/retry
$ cd rustdesk-server/
stappers@messer:~/retry/rustdesk-server
$ git submodule 
stappers@messer:~/retry/rustdesk-server
$ cargo build
error: failed to load manifest for dependency `hbb_common`

Caused by:
  failed to read `/home/stappers/retry/rustdesk-server/libs/hbb_common/Cargo.toml`

Caused by:
  Not a directory (os error 20)
stappers@messer:~/retry/rustdesk-server
$

That build error is the reason why this merge request exist.

stappers@messer:~/retry/rustdesk-server
$ git remote add lrinqvq https://github.com/lrinQVQ/rustdesk-server.git
stappers@messer:~/retry/rustdesk-server
$ git fetch lrinqvq 
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 3 (delta 1), reused 1 (delta 1), pack-reused 2 (from 1)
Unpacking objects: 100% (3/3), 381 bytes | 381.00 KiB/s, done.
From https://github.com/lrinQVQ/rustdesk-server
 * [new branch]      master     -> lrinqvq/master
Could not access submodule 'libs/hbb_common' at commit 2bd9aae
stappers@messer:~/retry/rustdesk-server
$ git submodule 
stappers@messer:~/retry/rustdesk-server
$ git cherry-pick 2bd9aae
[master 04b6f88] libs: Fix hbb_common Submodule
 Author: lrinQVQ <[email protected]>
 Date: Mon May 12 18:46:19 2025 +0800
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 160000 libs/hbb_common
stappers@messer:~/retry/rustdesk-server
$ git submodule 
-83419b6549636ee39dacef7776c473f5802e08d6 libs/hbb_common
stappers@messer:~/retry/rustdesk-server
$            

That is the first time of a sign of a submodule. ( The previous git submodule executions had no output. )

stappers@messer:~/retry/rustdesk-server
$ cargo build
error: failed to load manifest for workspace member `/home/stappers/retry/rustdesk-server/libs/hbb_common`
referenced by workspace at `/home/stappers/retry/rustdesk-server/Cargo.toml`

Caused by:
  failed to read `/home/stappers/retry/rustdesk-server/libs/hbb_common/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
stappers@messer:~/retry/rustdesk-server
$

Now the advice from @lrinQVQ , the part I forgot:

stappers@messer:~/retry/rustdesk-server
$ git submodule update --init --recursive
Submodule 'libs/hbb_common' (https://github.com/rustdesk/hbb_common) registered for path 'libs/hbb_common'
Cloning into '/home/stappers/retry/rustdesk-server/libs/hbb_common'...
Submodule path 'libs/hbb_common': checked out '83419b6549636ee39dacef7776c473f5802e08d6'
stappers@messer:~/retry/rustdesk-server
$ 

YES, now it builds:

stappers@messer:~/retry/rustdesk-server
$ cargo build
    Updating crates.io index
  Downloaded matches v0.1.9
  Downloaded env_logger v0.10.2
  Downloaded futures-task v0.3.21
  Downloaded futures-channel v0.3.21
  Downloaded whoami v1.2.1
  Downloaded slab v0.4.6
  Downloaded percent-encoding v2.1.0
  Downloaded form_urlencoded v1.0.1
  Downloaded futures-io v0.3.21
  Downloaded futures-sink v0.3.21
  Downloaded futures-macro v0.3.21
  Downloaded smallvec v1.8.0
  Downloaded futures-core v0.3.21
  Downloaded log v0.4.17
  Downloaded rustls-pki-types v1.10.1
  Downloaded httparse v1.9.5
  Downloaded uuid v1.12.0
  Downloaded url v2.2.2
  Downloaded rustls-platform-verifier v0.3.4
  Downloaded futures-util v0.3.21
  Downloaded idna v0.2.3
  Downloaded 21 crates (909.0KiB) in 4.68s
   Compiling libc v0.2.169
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.93
   Compiling unicode-ident v1.0.14
   Compiling autocfg v1.1.0
   Compiling shlex v1.3.0
   Compiling serde v1.0.217
....

@dz-015
Copy link

dz-015 commented Jul 21, 2025

So re-inventing the workaround ...

That didn't work, download a fresh copy did neither help.

Help is apriceated

git rm -r libs/
git submodule add https://github.com/rustdesk/hbb_common.git libs/hbb_common

This fixed the issue for me.

@stappersg
Copy link
Contributor

The hbb_common Submodule was accidentally deleted in c650217

@dependabot

@stappersg
Copy link
Contributor

Sending another reminder after getting:

$ git switch karspel
error: Your local changes to the following files would be overwritten by checkout:
        libs/hbb_common
Please commit your changes or stash them before you switch branches.
Aborting
$

And the real reason for this reminder

stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ rm -rf libs/
stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ git switch karspel
error: Your local changes to the following files would be overwritten by checkout:
        libs/hbb_common
Please commit your changes or stash them before you switch branches.
Aborting
stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ git branch
* master
stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        deleted:    libs/hbb_common

stappers@messer:/usr/src/rust/rustdesk/rustdesk-server
$

Yes, the oops from March 7th did strike again ...

@elemeng
Copy link

elemeng commented Sep 29, 2025

We also have this issue and this merger will help.

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

Successfully merging this pull request may close these issues.

4 participants