Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Compilation fails on aarch64-apple-tvos #2227

Closed
protonjohn opened this issue Jan 15, 2025 · 1 comment
Closed

Compilation fails on aarch64-apple-tvos #2227

protonjohn opened this issue Jan 15, 2025 · 1 comment

Comments

@protonjohn
Copy link

protonjohn commented Jan 15, 2025

Seems very similar to this issue: #1063

I get a lot of the same error messages:

  --- stderr
  running "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-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/me/src/mylib/target/aarch64-apple-tvos/debug/build/ring-e0933a69354c89b7/out/aesv8-armx-linux64.o" "/Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:18:17: error: unexpected token in '.section' directive
  .section .rodata
                  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:28:1: error: unknown directive
  .hidden GFp_aes_hw_set_encrypt_key
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:29:1: error: unknown directive
  .type GFp_aes_hw_set_encrypt_key,%function
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:163:1: error: unknown directive
  .size GFp_aes_hw_set_encrypt_key,.-GFp_aes_hw_set_encrypt_key
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:165:1: error: unknown directive
  .hidden GFp_aes_hw_encrypt
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:166:1: error: unknown directive
  .type GFp_aes_hw_encrypt,%function
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:194:1: error: unknown directive
  .size GFp_aes_hw_encrypt,.-GFp_aes_hw_encrypt
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:196:1: error: unknown directive
  .hidden GFp_aes_hw_decrypt
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:197:1: error: unknown directive
  .type GFp_aes_hw_decrypt,%function
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:225:1: error: unknown directive
  .size GFp_aes_hw_decrypt,.-GFp_aes_hw_decrypt
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:227:1: error: unknown directive
  .hidden GFp_aes_hw_ctr32_encrypt_blocks
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:228:1: error: unknown directive
  .type GFp_aes_hw_ctr32_encrypt_blocks,%function
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:426:1: error: unknown directive
  .size GFp_aes_hw_ctr32_encrypt_blocks,.-GFp_aes_hw_ctr32_encrypt_blocks
  ^
  /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/pregenerated/aesv8-armx-linux64.S:430:19: error: unexpected token in '.section' directive
  .section .note.GNU-stack,"",%progbits
                    ^

  thread 'main' panicked at /Users/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.16.20/build.rs:656:9:
  execution failed
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

While I understand that Apple TV is a tier-3 target and support isn't guaranteed, I'd appreciate any easy tips for how to make it possible to build this target. I noticed I received a lot of similar errors when trying to build aarch64-apple-tvos-sim with the nightly as well.

(Edit: I should add that I experienced this after running the command cargo +nightly build -Z build-std --target aarch64-apple-tvos.)

@briansmith
Copy link
Owner

ring 0.16.20 doesn't support TVOS. ring 0.17.8 (maybe slightly earlier) does.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants