[GH-ISSUE #358] unable to compile due to problems with protobuf version #237

Closed
opened 2026-02-27 19:29:34 +03:00 by kerem · 3 comments
Owner

Originally created by @hermann4 on GitHub (Jul 29, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/358

When I tried to compile Librespot, I got these error messages:

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf
--> protocol/src/authentication.rs:27:49
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf
--> protocol/src/keyexchange.rs:27:49
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf
--> protocol/src/mercury.rs:27:49
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf
--> protocol/src/metadata.rs:27:49
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf
--> protocol/src/pubsub.rs:27:4
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0

error[E0425]: cannot find value VERSION_2_7_0 in module protobuf

--> protocol/src/spirc.rs:27:49
|
27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: >VERSION_2_8_0

error: aborting due to 6 previous errors

For more information about this error, try rustc --explain E0425.
error: Could not compile librespot-protocol.
warning: build failed, waiting for other jobs to finish...
error: build failed

I changed the constant in all of these files to "2_8_0" and it seems to work fine. I am no expert though, that's why leave this at "unsolved"

Edit: Could not get the code to be formatted in the right way

Originally created by @hermann4 on GitHub (Jul 29, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/358 When I tried to compile Librespot, I got these error messages: > error[E0425]: cannot find value VERSION_2_7_0 in module protobuf --> protocol/src/authentication.rs:27:49 | 27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0 >error[E0425]: cannot find value VERSION_2_7_0 in module protobuf --> protocol/src/keyexchange.rs:27:49 | 27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0 >error[E0425]: cannot find value VERSION_2_7_0 in module protobuf --> protocol/src/mercury.rs:27:49 | 27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0 >error[E0425]: cannot find value VERSION_2_7_0 in module protobuf --> protocol/src/metadata.rs:27:49 | 27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0 >error[E0425]: cannot find value VERSION_2_7_0 in module protobuf --> protocol/src/pubsub.rs:27:4 | 27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: VERSION_2_8_0 >error[E0425]: cannot find value VERSION_2_7_0 in module protobuf > --> protocol/src/spirc.rs:27:49 | >27 | const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0; | ^^^^^^^^^^^^^ help: a constant with a similar name exists: >VERSION_2_8_0 >error: aborting due to 6 previous errors >For more information about this error, try rustc --explain E0425. error: Could not compile librespot-protocol. warning: build failed, waiting for other jobs to finish... error: build failed I changed the constant in all of these files to "2_8_0" and it seems to work fine. I am no expert though, that's why leave this at "unsolved" Edit: Could not get the code to be formatted in the right way
kerem closed this issue 2026-02-27 19:29:34 +03:00
Author
Owner

@ashthespy commented on GitHub (Jul 29, 2019):

We should fix this by specifying an exact version of protobuf and protobuf-codege-pure until #293 is merged.

<!-- gh-comment-id:516155335 --> @ashthespy commented on GitHub (Jul 29, 2019): We should fix this by specifying an exact version of `protobuf` and `protobuf-codege-pure` until #293 is merged.
Author
Owner

@max-foss commented on GitHub (Sep 11, 2019):

I get the same error but with 2_8_0 and 2_8_1. #293 works fine for me, I am currently using its branch https://github.com/willstott101/librespot/tree/protobuf-codegen-pure as a workarround.

<!-- gh-comment-id:530260270 --> @max-foss commented on GitHub (Sep 11, 2019): I get the same error but with 2_8_0 and 2_8_1. #293 works fine for me, I am currently using its branch https://github.com/willstott101/librespot/tree/protobuf-codegen-pure as a workarround.
Author
Owner

@ashthespy commented on GitHub (Sep 11, 2019):

Closed with #293

<!-- gh-comment-id:530279100 --> @ashthespy commented on GitHub (Sep 11, 2019): Closed with #293
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#237
No description provided.