Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug lib_burst_generated.a was built for newer iOS version issue?

Discussion in 'iOS and tvOS' started by andyz, Nov 1, 2022.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,251
    warnings on building for iOS in xcode: lib_burst_generated.a was built for newer iOS version (15.5) than being linked (12.0).
    Is this a possible problem? Was it fixed in newer burst packages or Unity (than 2019 LTS)?
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    we will fix this
     
  3. mvaz_p

    mvaz_p

    Joined:
    Aug 22, 2018
    Posts:
    80
    Any clues on what's causing this? Our builds recently started failing because of this error.
     
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    > Any clues on what's causing this?
    as written
    "lib_burst_generated.a was built for newer iOS version" - we were not explicitly specifying the min ios version when building burst. On the other hand the warning itself should be pretty harmless - i dont think burst uses anything that os version specific
     
  5. mvaz_p

    mvaz_p

    Joined:
    Aug 22, 2018
    Posts:
    80
    Oh, sorry, I'm having an actual error during archive, but the last logs are related to this warning:

    ld: warning: object file (/Users/user/Workspace/prototype/Builds/iOS/Libraries/lib_burst_generated.a(lib_burst_generated_part_3_merged.o)) was built for newer iOS version (16.1) than being linked (11.0)
    ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1400.0.29.202.0_0' Reader: '1316.0.21.2.5_0')', using libLTO version 'LLVM version 13.1.6, (clang-1316.0.21.2.5)' for architecture arm64


    Is this caused by Burst? Because it's an URP dependency and we cannot remove it.
     
  6. mvaz_p

    mvaz_p

    Joined:
    Aug 22, 2018
    Posts:
    80
    @Alexey
    So, I've found out what's happening here.
    Burst is trying to use a hardcoded path to XCode that maybe different from the version specified in the Build Settings.
    Currently our projects are not compatible with XCode 14, so I had two XCode versions installed, 14 and 13.4.1. The game was being compiled with XCode 13.4.1 but the Burst package with XCode 14, which then generated incompatible bitcode versions.
    Today I've deleted my current XCode 14 version and started receiving this error when trying to build for iOS:

    Error building Player: BuildFailedException: Burst compiler (1.7.3) failed running
    stdout:
    Overriding backend due to platform constraints : 'burst-llvm-8'
    Failed to determine iphoneos sdk installation path - /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk does not exist, and "xcrun --sdk iphoneos --show-sdk-path" failed with xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
    stderr:


    My XCode 13.4.1 is installed in Applications/XCode13_4_1, not Applications/XCode, which is the default value.
    This seems to be a bug in the Burst package, it really should respect what XCode version is specified in Build Settings.
     
  7. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    > it really should respect what XCode version is specified in Build Settings.
    yes, the fix is done and should be out "soon" (i have no idea about burst release schedule)
     
  8. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Is there a ticket/case number for this? If not, was the fix released & into which version(s) is it released?
     
  9. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    is the fix included in 2022.2? if not, is there a workaround?
     
  10. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    In the Build Settings window, manually set the Xcode path -- and then it *should* work, I think (IIRC that's all I had to do).

    I'm on Ventura (13.0.1) and running Xcode 14.1, and I was able to get things working again -- but they didn't work by default/out of the box (it did previously but stopped, probably after updating to Ventura but not 100%).

    FWIW, we experienced the issue on 2022.1.20f1 and 2022.1.21f1 -- so if this HAS already been fixed then I'm pretty sure the fix isn't in either of those versions.
     
  11. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    That did not work for me. I disabled burst optimization for now.
    Hoping in a real fix soon....
     
  12. mvaz_p

    mvaz_p

    Joined:
    Aug 22, 2018
    Posts:
    80
    Burst is using the default XCode directory for building, which is Applications/XCode.
    Your XCode version in the Build Settings window must be the same one.
     
  13. firesightstudios

    firesightstudios

    Joined:
    Mar 29, 2022
    Posts:
    56
    This is still an issue on 2021 3.20
     
  14. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    194
    +1.

    Still an issue for me as well in 2021.3.20f1
     
    ValdisV and rbitard like this.
  15. ahules

    ahules

    Joined:
    Jan 1, 2023
    Posts:
    7
    Have the same issue after upgrade xcode, could you share how to solve it?
     
    ValdisV likes this.
  16. KreizLand

    KreizLand

    Joined:
    Jul 12, 2017
    Posts:
    57
    Still an issue on
    XCode 15.2
    Unity 2022.3.17f1