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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

4.6 iOS 64-bit beta

Discussion in 'iOS and tvOS' started by jonas-echterhoff, Jan 12, 2015.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Im using 4.6.6p4 and some issues in Xcode:

    Code (CSharp):
    1. Classes/Native/Assembly-UnityScriptMetadata.cpp:30:17: error: expected unqualified-id
    2. extern TypeInfo 2dTo3d_t79_il2cpp_TypeInfo;
    3.                 ^
    4. Classes/Native/Assembly-UnityScriptMetadata.cpp:32:
    5. /Classes/Native/AssemblyU2DUnityScript_2dTo3d.h:18:1: error: declaration of anonymous struct must be a definition
    6. struct  2dTo3d_t79  : public MonoBehaviour_t4
    7. ^
    8. Classes/Native/AssemblyU2DUnityScript_2dTo3d.h:18:1: warning: declaration does not declare anything [-Wmissing-declarations]
    9. struct  2dTo3d_t79  : public MonoBehaviour_t4
    10. ^
    11. /Classes/Native/Assembly-UnityScriptMetadata.cpp:35:
    12. /Classes/Native/AssemblyU2DUnityScript_2dTo3d1_U24MakeItHappenU24205_U24.h:4:1: error: declaration of anonymous struct must be a definition
    13. struct 2dTo3d1_t80;
    14.  
    Just a snippet of the issues, cant locate where the problem is, any advice?
    Could it be a issue with .dll files and old code?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @MrEsquire

    This looks like a big in the C++ code that IL2CPP is generating, although I can't determine the exact cause. Was this project building correctly with IL2CPP in a previous version? Also, can you build an empty project?
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thanks for the quick reply, a empty project seems to be okay without issues in Xcode (Unity 4.6.6p4)
    I just tested the project with 4.6.6 final and cannot build, this time less errors but much quicker, error in
    Assembly-UnityScriptMedaData.cpp -> Parse Issue, Expected unqualified-ID, also invalid digit "d" in decimal constant.
    I try and check if there something specific in my project file that may cause this...huum

    So issue is present from 4.6.6, 4.6.6p4 just gives slightly more errors and info..

    Edit: Mono build has no issues
     
    Last edited: Jun 29, 2015
  4. Sebrofjr

    Sebrofjr

    Joined:
    Oct 1, 2014
    Posts:
    24
    We just tried the latest 4.6.6p4 here and we still have the Xcode Mach-O linker errors that started in 4.6.6p2. The same project still builds properly in 4.6.6.

    Just tonnes of these errors (xcode stopped at 200 errors):
    Undefined symbols for architecture arm64:
    "_UP_UIActivityViewController_get_excludedActivityTypes", referenced from:
    _UIActivityViewController_UP_UIActivityViewController_get_excludedActivityTypes_m22083 in Bulk_U3DXTSocial_0.o
    (maybe you meant: _UIActivityViewController_UP_UIActivityViewController_get_excludedActivityTypes_m22083, _UIActivityViewController_UP_UIActivityViewController_get_excludedActivityTypes_m22083_MethodInfo )

    Reported again from 4.6.6p4 as Bug# 708506
     
  5. Jeffom

    Jeffom

    Joined:
    Oct 6, 2010
    Posts:
    55
    I fixed that error by starting my xcode project from scratch.
    I deleted the generated folder and started all over again.

    Undefined symbols for architecture arm64:
    "RegisterAllClassesIPhone()", referenced from:
    RegisterAllClasses() in RegisterMonoModules.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @MrEsquire

    Since this builds with Mono, it is a bug on the IL2CPP side then. Can you submit a bug report?
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @Sebrofjr

    Thanks for the bug report, we will investigate.
     
  8. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    We get an error with IL2CPP in 4.6.6.
    Basically on the Xcode side build, we get this error every time:
    Classes/Native/Bulk_Generics_2.cpp:13903:10: Cannot initialize return object of type 'Singleton_1_t3861 *' with an rvalue of type 'Singleton_1_t3860 *'
    We reported a bug: 708605
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @AquaGhost

    I have a vague recollection that we fixed a similar bug already in the 4.6.6 patch release series, but I can't find the exact one. It may be worth trying the latest patch release (4.6.6p4, available at http://unity3d.com/unity/qa/patch-releases), or 4.6.7 when it is out this week.
     
  10. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    Hi, good to see (sort of) lots of activity on 64-bit thread.
    Yesterday Xcode started complaining my build can't run on an iPhone6 (yeah right)
    I don't care currently as I don't have an iPhone6, but this is very annoying as I can't build or test on any other device... not very nice of Apple/Xcode to do that. ...with impending deadline approaching...
    Sooo I assume they are enforcing all builds with 64 bit now ? even debug/test builds ?

    So.... mono version worked fine, ilcpp version gets compile errors in Xcode, that I haven't the faintest clue where to start looking for these errors. Any help or pointers are greatly appreciated please.
    I have several prime31 plugins (all up to date) plus Fusebox and chart-boost.
    Unity3D iOS 4.6.3f1 Xcode 6.2

    any ideas ? thanks in advance

     
  11. AquaGhost

    AquaGhost

    Joined:
    Jan 27, 2013
    Posts:
    94
    @JoshPeterson That semantics error I mentioned above is fixed in 4.6.6p4, for the record if anyone else has the problem.
     
  12. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    ok solved part of the issue (see above)... there were some files with crap file names, called 2.js and 3d.js . Files cannot start with a number.

    another issue.. make sure no "mono" stuff left in your project (e.g. old prime31 stuff)
    update all your plugins. Clear out old plugins first, before installing new ones... or just delete all files containing name.... 'mono' will get you a long way.
     
    Last edited: Jul 2, 2015
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @AquaGhost

    Excellent, thanks for letting me know!
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @JonnyHilly

    Thanks for reporting this. We probably should be able to support file names that start with a number in IL2CPP, so can you please submit a bug report on this issue? As you have a work around, I doubt the bug report will be high priority, but it is something that we want to correct.

    > Sooo I assume they are enforcing all builds with 64 bit now ? even debug/test builds ?

    No, actually you can do 32-bit builds for debug and testing purposes without problems. The 64-bit requirement is only enforced when an app is submitted.

    Also, I would recommend getting the latest Unity version in the 4.6 series if you run into more problems. We've been making a number of changes to IL2CPP in the past months, for 4.6.3 is a bit behind now.
     
    MrEsquire likes this.
  15. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    Thanks, I did upgrade to latest 4.6 and will post a bug report.
     
  16. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hey guys 4.6.7 is out just a heads up :) For thoose who dont install patch releases
     
  17. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    4.6.6p4 / 4.6.7 linker error



    I have tried the xcode version 6.3 and the latest 6.4

    I am unable to submit a bug report as our project is too large to zip up and send

    I am able to create small test projects which do build properly
     
    Last edited: Jul 1, 2015
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @vqt123

    I think that you might be using an older main.mm file. We removed the InitializeScriptingBackend method in 4.6.6p4. Can you have a look at the main.mm file in the latest release to see an example?
     
  19. Sebrofjr

    Sebrofjr

    Joined:
    Oct 1, 2014
    Posts:
    24
    Just tried 4.6.7 here. It fails with the same Mach-O lInker errors reported in bug 708506.

    Interesting to note Unity-iPhone.xcodeproj file sizes:

    4.6.6p1 - Works - 16.8 MB
    4.6.6p2 - Fails - 11.2 MB
    4.6.6p3 - Fails - 11.2 MB
    4.6.6p4 - Fails - 425 KB
    4.6.7 - Fails - 425 KB

    So whats being stripped now from p1 to p2 and is there anything we can do locally to stop this from happening? We are building fine with 4.6.6p1 but we really want the Draw Call fix that was implemented in p3 as we are 3x what we should be right now.
     
    vqt123 likes this.
  20. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23

    I don't see any reference to InitializeScriptingBackend in our main.mm file

    http://i.imgur.com/OJk4DM9.png
     
  21. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    This is the same error we're having
     
  22. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    Update on mach-o linker error

    Fixed by removing a main.mm file that was in our ios/plugins folder.
     
  23. Sebrofjr

    Sebrofjr

    Joined:
    Oct 1, 2014
    Posts:
    24
    Unfortunately we have 100's of Mach-O linker errors since p2 and we do not have a main.mm file within our source.
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @Sebrofjr

    Yes, I think the linker errors that @vqt123 reported are from a different source than the ones you are seeing now.
     
  25. Alden-R

    Alden-R

    Joined:
    Aug 19, 2014
    Posts:
    10
    I downloaded the 4.6.7.dmg for 64-bit fixes and it appears to be coming up as 4.6.6f2 when viewing About Unity. The installers between versions are different sizes. I uninstalled entirely to make sure I didn't mess anything up, but it still shows up that way. Is the 4.6.7 installer showing up like this for anyone else?
     
  26. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    Last time this happened to me I had to uninstall, reboot, reinstall, run.
     
  27. EugeneOv

    EugeneOv

    Joined:
    Jul 25, 2012
    Posts:
    2
    Not sure if you were able to sort it out, but we had similar issue with long (rather endless) linking time in Xcode this week with latest Unity 4.6.6p4 and Xcode 6.3.1.

    We found that large *.cs files (we had like 20k of lines) are causing this to happen.
    So try to get rid of huge cs files and see if it helps.
     
  28. play_with_wolf

    play_with_wolf

    Joined:
    Aug 26, 2014
    Posts:
    36
    @JoshPeterson

    Code (CSharp):
    1. Type type = Type.GetType(className);
    2. System.Object obj = System.Activator.CreateInstance(type, true);
    I use 4.6.7f1 IL2CPP but System.Object obj = System.Activator.CreateInstance(type, true); get
    Code (CSharp):
    1. ArgumentNullException: Argument cannot be null.
    2. Parameter name: type
    3.  
    ClassName is "hoh.Manager.StageStarData"
    Class is
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. namespace hoh.Manager
    5. {
    6.     public class StageStarData
    7.     {
    8.         public int id;
    9.         public string descUI;
    10.         public int calcMode;
    11.         public PveStarType resultType;
    12.         public int showMode;
    13.     }
    14. }
    15.  
    Type.GetType("hoh.Manager.StageStarData") is null, 64bit iphone 6 6plus run ok, 32bit ipad min1 run bad
     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @play_with_wolf

    This is actually a known bug on 32-bit iOS devices that we corrected in 4.6.7p1, which should be out in the next day or two):

    http://issuetracker.unity3d.com/issues/il2cpp-type-dot-gettype-fails-on-armv7
     
  30. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think my issue is also same problem as someone has mentioned: "Files cannot start with a number" it seems in the example code my file start with a number. I really do think this should not be that low priority because if users are not aware that this is a problem then spend some time trying to work it out. Definitely need to include some warnings if it not likely to be fixed in next patch, maybe small job or large, no idea.
     
  31. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Dunno if this is the right place to post this, trying to build a project on ios for with Unity 5.1.1f1 for the first time, couldn't find a Unity 5 ios64bit thread.... but getting semantic issues when building.... It's a little bit over my head, dunno if it's a bug or something to do with my project.

     
    Binbag42 likes this.
  32. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @MrEsquire

    Yes this does feel like something which is a pain to track down, even if there is a work around. Can you submit a bug report still? That will help us to be sure that we get the fix correct for your specific case.
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @image28

    This looks like a bug in IL2CPP that we recently corrected, although I can't put my finger on the exact bug report. Can you try this with the latest patch release?

    5.1.1p3: http://unity3d.com/unity/qa/patch-releases
     
  34. Alden-R

    Alden-R

    Joined:
    Aug 19, 2014
    Posts:
    10
    That was how I ended up having to resolve it. Thanks for the recommendation.
     
    larku likes this.
  35. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    418
    I have tried the latest patch 5.1.1p3 and get the same error with the PlayerIO sample project. I have submitted the bug report:
    710709
     
  36. hegi25

    hegi25

    Joined:
    Jan 24, 2014
    Posts:
    3
    mesh.UploadMeshData(true); solved this issue for me.
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @capitalJmedia

    Thanks for submitting this bug report, we will investigate it.
     
  38. bongsik

    bongsik

    Joined:
    Jul 4, 2012
    Posts:
    1
    Hello.
    I'm using unity 4.6.6f2 and Xcode 6.3.2.
    I'm trying to build for iOS with IL2CPP, but I've got some error.
    could you tell me advice to solve this error?
     

    Attached Files:

  39. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @bongsik

    I don't specifically remember a fix for this issue, but please try the latest patch release (4.6.7p1), available here:

    http://unity3d.com/unity/qa/patch-releases

    If the problem still occurs, please submit a bug report, as an error like this indicates a bug in IL2CPP.
     
    bongsik likes this.
  40. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Will give that I try sometime in the next few hours and let you know, cheers for the rapid response.
     
  41. carlosii

    carlosii

    Joined:
    Mar 16, 2015
    Posts:
    2
    Hello, i have a problem since i compiled my project for IOS for 64bits with IL2CPP, im using a plugin to save and retrieve data from the game in the following link:

    https://www.assetstore.unity3d.com/en/#!/content/3675

    When it was compiling for 32 bits in Mono 2.x there was no problem.

    The problem is basically the clases levelSerializer.cs and UnitySerializer.cs does not return the object with the information desirialized when it was compiled for 64bits, the 32bits is working properly.

    I am using your last patch release
    Patch 4.6.7p1

    If you need some more additional information let me know.

    Thank you!
     
    Last edited: Jul 10, 2015
  42. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @carlosii

    I'm not familiar with this asset store package, so I can't tell initially what the problem might be. First, please try using the IL2CPP scripting backend with the ARMv7 architecture only. That will determine if this is a difference between IL2CPP and Mono or between 32-bit and 64-bit. Second, we'll likely need to know more about why something is not returned. Is something null when it should not be? Do any exceptions occur? I think that the answers to these questions will help us solve the problem.
     
  43. carlosii

    carlosii

    Joined:
    Mar 16, 2015
    Posts:
    2
    Hi, thank you! I test the app with IL2CPP scripting backend with the ARMv7 architecture only, but I get the same problem (see image attached).
    The classes levelSerializer.cs uses the class UnitySerializer.cs to unserialize and convert to array some data like:

    HQZTZXJWMTEAAQAAABlMZXZlbFNlcmlhbGl6ZXIrTEAPHERhdGEGAAAAC1N0b3JlZEl0ZW1zB0NsYXNzSWQRgBMfT2JqZWN0TmFtZXMIQ2hpbGRJZHMKQ29tcG9uZW50cw4ER2FtZU/gACMB5m5AbBdPA1LD//8JTWFpblNjZW5lAAD//08CAABABh8EAQD//yQ0YzIxN2VhMS0xN2ZmLTQ3OGYtYmZjOC1jZRIxOWZjMTA0NDNlWsP//0+ObAEAQAMAB.......

    The script returns null or empty array only if i build the app with IL2CPP, if i build the app with Mono2.x returns the correct information in array.

    The app dont returns or shows any exceptions.

    Thank you!
     

    Attached Files:

  44. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @carlosii

    Thanks for trying this. It does look like a problem with IL2CPP. Can you submit a bug report with a project to reproduce this problem? That will give us the best chance to correct it.
     
  45. Binbag42

    Binbag42

    Joined:
    Apr 14, 2014
    Posts:
    6
    Screen Shot 2015-07-12 at 00.16.55.png Hi, I got a very similar error to image28 (screenshot attached). After upgrading to the latest patch 5.1.1p4 (although Unity keeps showing that I am running 5.1.1f), problem is solved i.e. after a very slow process in XCode, I finally managed to run my app on an iPhone.
     
    Last edited: Jul 12, 2015
  46. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    5.1.1p3 did fix the issue, Cheers
    Sorry it took so long to reply got lost in some code for a few days
     
  47. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @image28

    No problem, I'm glad to here that this working now.
     
  48. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,779
    @Binbag42

    I'm glad to hear that this working. I'm not sure about the version number mismatch though, something seems to be wrong there. Note that we are actively working on improving build times now, so hopefully they will improve soon.
     
  49. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Your using a Asset dated (May 24, 2013) last update
    What do you expect, contact asset author for update..
     
  50. Blundig

    Blundig

    Joined:
    Jan 7, 2014
    Posts:
    18
    I am having the same problem that Paam noted with case 707156, just caused by a different plugin (Amazon's AWS Mobile SDK). This issue is still present in 5.1.1p4, and for my project reverting to an older version of 5.x will not work because of different IL2CPP bugs in earlier releases.

    Can you comment on the status/priority of this bug? We are nearing release, and I can no longer test with the Mono backend, so this is a showstopper.

    FYI, Amazon provides source for their SDK, so maybe this is an easier path for you to track down and fix the issue than the plugin Paam was using? It is trivial to reproduce, just make a new project, import the plugin, and compile.

    Thanks