Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to cross-compile to macOS (and iOS) from non-macOS host (cc1: error: unrecognised debug output level "full", etc.) #1018

Open
0x8f701 opened this issue Jun 24, 2020 · 5 comments

Comments

@0x8f701
Copy link

0x8f701 commented Jun 24, 2020

while cross-compile from linux to macos I've had this:

running "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-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" "-gfull" "-DNDEBUG" "-c" "-o/workdir/target/x86_64-apple-darwin/debug/build/ring-a1a8774a9cdc894d/out/aesni-x86_64-macosx.o" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesni-x86_64-macosx.S"
cc1: error: unrecognised debug output level "full"
thread 'main' panicked at 'execution failed', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/build.rs:664:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@briansmith
Copy link
Owner

You probably need to use TARGET_CC=clang TARGET_AR=llvm-ar to have any hope of cross compiling from Linux to macOS. In particular I doubt your system's default cc will successfully target macOS unless it is clang, and even then probably not.

The good thing is that ring's C code requires very little in the way of (C) libraries so cross-compiling from Linux to macOS does seem like an achievable goal.

@briansmith
Copy link
Owner

I'm going to close this as a duplicate of #894. I expanded the scope of #894 to accommodate it. Thanks for the report.

@briansmith briansmith reopened this Jun 26, 2020
@briansmith briansmith changed the title cc1: error: unrecognised debug output level "full" Unable to cross-compile to macOS (and iOS) from non-macOS host (cc1: error: unrecognised debug output level "full", etc.) Jun 26, 2020
@briansmith
Copy link
Owner

briansmith commented Jun 26, 2020

I'm going to close this as a duplicate of #894. I expanded the scope of #894 to accommodate it. Thanks for the report.

:sigh: I just realized that the solution for #894 in the short term is different than the solution here, so I'm not going to merge this issue with #894 after all. Reopened.

@briansmith
Copy link
Owner

Workaround in the short term: Find a C toolchain that can target macOS and set TARGET_CC and TARGET_AR.

@0x8f701
Copy link
Author

0x8f701 commented Jun 26, 2020

Hi @briansmith sorry I haven't try yet. Let me try and tell you,thanks for the help btw.

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

No branches or pull requests

2 participants