zeronsd icon indicating copy to clipboard operation
zeronsd copied to clipboard

Can't build on Alpine 3.16.2

Open altano opened this issue 2 years ago • 5 comments

Hello again!

I get this build error towards the end of cargo install zeronsd:

   Compiling progenitor v0.2.0
   Compiling zerotier-one-api v1.1.0
   Compiling zerotier-central-api v1.1.0
error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zerotier-one-api-1.1.0/build.rs:7:25
    |
7   |     let mut generator = progenitor::Generator::new();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^-- supplied 0 arguments
    |                         |
    |                         expected 1 argument
    |
note: associated function defined here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/progenitor-impl-0.2.0/src/lib.rs:124:12
    |
124 |     pub fn new(settings: &GenerationSettings) -> Self {
    |            ^^^

For more information about this error, try `rustc --explain E0061`.
error: could not compile `zerotier-one-api` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/zerotier-central-api-1.1.0/build.rs:7:25
    |
7   |     let mut generator = progenitor::Generator::new();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^-- supplied 0 arguments
    |                         |
    |                         expected 1 argument
    |
note: associated function defined here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/progenitor-impl-0.2.0/src/lib.rs:124:12
    |
124 |     pub fn new(settings: &GenerationSettings) -> Self {
    |            ^^^

error: failed to compile `zeronsd v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-installkW7HZG`

Caused by:
  build failed

Versions:

  • Alpine 3.16.2
  • rustc/cargo 1.60.0

altano avatar Sep 12 '22 03:09 altano

0.5.0 (latest) doesn't install (see error above) but 0.4.3 (HEAD^) does compile/install.

cargo install --version 0.5.0 zeronsdcargo install --version 0.4.3 zeronsd

altano avatar Sep 12 '22 06:09 altano

Seconding this.

Issue appears to be with the zerotier-central-api's build.rs file. From my surface-level understanding of what's going on, its build.rs mostly follows the example on the progenitor repo's readme, but calls progenitor::Generator::new() instead of progenitor::Generator::default() (which naturally have 1 and 0 parameter signatures respectively)

Fwiw, the issue is present in both zerotier-central-api v 1.1.0 and 1.2.0.

Starkrights avatar Oct 27 '22 01:10 Starkrights

Problem still occurs when trying to install by cargo (0.5.0):

sudo /usr/bin/cargo install zeronsd --root /usr/local

Even occurs on the current version 0.5.2 when trying to build by Cargo and Git the current main branch as mentioned in the README:

cargo install --git https://github.com/zerotier/zeronsd --branch main

magynhard avatar Nov 27 '22 10:11 magynhard

But it builds 0.5.2, when i just clone and run the build:

git clone https://github.com/zerotier/zeronsd.git
cargo build --release

magynhard avatar Nov 27 '22 11:11 magynhard

This is resolved via #206 which I assume will be merged by @glimberg post-haste. Please be patient with us at this time. Thanks @altano!

erikh avatar Mar 06 '23 11:03 erikh