zerotier / zeronsd

A DNS server for ZeroTier users
https://zerotier.com
BSD 3-Clause "New" or "Revised" License
493 stars 56 forks source link

Can't build on Alpine 3.16.2 #197

Open altano opened 1 year ago

altano commented 1 year ago

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:

altano commented 1 year ago

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

Starkrights commented 1 year ago

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.

magynhard commented 1 year ago

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 commented 1 year ago

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
erikh commented 1 year ago

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!