Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mach-O linker Id error in Xcode
#1
Hi,

I couldn't build in Xcode 11.4 and later (it was handing on "Linking"), so I downgraded on 11.3.1

Now I get a Mach-O linker error.. Linker commands failed with exit code 1

Here is the warning:

[color=rgba(0, 0, 0, 0.85)]ld: in /Users/admin/Documents/myproject/Libraries/Obi/Plugins/iOS/libOni.a(Oni.o), could not parse object file /Users/admin/Documents/myproject/Libraries/Obi/Plugins/iOS/libOni.a(Oni.o): 'Invalid bitcode version (Producer: '1103.0.32.29.0_0' Reader: '1100.0.33.17_0')', using libLTO version 'LLVM version 11.0.0, (clang-1100.0.33.17)' for architecture arm64[/color]

[color=rgba(0, 0, 0, 0.85)]clang: error: linker command failed with exit code 1 (use -v to see invocation)[/color]

[color=rgba(0, 0, 0, 0.85)]What can I do there?[/color]

[color=rgba(0, 0, 0, 0.85)]Thanks[/color]
Reply
#2
(12-06-2020, 03:11 PM)emz06 Wrote: Hi,

I couldn't build in Xcode 11.4 and later (it was handing on "Linking"), so I downgraded on 11.3.1

Now I get a Mach-O linker error.. Linker commands failed with exit code 1

Here is the warning:

[color=rgba(0, 0, 0, 0.85)]ld: in /Users/admin/Documents/myproject/Libraries/Obi/Plugins/iOS/libOni.a(Oni.o), could not parse object file /Users/admin/Documents/myproject/Libraries/Obi/Plugins/iOS/libOni.a(Oni.o): 'Invalid bitcode version (Producer: '1103.0.32.29.0_0' Reader: '1100.0.33.17_0')', using libLTO version 'LLVM version 11.0.0, (clang-1100.0.33.17)' for architecture arm64[/color]

[color=rgba(0, 0, 0, 0.85)]clang: error: linker command failed with exit code 1 (use -v to see invocation)[/color]

[color=rgba(0, 0, 0, 0.85)]What can I do there?[/color]

[color=rgba(0, 0, 0, 0.85)]Thanks[/color]

Hi there,

Sadly, bitcode versions aren't backwards compatible. So if you link against Obi 5.3 using Xcode 11.3.1, this error message will tell you that you can't link against a library built with a newer version.

In 5.4 (yet unreleased) we rolled back to 11.3.1, after we became aware of xcode's linker bug in 11.4 and up. Write to support(at)virtualmethodstudio.com and I'll send it to you, updating from 5.3 to 5.4 is painless.
Reply