briansmith / ring

Safe, fast, small crypto using Rust
Other
3.7k stars 698 forks source link

aarch64-apple-tvos and aarch64-apple-watchos #1862

Closed kitplummer closed 9 months ago

kitplummer commented 9 months ago

Heyo, trying to build some stuff with Rust targeting tvOS.

Getting this back when the ring dependencies is getting built:

  --- stderr
  running "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/Users/kitplummer/Code/Ditto/ditto/target/aarch64-apple-tvos/release/build/ring-c082f82bd6998707/out/aesv8-armx-linux64.o" "/Users/kitplummer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
  /Users/kitplummer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:18:17: error: unexpected token in '.section' directive

I'm only making an assumption that the weirdnest of the aesv8-armx-linux64.S is because the actual target build doesn't exist.

Any ideas? Is it maybe a possibility to add those targets to the build for ring?

briansmith commented 9 months ago

PR #1689 it seems likely that you may need to use ring 0.17.7 for TVOS, since patches that seem to be needed for TVOS were merged around the 0.17.5 time frame. I suspect a similar patch will be needed for aarch64-apple-watchos.

I agree it is wrong that those "linux" files have any bearing on these targets. Indeed, part of PR #1689 seems to address exactly that.

Are you trying to build for these targets using a Linux host? I think it is possible to use a Linux host but I've never done it; I always build for Apple targets on a macOS host.

kitplummer commented 9 months ago

Yes, that's the issue...there's a lingering transitive dependency on 0.16. I need to resolve that.