Unable to execute command: killed 9 in Xcode 9.3 - ios

I have a unity project that i'm building for iOS. I've included EasyAR, OneSignal, Firebase Analytics in the project.
It is working fine on Android without ant hiccups.
But on iOS I get this error in Xcode:
clang: error: unable to execute command: Killed: 9
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: aarch64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/fq/1sb3yqqx5s75s2h8m5z56fwm0000gn/T/Bulk_Assembly-CSharp_7-05e3fe.cpp
clang: note: diagnostic msg: /var/folders/fq/1sb3yqqx5s75s2h8m5z56fwm0000gn/T/Bulk_Assembly-CSharp_7-05e3fe.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/amit/Library/Logs/DiagnosticReports/clang__.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:
Unity version: 2017.3
Xcode: 9.3

i met the some problem and solve it
with c# code
public class SomeWord
{
public static List<string> Words = new List<string>(new string[]
{
"aaa"
, "bbb"
, "ccc"
, "ddd"
, "eee"
, "fff"
, "ggg"
// the list has 3w ele
il2cpp convert this to
extern "C" void SomeWord__cctor_m3830774958 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SomeWord__cctor_m3830774958_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
StringU5BU5D_t1642385972* L_0 = ((StringU5BU5D_t1642385972*)SZArrayNew(StringU5BU5D_t1642385972_il2cpp_TypeInfo_var, (uint32_t)((int32_t)26109)));
NullCheck(L_0);
ArrayElementTypeCheck (L_0, _stringLiteral1002530778);
(L_0)->SetAt(static_cast<il2cpp_array_size_t>(0), (String_t*)_stringLiteral1002530778);
StringU5BU5D_t1642385972* L_1 = L_0;
NullCheck(L_1);
ArrayElementTypeCheck (L_1, _stringLiteral632527236);
(L_1)->SetAt(static_cast<il2cpp_array_size_t>(1), (String_t*)_stringLiteral632527236);
StringU5BU5D_t1642385972* L_2 = L_1;
NullCheck(L_2);
// this style of code repeat nearly 3w times
just pick out the string in list and put it in a file, then read in from file solve the problem. the c# code is auto generate with some reason maybe i don't know why. next time if someone meet the same problem, do with this step:
1) check out the xcode compile step and find out which file cost a lot of time
2) open the file and find if there is some weird function with a lot of statement in
3) find out which c# file convert to those code and change it

Related

linking issues in QT. 6.2.4 for missing entrypoint "_main"

I'm trying to build an iOS application using QT6.4.2 and Cmake, I'm getting following linking error
Undefined symbols for architecture arm64:
"_main", referenced from:
user_main_trampoline() in libqios_debug.a(qioseventdispatcher.mm.o)
(maybe you meant: _jinit_d_main_controller, _jinit_c_main_controller , _qt_main_wrapper )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
this is m list of installed libs
My main entry point looks like this
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
// ...
return app.exec();
}
following is my cmake script
set(TARGET_NAME Focus)
set(CMAKE_SUPPRESS_REGENERATION true)
include(../cute.cmake)
include(../files.cmake)
cute_add_executable(${TARGET_NAME})
target_sources(${TARGET_NAME}
PRIVATE
${FOCUS_HEADER}
${OBJECTIVE_HEADER}
${COMMON_HEADER}
${FOCUS_SOURCE}
${OBJECTIVE_SOURCE}
${COMMON_SOURCE}
${QUICK_IOS_SOURCE}
${FOCUS_QML_SOURCE}
${QUICK_IOS_QML_SOURCE}
${QRC_FILES}
${QT_QML_PLUGIN_CPP}
)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core OpenGL Concurrent Widgets Multimedia Network Sql Qml Quick QuickWidgets Svg WebView QuickControls2 Core5Compat REQUIRED)
# set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-Wl,-e,_qt_main_wrapper")
# set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-u _qt_registerPlatformPlugin")
target_link_libraries(${TARGET_NAME}
PRIVATE
#MySharedLibrary
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Concurrent
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::OpenGL
Qt${QT_VERSION_MAJOR}::Multimedia
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::QuickControls2
Qt${QT_VERSION_MAJOR}::QuickWidgets
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::WebView
Qt${QT_VERSION_MAJOR}::Core5Compat
)
if (${QT_VERSION_MAJOR} EQUAL 6)
qt6_import_qml_plugins(${TARGET_NAME})
endif ()
file(GLOB LOCAL_LIB_FILES "${CMAKE_SOURCE_DIR}/lib/ios/*.a")
message("CMAKE_SOURCE_DIR : " ${CMAKE_SOURCE_DIR})
target_link_libraries(${TARGET_NAME}
PRIVATE
${LOCAL_LIB_FILES}
)
Any guidance/help is appreciated.
I've already gone through following posts from QT community and SO but no luck,
https://forum.qt.io/topic/136707/undefined-symbols-_main-when-building-a-shared-lib-on-ios-with-qt-statemachine
https://forum.qt.io/topic/80775/main-function-required-when-compiling-shared-library-for-ios
QT IOS linker error entry point (_main) undefined
LINKER COMMAND: https://pastebin.com/CdARmarQ
CMAKE SCRIPT: https://pastebin.com/xXnCUKC6
NOTE: I've used https://github.com/cuteserver/hello-world as my toolchain and qt configuration for iOS.

Oracle JET : Unable to build ojet hybrid project after upgrading xcode to Version 12.0 (12A7209)

This morning I updated my xcode to Version 12.0 (12A7209) and since then I am not able to build the project for ios
Replication steps
ojet create testapp --template=navbar
cd testapp
ojet add hybrid
ojet build ios
Getting the below error
.........
In module 'Foundation' imported from /Users/hellonuh/Desktop/testapp/hybrid/platforms/ios/build/emulator/include/Cordova/CDVAppDelegate.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
- (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
^
3 warnings and 3 errors generated.
Cordova compile finished.
Error: Error: Command failed: cordova compile ios --debug --emulator
** BUILD FAILED **
The following build commands failed:
CompileC /Users/hellonuh/Library/Developer/Xcode/DerivedData/testapp-hfsgwahghfnpzecdcshskgzlpyep/Build/Intermediates.noindex/testapp.build/Debug-iphonesimulator/testapp.build/Objects-normal/x86_64/CDVWKWebViewEngine.o /Users/hellonuh/Desktop/testapp/hybrid/platforms/ios/testapp/Plugins/cordova-plugin-wkwebview-engine/CDVWKWebViewEngine.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65
Please help

Cordova Local Notification plugin failing with linker command when building project in Xcode

I'm using the Cordova Local Notification plugin in conjunction with ngCordova. My environment is Xcode 7.2 on OS X El Capitan.
This is what I'm doing (Mac OS X)
ionic build ios
open path/to/Project.xcodeproject
Then I try to build the project with Xcode and it throws this linker error:
duplicate symbol _UIApplicationRegisterUserNotificationSettings in:
/Users/aaronwells/Library/Developer/Xcode/DerivedData/WorkwellNW-bdstegwryfvyatdpihlpdjnexcnk/Build/Intermediates/WorkwellNW.build/Debug-iphonesimulator/WorkwellNW.build/Objects-normal/x86_64/AppDelegate+APPRegisterUserNotificationSettings.o
/Users/aaronwells/Library/Developer/Xcode/DerivedData/WorkwellNW-bdstegwryfvyatdpihlpdjnexcnk/Build/Intermediates/WorkwellNW.build/Debug-iphonesimulator/WorkwellNW.build/Objects-normal/x86_64/AppDelegate+APPLocalNotification.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So I inspected the source files for AppDelegate+APPRegisterUserNotificationSettings.o, and AppDelegate+APPLocalNotification.o:
AppDelegate+APPRegisterUserNotificationSettings.h:
extern NSString* const UIApplicationRegisterUserNotificationSettings;
AppDelegate+APPRegisterUserNotificationSettings.m:
NSString* const UIApplicationRegisterUserNotificationSettings = #"UIApplicationRegisterUserNotificationSettings";
AppDelegate+APPLocalNotification.h:
extern NSString* const UIApplicationRegisterUserNotificationSettings;
AppDelegate+APPLocalNotification.m:
NSString* const UIApplicationRegisterUserNotificationSettings = #"UIApplicationRegisterUserNotificationSettings";
Okay, so I think the problem is duplicate constant declarations/initializations across source files in the plugin. But why am I not seeing this issue elsewhere for this plugin? What is the recommended way to resolve this issue? Is this an issue with the plugin (in which case I would open an issue on github)? Is it machine specific?
I had the wrong versions installed. cordova-plugin-local-notification depends on RegisterUserNotificationSettings. My Cordova Local Notifications version was 0.8.1, which contained a conflicting object with RegisterNotificationSettings 1.0.1. Once I had updated the local notification to version 0.8.2, the problem vanished.

Error Cross Compiling: hidden symbol ... final link failed

I am getting the following error when compiling opencv with ffmpeg.
..../arm-none-linux-gnueabi/bin/ld: ../../bin/opencv_test_core: hidden symbol `__sync_val_compare_and_swap_4' in ..../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
I have no idea what this means. How do I fix this?
Edit:
I am cross compiling for ARM using codesourcery's arm-2009q3 compiler.
I using cmake and make to compile.
Please check all the libraries that you use and go through this stackoverflow thread as well.
To me, I got the below error when I migrated my product to new GCC version (3.3.3 to 4.5.4)
hidden symbol `__clz_tab' in /../lib/gcc/mipsel-unknown-linux-uclibc/4.5.4/libgcc.a(_clz.o) is referenced by DSO
Later I found that one of the library that I tried to link was built using GCC 3.3.3. After building the other library under GCC 4.5.4, the 'hidden symbol' error disappeared.

Not found an file de MOIP on Objective C

I just develop MOIP with ready-made components, but received the error after running.
Showed an error message:
"ld: file not found: /Users/teste/Library/Developer/Xcode/DerivedData/Moip_Store-fakuiehavrpkaeggjvvtbovybkyh/Build/Products/Debug-iphoneos/Moip Store.app/Moip Store
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
site: https://github.com/moip/ios-sdk-sample
Someone solve this problem?
how?
Select your Project and choose your "Moip Store Test" - Target, go to "General" and set your Application as Host Application.

Resources