mufeedvh / binserve

A fast production-ready static web server with TLS (HTTPS), routing, hot reloading, caching, templating, and security in a single-binary you can set up with zero code.

Home Page:https://mufeedvh.gumroad.com/l/binserveplus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to cargo build on MacOS

danmx opened this issue · comments

I'm unable to build the binary on my mac.

Build:

$ cargo build
    Updating crates.io index
 Downloading actix-web v3.0.2
error: unable to get packages from source

Caused by:
  failed to parse manifest at `/Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-3.0.2/Cargo.toml`

Caused by:
  feature `rename-dependency` is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["rename-dependency"]` to enable this feature

System:

$ uname -a
Darwin xxx 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64

Cargo version:

$ cargo --version
cargo 1.30.0 (a1a4ad372 2018-11-02)

I think that Rust 1.30 is to blame. However, I had a different issue with Cargo not being able to find some crusty x86_64-apple-darwin15-gcc linker.

Removing

[target.x86_64-apple-darwin]
linker = "x86_64-apple-darwin15-gcc"
ar = "x86_64-apple-darwin15-ar"

from .cargo/config made it build and run.

Hey @danmx, thank you for raising this issue. I am on Linux so I wasn't able to cross-compile for MacOS, I tried some crusty ways to compile it and that was the weird x86_64-apple-darwin15-gcc linker in .cargo/config. I removed it now as @ivanmoskalev suggested and it compiles successfully in MacOS.

I have uploaded the binary for MacOS in Releases.

Thank You @danmx @ivanmoskalev! ❤️🙌