v2ray-rust icon indicating copy to clipboard operation
v2ray-rust copied to clipboard

Doesn't compile on aarch64 macOS

Open leana8959 opened this issue 2 years ago • 4 comments

Hello,

I tried to compile this project on macOS (aarch64 Ventura 13.4, rustc 1.70.0 (90c541806 2023-05-31)).

It seems like there's an issue with the boring-sys crate. I get an issue at compile time. Am I missing some build dependencies, or is this a bug with the boring-sys crate?

I also tried to add openssl to the PATH by doing this

Error message:

--- stdout
  cargo:rerun-if-env-changed=BORING_BSSL_PATH
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/Users/leana/repos/leana/v2ray-rust/
  ...
--- stderr
  thread 'main' panicked at '"enum_(unnamed_at_deps/boringssl/src/include/openssl/err_h_291_1)" is not a valid Ident', /Users/leana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.54/src/fallback.rs:811:9
  note: run with `RUST_BACKTRACE=1` environment variable to display ...

Thanks ! Really appreciate the project :)

--- Chinese below --- 嗨,

我剛試著在 macOS (aarch64 Ventura 13.4, rustc 1.70.0 (90c541806 2023-05-31)) 上編譯但是 boring-sys 編譯失敗了。 請問我是不是少了什麼 library ? 還是這其實是 boring-sys 的問題呢?

我有試過把 openssl library 放到 path 裡

錯誤訊息同上。

謝謝!

leana8959 avatar Jun 20 '23 14:06 leana8959

I don't have an Apple Silicon Mac so currently I can't reproduce your issue or investigate it. However, if you just want a build binary, you can see here: months before I did some research and successfully made a cross build on GitHub Action's macOS runner, targeting aarch64-apple-darwin.

😂 Unfortunately, since I don't have a aarch64-apple-darwin device, I can't say if this binary will work or not. You can download the artifact (or run the workflow in your own repository) and test it out.

zedifen avatar Aug 13 '23 08:08 zedifen

I see, thanks for the reply! I'll try that one day!

leana8959 avatar Aug 13 '23 16:08 leana8959