* [pve-devel] rust build questions
@ 2021-05-05 6:36 aderumier
2021-05-05 6:59 ` Thomas Lamprecht
0 siblings, 1 reply; 6+ messages in thread
From: aderumier @ 2021-05-05 6:36 UTC (permalink / raw)
To: pve-devel
Hi,
I try to build proxmox rust package to test the remote migration,
I'm a noob with rust, so I have begin too look at proxmox-backup doc
https://git.proxmox.com/?p=proxmox-backup.git;a=blob_plain;f=README.rst;hb=HEAD
``rustup`` Toolchain
====================
We normally want to build with the ``rustc`` Debian package. To do that
you can set the following ``rustup`` configuration:
# rustup toolchain link system /usr
# rustup default system
I don't see any rustup binary in the rustc package
ii rustc 1.51.0+dfsg1-
1~bpo10+pve1 amd64 Rust systems programming language
ii cargo 0.46.0-
1~bpo10+pve1 amd64 Rust package manager
any idea ? does it come from another package ?
currently, I have tried to build "proxmox" rust
https://git.proxmox.com/?p=proxmox.git;a=shortlog
with a simple
"make deb" + installed needed build depend.
but I have this error
"
test src/tools/websocket.rs - tools::websocket::create_frame (line 161)
... ok
test src/tools/websocket.rs - tools::websocket::create_frame (line 148)
... ok
failures:
---- src/api/api_type_macros.rs - api_string_type (line 5) stdout ----
error[E0432]: unresolved import `proxmox::api::api`
--> src/api/api_type_macros.rs:6:5
|
4 | use proxmox::api::api;
| ^^^^^^^^^^^^^^^^^ no `api` in `api`
error: cannot determine resolution for the attribute macro `api`
--> src/api/api_type_macros.rs:13:7
|
11 | #[api(format: &PROXMOX_SAFE_ID_FORMAT)]
| ^^^
|
= note: import resolution is stuck, try simplifying macro imports
error[E0599]: no associated item named `API_SCHEMA` found for struct
`AccountName` in the current scope
--> src/api/api_type_macros.rs:12:1
|
10 | / api_string_type! {
11 | | #[api(format: &PROXMOX_SAFE_ID_FORMAT)]
12 | | /// ACME account name.
13 | | #[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize,
Serialize)]
14 | | #[serde(transparent)]
15 | | pub struct AccountName(String);
16 | | }
| | ^
| | |
| |_associated item `API_SCHEMA` not found for this
| associated item not found in `AccountName`
|
= note: this error originates in a macro (in Nightly builds, run
with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
Couldn't compile the test.
failures:
src/api/api_type_macros.rs - api_string_type (line 5)
test result: FAILED. 60 passed; 1 failed; 7 ignored; 0 measured; 0
filtered out; finished in 23.78s
error: test failed, to rerun pass '--doc'
"
Seem to be a missing package ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] rust build questions
2021-05-05 6:36 [pve-devel] rust build questions aderumier
@ 2021-05-05 6:59 ` Thomas Lamprecht
2021-05-05 7:00 ` Thomas Lamprecht
2021-05-05 7:19 ` aderumier
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2021-05-05 6:59 UTC (permalink / raw)
To: Proxmox VE development discussion, aderumier, pve-devel
On 05.05.21 08:36, aderumier@odiso.com wrote:
> Hi,
> I try to build proxmox rust package to test the remote migration,
>
> I'm a noob with rust, so I have begin too look at proxmox-backup doc
>
> https://git.proxmox.com/?p=proxmox-backup.git;a=blob_plain;f=README.rst;hb=HEAD
>
> ``rustup`` Toolchain
> ====================
>
> We normally want to build with the ``rustc`` Debian package. To do that
> you can set the following ``rustup`` configuration:
>
> # rustup toolchain link system /usr
> # rustup default system
>
>
> I don't see any rustup binary in the rustc package
> ii rustc 1.51.0+dfsg1-
> 1~bpo10+pve1 amd64 Rust systems programming language
> ii cargo 0.46.0-
> 1~bpo10+pve1 amd64 Rust package manager
>
> any idea ? does it come from another package ?
rustup is the "rust native" way to setup rust: https://rustup.rs/
Some people here have both, Packaged rust for clean package builds and
some nightly version for testing newer features in development or such
things.
If you do not have rustc setup outside of Debian packages you can ignore
that.
>
>
> currently, I have tried to build "proxmox" rust
>
> https://git.proxmox.com/?p=proxmox.git;a=shortlog
> with a simple
> "make deb" + installed needed build depend.
>
> but I have this error
>
>
> "
> test src/tools/websocket.rs - tools::websocket::create_frame (line 161)
> ... ok
> test src/tools/websocket.rs - tools::websocket::create_frame (line 148)
> ... ok
>
> failures:
>
> ---- src/api/api_type_macros.rs - api_string_type (line 5) stdout ----
> error[E0432]: unresolved import `proxmox::api::api`
> --> src/api/api_type_macros.rs:6:5
> |
> 4 | use proxmox::api::api;
> | ^^^^^^^^^^^^^^^^^ no `api` in `api`
>
> error: cannot determine resolution for the attribute macro `api`
> --> src/api/api_type_macros.rs:13:7
> |
> 11 | #[api(format: &PROXMOX_SAFE_ID_FORMAT)]
> | ^^^
> |
> = note: import resolution is stuck, try simplifying macro imports
>
> error[E0599]: no associated item named `API_SCHEMA` found for struct
> `AccountName` in the current scope
> --> src/api/api_type_macros.rs:12:1
> |
> 10 | / api_string_type! {
> 11 | | #[api(format: &PROXMOX_SAFE_ID_FORMAT)]
> 12 | | /// ACME account name.
> 13 | | #[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize,
> Serialize)]
> 14 | | #[serde(transparent)]
> 15 | | pub struct AccountName(String);
> 16 | | }
> | | ^
> | | |
> | |_associated item `API_SCHEMA` not found for this
> | associated item not found in `AccountName`
> |
> = note: this error originates in a macro (in Nightly builds, run
> with -Z macro-backtrace for more info)
>
> error: aborting due to 3 previous errors
>
> Some errors have detailed explanations: E0432, E0599.
> For more information about an error, try `rustc --explain E0432`.
> Couldn't compile the test.
>
> failures:
> src/api/api_type_macros.rs - api_string_type (line 5)
>
> test result: FAILED. 60 passed; 1 failed; 7 ignored; 0 measured; 0
> filtered out; finished in 23.78s
>
> error: test failed, to rerun pass '--doc'
> "
>
> Seem to be a missing package ?
Did you setup the devel repository?
deb http://download.proxmox.com/debian/devel buster main
And installed all build-dependencies? Maybe there are some missing in
d/control..
May want to ensure you have the proxmox crate installed:
apt install librust-proxmox-dev librust-proxmox-api-macro-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] rust build questions
2021-05-05 6:59 ` Thomas Lamprecht
@ 2021-05-05 7:00 ` Thomas Lamprecht
2021-05-05 7:19 ` aderumier
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2021-05-05 7:00 UTC (permalink / raw)
To: Proxmox VE development discussion, aderumier, pve-devel
On 05.05.21 08:59, Thomas Lamprecht wrote:
>> Seem to be a missing package ?
> Did you setup the devel repository?
>
> deb http://download.proxmox.com/debian/devel buster main
>
> And installed all build-dependencies? Maybe there are some missing in
> d/control..
>
> May want to ensure you have the proxmox crate installed:
>
> apt install librust-proxmox-dev librust-proxmox-api-macro-dev
Ignore me here, Dietmar is right, this was just a bug in the doc test
package...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] rust build questions
2021-05-05 6:59 ` Thomas Lamprecht
2021-05-05 7:00 ` Thomas Lamprecht
@ 2021-05-05 7:19 ` aderumier
1 sibling, 0 replies; 6+ messages in thread
From: aderumier @ 2021-05-05 7:19 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion, pve-devel
Le mercredi 05 mai 2021 à 08:59 +0200, Thomas Lamprecht a écrit :
> rustup is the "rust native" way to setup rust: https://rustup.rs/
>
> Some people here have both, Packaged rust for clean package builds
> and
> some nightly version for testing newer features in development or
> such
> things.
>
> If you do not have rustc setup outside of Debian packages you can
> ignore
> that.
ok thanks !
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] rust build questions
@ 2021-05-05 6:43 Dietmar Maurer
2021-05-05 7:18 ` aderumier
0 siblings, 1 reply; 6+ messages in thread
From: Dietmar Maurer @ 2021-05-05 6:43 UTC (permalink / raw)
To: Proxmox VE development discussion, aderumier, pve-devel
> currently, I have tried to build "proxmox" rust
>
> https://git.proxmox.com/?p=proxmox.git;a=shortlog
> with a simple
> "make deb" + installed needed build depend.
>
> but I have this error
>
>
> "
> test src/tools/websocket.rs - tools::websocket::create_frame (line 161)
> ... ok
> test src/tools/websocket.rs - tools::websocket::create_frame (line 148)
> ... ok
>
> failures:
>
> ---- src/api/api_type_macros.rs - api_string_type (line 5) stdout ----
> error[E0432]: unresolved import `proxmox::api::api`
> --> src/api/api_type_macros.rs:6:5
> |
> 4 | use proxmox::api::api;
> | ^^^^^^^^^^^^^^^^^ no `api` in `api`
Sorry, this was a bug in the proxmox crate. Please update an test again:
commit fa3b5374ed61da3c40a1fc58070d6a16c877c3af (HEAD -> master, origin/master, origin/HEAD)
Author: Dietmar Maurer <dietmar@proxmox.com>
Date: Wed May 5 08:03:35 2021 +0200
api_type_macros.rs: disable failing doctest (set it to ignore instead of no_run)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] rust build questions
2021-05-05 6:43 Dietmar Maurer
@ 2021-05-05 7:18 ` aderumier
0 siblings, 0 replies; 6+ messages in thread
From: aderumier @ 2021-05-05 7:18 UTC (permalink / raw)
To: Dietmar Maurer, Proxmox VE development discussion, pve-devel
Thanks Dietmar, it's building fine now !
Le mercredi 05 mai 2021 à 08:43 +0200, Dietmar Maurer a écrit :
> > currently, I have tried to build "proxmox" rust
> >
> > https://git.proxmox.com/?p=proxmox.git;a=shortlog
> > with a simple
> > "make deb" + installed needed build depend.
> >
> > but I have this error
> >
> >
> > "
> > test src/tools/websocket.rs - tools::websocket::create_frame (line
> > 161)
> > ... ok
> > test src/tools/websocket.rs - tools::websocket::create_frame (line
> > 148)
> > ... ok
> >
> > failures:
> >
> > ---- src/api/api_type_macros.rs - api_string_type (line 5) stdout -
> > ---
> > error[E0432]: unresolved import `proxmox::api::api`
> > --> src/api/api_type_macros.rs:6:5
> > |
> > 4 | use proxmox::api::api;
> > | ^^^^^^^^^^^^^^^^^ no `api` in `api`
>
> Sorry, this was a bug in the proxmox crate. Please update an test
> again:
>
> commit fa3b5374ed61da3c40a1fc58070d6a16c877c3af (HEAD -> master,
> origin/master, origin/HEAD)
> Author: Dietmar Maurer <dietmar@proxmox.com>
> Date: Wed May 5 08:03:35 2021 +0200
>
> api_type_macros.rs: disable failing doctest (set it to ignore
> instead of no_run)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-05 7:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 6:36 [pve-devel] rust build questions aderumier
2021-05-05 6:59 ` Thomas Lamprecht
2021-05-05 7:00 ` Thomas Lamprecht
2021-05-05 7:19 ` aderumier
2021-05-05 6:43 Dietmar Maurer
2021-05-05 7:18 ` aderumier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox