Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Declaration does not declare anything (Xcode 11.4)

Discussion in 'iOS and tvOS' started by odysoftware, Mar 28, 2020.

  1. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    60
    Since I have updated to latest version of Xcode (11.4), I am now getting thousands of warning for my iOS Release build in xcode:

    "Declaration does not declare anything" - shown in many different cpp files from unity framework.

    Is this a known issue or am I alone with this?

    Thanks in advance,
    Oliver
     
  2. Rich0

    Rich0

    Joined:
    Aug 9, 2013
    Posts:
    49
    I'm also getting this. Also compile time seems much slower.
     
  3. woozles

    woozles

    Joined:
    Mar 23, 2018
    Posts:
    5
    I'm getting this too. Thousands of issues under "Semantic issues" for cpp files. "Declaration does not declare anything"
     
  4. r0620572

    r0620572

    Joined:
    Nov 26, 2017
    Posts:
    1
    I'm having the same problem. Anyone found a solution?
     
  5. Archieonic

    Archieonic

    Joined:
    Sep 13, 2019
    Posts:
    8
    Same, I get consistently 2300-2400 warnings on build. However, the game seems to perform properly without any issues.
     
  6. Bibzball

    Bibzball

    Joined:
    Sep 26, 2015
    Posts:
    21
    Same here, and indeed build times do seem to be slower.
     
  7. Rivven

    Rivven

    Joined:
    Mar 7, 2015
    Posts:
    4
    I've got the same problem. Only, my archive seems to be stuck at the "UnityFramework | Linking" part with about 2000 "Declaration does not declare anything" warnings. I'll keep it on trough out the night just to make sure.
    The same Xcode project worked fine with the previous version of Xcode.
     
  8. superexplosive

    superexplosive

    Joined:
    Mar 4, 2015
    Posts:
    11
    @Rivven we have absolutely the same problem! The project builds fine with Xcode 11.3 but does not work with 11.4, waiting for any solutions...
     
  9. Rivven

    Rivven

    Joined:
    Mar 7, 2015
    Posts:
    4
    I let it run through the night and it did eventually work although it took about 8 hours to do so. Wich is obviously unworkable. I'll keep you posted when I find a solution.
     
    superexplosive likes this.
  10. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    Just want to point out that this warning does not actually do any harm. It is just caused by IL2CPP emitting an empty struct in the C++ code, which to the compiler is meaningless.

    Edit: Although it seems that having a lot of warning messages make Xcode runs slower...
     
    Last edited: Apr 3, 2020
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,552
    This is a new warning in Xcode 11.4. It is benign though, and should have now impact on the output code produced or on the compile time.

    If anyone is seeing a longer compile time with Xcode 11.4 than with Xcode 11.3, I'd love to know about it so that we can investigate it more.
     
  12. Jasper-Chimp

    Jasper-Chimp

    Joined:
    Sep 4, 2018
    Posts:
    7
    Hello Josh,

    I noticed our build times went up significantly. Our project used to take around ~250 seconds to build in XCode and that is now up to ~370 seconds. Would love to have this looked at.
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,552
    Can you submit a bug report and include your project? Then we can have a look.

    Note that you may also want to try to disable that warning in Xcode. I'm unsure if they warning itself is the issue, or if something else in Xcode 11.4 caused build times to increase.
     
  14. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    I will try disabling the warning and then with an empty project.
    Also for my project, Xcode would actually use a lot more RAM than usual, to the point where 16GB on a MacBook is not enough and makes the whole computer slow to a crawl.
     
  15. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    Disabling -Wmissing-declarations flag does not affect the build time increase.

    It seems that the linker complains about debug information of libiPhone-lib.a and il2cpp.a and spits a ton of messages that make Xcode very unresponsive. I ended up with a 50MB log just with an empty Unity project.

    I opened a case #1233645 for the linker issue with projects attached

    Edit: Building via command line and sending the output to /dev/null did not help either.
     
    Last edited: Apr 6, 2020
  16. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    There is a related thread on Apple Developer Forum.
    https://forums.developer.apple.com/thread/130677

    I sent the same project to Apple and here is a response from an Apple employee:
    CC @JoshPeterson

    I think, for the time being, I'll fall back to Xcode 11.3.1. I hope this to be resolved before Xcode 12 comes out.
     
    AcidArrow likes this.
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,552
    Thanks for the details. We will investigate the bug report.
     
  18. dylanrw

    dylanrw

    Joined:
    May 8, 2014
    Posts:
    1
    It took 8 hours to link UnityFramework last night on Unity 2019.3.9f1, macOS 10.5.4, Xcode 11.4 (11E146). This has pretty much stopped my testing progress. :|
     
    ibyte and superexplosive like this.
  19. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
  20. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    Using Xcode 11.4.1 made the Xcode memory issue go away and the build time is now a lot normal according to my memory. The linker warnings are still there.
     
  21. kesepara

    kesepara

    Joined:
    Jul 31, 2018
    Posts:
    1
    this is still happening on xcode 11.5. I am now downloading xcode 11.3.1, hope this helps.
     
  22. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    204
    You don't need to downgrade for now just to avoid the warnings as they do nothing to the final compiled program. I had to downgrade at the time because I ran into performance issue on Xcode during archiving, but Apple did some fix in 11.4.1 and the performance issue did not happen anymore.
     
  23. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    967
    We are basically stuck - 11.4, 11.4.1 and 11.5 all get stuck at linking phase. This happens locally and times out eventually in cloud build. Movie back to 11.3 invalidates an asset we want to use as the DLL's were built on Xcode 11.4.

    Any solution in sight for this issue?
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,552
    Yes this issue has been corrected, and the fix should be coming to a Unity patch release soon. Can you try the latest Unity patch release in the release series you are using?
     
  25. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    967
    Using xCode 11.6 and Unity 2019.4.0f1 still have issue - going to test 2019.4.6f1 next
     
  26. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    967
    @JoshPeterson We still have the same hang a building Unity Framework using 2019.4.6f1 and Xcode 11.6. The same project builds fine if we use Xcode 11.3.1
     
  27. tarmo-jussila

    tarmo-jussila

    Joined:
    Jun 4, 2015
    Posts:
    12
    I'm having the same issue with Unity 2019.3.12f1 and Xcode 11.6.

    Xcode is stuck in UnityFramework linking and never gets past it.

    This is a killer for our CI system right now @JoshPeterson.
     
unityunity