Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Build on Xcode 12: "Linked library lib_burst_generated32.a' is missing one or ....

Discussion in 'iOS and tvOS' started by pistoleta, Sep 18, 2020.

  1. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Today I updated Xcode to v12 and I found this new error when trying to build. Dont even know what is this about:


    Can't build on Xcode 12: "Linked library lib_burst_generated32.a' is missing one or more architectures required by this target: arm64.


    Any ideas why is this happening or any hint? I didnt find anything online.
    Thanks
     
    BenWilles likes this.
  2. BenWilles

    BenWilles

    Joined:
    Mar 9, 2018
    Posts:
    41
    same here
    upload_2020-9-19_10-34-16.png
     
  3. nextlevel

    nextlevel

    Joined:
    Jan 25, 2014
    Posts:
    6
    I had the same problem after updating to Xcode 12. I have temporarily solved the problem by downloading and running the previous version of Xcode 11.7, which can be downloaded from here:

    https://developer.apple.com/download/more/

    Would still like to know how to fix this issue so it works on Xcode 12, if anyone figures it out.
     
  4. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    Hi all, I was able to recreate the issue with New Build System enabled in Xcode Project Settings. If I switch it to Legacy Build System, things will build just fine with these notable warnings from those static libraries:
    upload_2020-9-20_5-25-18.png

    So for the time being, you guys can try enabling Legacy Build System at "File > Project Settings". Either Shared or Per-User is fine, depending on whether you share this Xcode project to others:
    upload_2020-9-20_5-34-2.png

    Environment: Xcode Version 12.0 (12A7209), Unity 2019.4.9 + Burst package 1.3.6
     
    Last edited: Sep 20, 2020
  5. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    As for the proper fix, one way to resolve the issue is to merge the two lib_burst_generated static libraries with libtool and add it back to the Xcode project to replace the two separate ones. (This solution was based on the error message. I will try it and see if it actually works. )
    https://stackoverflow.com/a/8170851/12408801
     
  6. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    We realized these libraries are being created because the Burst compiler and since we are not using Unity Jobs we simply uninstalled the Burst package from the Package manager. Removing the lib_burst_generated32 from the Xcode project also works, seems Xcode12 doesn't allow 32bit libraries by default.
     
  7. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    That’s not true. Xcode 12 still supports building 32bit.

    But glad that you resolved the issue eventually.
     
    pistoleta likes this.
  8. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Maybe depends for which platform you're building? In our case we were building for iOS, and the minimum target was set to 11 if I remember well
     
  9. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    Yes, if you build for iOS 11, Xcode would not build the 32-bit slice. Though this has been the behavior since Xcode 9. If you set the target to 10 or lower, 32-bit slice would still be built.
     
    pistoleta likes this.
  10. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Then I'm completely clueless of why that library was giving such a problem, and why so few people has reported this issue...
    Anyway, thanks for sharing your knowledge!
     
  11. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    @Neonlyte I see you have quite knowledge about Xcode and every time we have to deal with some Xcode related stuff we struggle quite a lot and don't find many info around, the apple developer forums aren't be very active and seems like we are a minority in the Unity forums too.
    I was wondering if you know any forums or discord channels where more developers using Unity and Xcode gather.
    Thanks again.
     
  12. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    The problem is exactly what the error says. That particular library does not have a 64-bit slice but it is listed as a library to link.

    In the Legacy Build System of Xcode, the toolchain would seem to ignore a library if it does not have the expected architecture slice. And perhaps when Unity team developed the Burst package they relied on this behavior thus they generated two libraries containing only each of the architecture slice and let Xcode choose what to keep.

    Xcode, on the other hand, expects all libraries to contain all architecture, so Burst should have generated a single library 32-bit and 64-bit slices contained.

    It seems that Xcode 12 started to enforce this expectation in the New Build System by doing a check at the start of the build, hence the build errors.

    So there are two issues at play:
    1. Burst should not generate separate libraries for each architecture
    2. If the iOS target is properly set to iOS 11 i.e. 64-bit only in Unity build settings, Burst should not even generate 32-bit code in the first place. [I still need to test for this one]
     
    luvjungle and pistoleta like this.
  13. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    I do iOS development as a career, so this happens to be my knowledge area. I don't know if there are any dedicated iOS development community with specialties in Unity-related experience, so posting here may be the best bet. As you said, it is indeed a niche intersection between Xcode and Unity.
     
  14. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    I see, all makes sense, I saw the 64bit library next to it but I didnt know Xcode expects the both architectures in the same file.
    Thanks again for taking your time sharing with us!
    pistoleta
     
  15. robertas-unity

    robertas-unity

    QA Minion Unity Technologies

    Joined:
    Mar 24, 2015
    Posts:
    28
    Thank you for pointing out this issue. I have forwarded it to our development team to get it fixed.

    Just like @Neonlyte mentioned above, you can simply switch to using the Legacy Build System in Xcode as a temporary workaround if you are actually using Burst.
     
    pistoleta likes this.
  16. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    111
    Burst 1.3.8 is out and contains a change so that the static libraries are now combined at build time which should resolve this issue.
     
    florinel2102 and Neonlyte like this.
  17. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
  18. fabrizio_unity

    fabrizio_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    47
    Hello,
    today we figured that we introduced a new regression with 1.3.8 so we just released 1.3.9 to fix it. Please let us know if you are still having issues with iOS builds.

    Thanks
    Burst Team
     
  19. mrboembastic

    mrboembastic

    Joined:
    Oct 31, 2014
    Posts:
    14
    1.3.9 fixed it for me
     
  20. sthill95

    sthill95

    Joined:
    Dec 17, 2019
    Posts:
    3
    I don't know if I need to open a new issue but have the exact same problem with "libPods-UnityFramework.a", and fixed with passing back to Legacy-build.
    (it is just to mention)

    (Unity 2019.4.9 // XCode v12.0.1)
     
  21. modernator24

    modernator24

    Joined:
    Apr 7, 2017
    Posts:
    168
    Had same issue and updated to 1.3.9, build failure with:

    Code (CSharp):
    1.  
    2. ld: library not found for -l_burst_generated32
    3. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    4.  
    Any ideas?
     
  22. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,165
    Can you please try latest verified Burst version (1.4.4)?
     
    eli_grinline likes this.
  23. eli_grinline

    eli_grinline

    Joined:
    Nov 22, 2016
    Posts:
    4
    Using Xcode 13.2 and Unity 2019.4.8f1 and getting the error:
    "The linked library 'lib_burst_generated32.a' is missing one or more architectures required by this target: arm64"
    Can't seem to find the fix. Any new help would be awesome!
     
  24. eli_grinline

    eli_grinline

    Joined:
    Nov 22, 2016
    Posts:
    4
    ...where can I find the "latest Burst version," or do I have it already in my version of 2019 Unity? Thanks!
     
  25. eli_grinline

    eli_grinline

    Joined:
    Nov 22, 2016
    Posts:
    4
    Ok,
    I just went into Package Manager and updated the "Burst" package.
    Was simple...but I've never had to deal with Burst or its updates before so I was really lost as to where this error was actually coming from!
    If you're getting this error, try updating Burst and you may be good to go!
     
    Yury-Habets likes this.
  26. sergeperepel

    sergeperepel

    Joined:
    May 23, 2019
    Posts:
    3
    Hi, I have Burst 1.5.6 and unity (2021.1.28f1) and when I invoke a cloud build I get these errors:

    Code (CSharp):
    1. 368: ▸ ⚠;️  ld: object file (/BUILD_PATH/.../temp20220309-5114-x38kie/Libraries/lib_burst_generated.a(lib_burst_generated_part_0_merged.o)) was built for newer iOS version (15.2) than being linked (11.0)
    2. 369: ▸ ⚠;️  ld: object file (/BUILD_PATH/.../temp20220309-5114-x38kie/Libraries/lib_burst_generated.a(lib_burst_generated_part_0.o)) was built for newer iOS version (15.2) than being linked (11.0)
    3. 370: ▸ ❌;  ld: symbol(s) not found for architecture arm64
    4. 371: ▸ ❌;  clang: error: linker command failed with exit code 1 (use -v to see invocation)
    5.  
    Please, any help would be appreciated.
     
    Last edited: Mar 9, 2022