sozu icon indicating copy to clipboard operation
sozu copied to clipboard

Build failed on 1.13.0 – cannot find macro in this scope

Open av-elier opened this issue 3 years ago • 4 comments

Hello. On macos cargo install with default version fails to build sozu. Typical error is cannot find macro `tag` in this scope

Happens on stable and beta toolchain, but I see that CI on all three are green. Must be macos thing.

Installs fine with --version 0.12.0. On 0.13.0 and 0.13.1 same errors.

Here is full build log: cargo-install-sozu.log

And tailing two errors in text

error: cannot find macro `many0` in this scope
  --> /Users/avelier/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.13.1/src/protocol/http/cookies.rs:42:49
   |
42 |   let res: IResult<&[u8], Vec<RequestCookie>> = many0!(input, complete!(single_request_cookie));
   |                                                 ^^^^^

error: cannot find macro `named` in this scope
  --> /Users/avelier/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.13.1/src/protocol/http/cookies.rs:25:1
   |
25 | named!(pub single_request_cookie<RequestCookie>,
   | ^^^^^

system and rust versions:

      System Version: macOS 12.0.1 (21A559)
      Kernel Version: Darwin 21.1.0
➜ rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.58.0-beta.2 (0e07bcb68 2021-12-04)`

0.12.0 is fine for me for now. Thank you!

av-elier avatar Dec 18 '21 18:12 av-elier

I am having the same issue with 0.13.1 attempted using $ cargo install sozu on Pop!_OS 21.04 (an Ubuntu-like system) using rustc 1.59.0-nightly (23f69235a 2021-12-20).

quietlychris avatar Dec 21 '21 16:12 quietlychris

same here on arch linux Kernel: 5.16.5-arch1-1 with 0.13.1 using rustc 1.58.1 (db9d1b20b 2022-01-20)

JonasWijne avatar Feb 07 '22 08:02 JonasWijne

I have the same issue on debian bullseye with 0.13.1 using rustup with rustc 1.58.1. Is there another way to install sozu? I also tried the debian distro package version of rustc (1.48.0) and cargo. So sozuctl can be install through cargo but sozu not.

error[E0432]: unresolved import super::parser::parse_v2_header

--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.13.1/src/protocol/proxy_protocol/relay.rs:14:5 | 14 | use super::parser::parse_v2_header; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no parse_v2_header in protocol::proxy_protocol::parser

error[E0432]: unresolved import super::parser::parse_v2_header --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.13.1/src/protocol/proxy_protocol/expect.rs:14:5 | 14 | use super::parser::parse_v2_header; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no parse_v2_header in protocol::proxy_protocol::parser

error: cannot find macro alt in this scope --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.13.1/src/protocol/http/parser/mod.rs:297:18 | 297 | let (i, _) = alt!(i, tag_no_case!("inline") | tag_no_case!("attachment") | token)?; | ^^^ error: aborting due to 38 previous errors

For more information about this error, try rustc --explain E0432. error: failed to compile sozu v0.13.1, intermediate artifacts can be found at /tmp/cargo-installjXVFNn

Caused by: could not compile sozu-lib.

c-key avatar Feb 23 '22 15:02 c-key

This errors seems to be related to an old version of sozu. I have to update the version on crates.io which will fix the issue

FlorentinDUBOIS avatar Aug 18 '22 07:08 FlorentinDUBOIS