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

[Bug] iOS link fails with 'ld: Invalid record for architecture arm64' #958

Open
jazzbre opened this issue Mar 10, 2021 · 2 comments
Open

Comments

@jazzbre
Copy link

jazzbre commented Mar 10, 2021

It seems that BeefBuild generated object/archive is not compatible with Apple LLVM (with bitcode disabled).
I've tried a bunch of triplets aarch64-apple-io, arm64-apple-ios always getting the same result.
Lipo tool returns a bunch of 'invalid record' and 'Unsupported version of DISubrange' but says that arch is arm64.

Repo case is attached, just run the build.sh, it will build beef project and use the resulting .a file in the xcode build.

You think we should use https://github.com/apple/llvm-project on Apple devices?
BeefLangiOSTest.zip

@jazzbre jazzbre changed the title iOS link fails with 'ld: Invalid record for architecture arm64' [Bug] iOS link fails with 'ld: Invalid record for architecture arm64' Mar 10, 2021
@bfiete
Copy link
Collaborator

bfiete commented Mar 17, 2021

I think languages like Rust manage to generate iOS-compatible obj/bitcode with the standard LLVM.
Here's an old issue describing some of the bitcode generation issues: rust-lang/rust#35968

@jazzbre
Copy link
Author

jazzbre commented Mar 17, 2021

I think this is not a bitcode issue anyway.
Apple says this:
"For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode."
So maybe we can ignore bitcode for now.

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