nginxinc / ngx-rust

Rust binding for NGINX
Apache License 2.0
752 stars 62 forks source link

Can't build ngx = "0.4.1" because wrong zlib url substitution #81

Open azoyan opened 5 months ago

azoyan commented 5 months ago

Describe the bug can't build project with ngx = "0.4.1":

   Compiling nginx-sys v0.2.1
   Compiling app v0.1.0 (ssh://git@gitlab.dats.tech/datsteam/wafng/wafng.git?branch=feature/multitenant#f0d78440)
error: failed to run custom build command for `nginx-sys v0.2.1`

Caused by:
  process didn't exit successfully: `/home/i/nginx-wafng-filter/target/debug/build/nginx-sys-8749b18e0178e362/build-script-build` (exit status: 1)
  --- stderr
  Error: Status(404, Response[status: 404, status_text: Not Found, url: https://www.zlib.net/zlib-1.3.tar.gz.asc])
warning: build failed, waiting for other jobs to finish...
bavshin-f5 commented 5 months ago

Zlib 1.3 was removed from the upstream website, making all download links invalid. See https://github.com/nginxinc/ngx-rust/pull/59 and https://github.com/nginxinc/ngx-rust/pull/61.

As documented in the project README, you can export ZLIB_VERSION environment variable to use a different version of Zlib. ZLIB_VERSION=1.3.1 should work.

azoyan commented 5 months ago

Zlib 1.3 was removed from the upstream website, making all download links invalid. See #59 and #61.

As documented in the project README, you can export ZLIB_VERSION environment variable to use a different version of Zlib. ZLIB_VERSION=1.3.1 should work.

Okay, but by default I just add ngx = "0.4" in Cargo.toml and can't compile my project.

Also if I specify ZLIB_VERSION=1.3.1 compile does not success too, because remote website does not contain resource with .asc extension - zlib-1.3.tar.gz.asc.

Mabye you should fix substitution code and download .asc file from github instead offical website?