-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: Undefined symbols for architecture arm64 in ___lunar_console_destroy #184
Comments
Hey @fknr, can you check if |
I experience a similar problem intermittently with both 1.6.1 and 1.8.1. It's relatively rare but it seems that the Xcode project is not modified to include LunarConsole files. I don't have an example in front of me but going from memory, if you look in Xcode at the LunarConsole folder it's empty. I usually delete the Xcode project, and rebuild from Unity to fix it. I've been meaning to snoop around the build code but haven't had time so far. |
Yes, I have seen it myself before. Not sure about the best solution at this point. One of the possible ways might be to forcibly update the Xcode project on every build. |
FYI, I had similar errors on LunarConsole 1.8.1 and Unity 2019.4.7 and I did not have lunar_unity_native_interface.m in my Xcode project.
I didn't have any luck trying to fix it after several attempts of deleting my build output directory, flipping the LUNAR_CONSOLE_EXPORT_IOS_FILES define, and messing with plugin import settings. But then when I reverted all my changes, defined LUNAR_CONSOLE_EXPORT_IOS_FILES, deleted my build output directory again, and restarted Unity it built correctly. Restarting Unity seems to be the new link in the chain, so maybe if anyone else is encountering this issue, try that. |
Hi, I have this issue in my CI setup. This code is not executed because
When building from a script the current platform is switched when you invoke In my case it was okay to remove those directives because I am forced to have Android and iOS support installed everywhere. |
Interesting, I'm pretty sure I have had my active platform set to iOS before running a build, even when building from a script and still ran into this problem. I'll see if that is the case the next time I hit the problem. Our build script only builds the active target. I'll also add a log statement to trust function so I can see if ran after a failed build. |
I think we can reproduce it in the editor: switch to non-iOS platform in Build Settings then execute an iOS build from the script through MenuItem. |
It makes sense now. I realized my build script will silently switch to iOS or Android targets if the active target is Standalone. |
We recently updated from 1.6.2 to 1.8.0 and after that we noticed that sometimes our ios builds fail with this error message:
[12:49:42]: ▸ �[35m�[33m⚠️ ld: arm64 function not 4-byte aligned: _unwind_tester from /Users/macmini22/jenkins/workspace/tend_Frontend-multibranch_master/frontend/BuildPipeline/builds/ios/Libraries/libiPhone-lib.a(unwind_test_arm64.o)�[0m
[12:49:44]: ▸ �[35m�[31m❌ Undefined symbols for architecture arm64�[0m
[12:49:44]: ▸ �[35m> Symbol: ___lunar_console_destroy�[0m
[12:49:44]: ▸ �[35m> Referenced from: _PlatformIOS___lunar_console_destroy_mD0698819CB28342B7F21B9CCDC0DF4DBCB3797E4 in LunarConsole.o�[0m
[12:49:47]: ▸ �[35m�[31m❌ ld: symbol(s) not found for architecture arm64�[0m
[12:49:47]: ▸ �[35m�[31m❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)�[0m
The strange thing is that in most in most of the builds it works and also building the same code again fixes the issue.
We are on Unity 2019.4.13f1 and build with XCode 12.1 (also happened on 11.3.x before)
The text was updated successfully, but these errors were encountered: