robovm / robovm-samples

RoboVM sample projects
Apache License 2.0
92 stars 71 forks source link

MyJavaFramework [ERROR] Undefined symbols for architecture arm64: #95

Open muhuaxin opened 8 years ago

muhuaxin commented 8 years ago

In MyJavaFramework project, after "mvn -Drobovm.enableBitcode=true compile robovm:install", there are some errors. The following is the log. Can someone solve this issue?

Downloaded: https://repo.maven.apache.org/maven2/org/robovm/robovm-dist/1.14.0/robovm-dist-1.14.0-nocompiler.tar.gz (110659 KB at 389.5 KB/sec) [INFO] Extracting '/Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/robovm-dist-1.14.0-nocompiler.tar.gz' to: /Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/unpacked [INFO] Expanding: /Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/robovm-dist-1.14.0-nocompiler.tar.gz into /Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/unpacked [INFO] Building arm64 slice [INFO] Compiling classes using 4 threads [INFO] Compiling org.robovm.samples.myjavaframework.CounterService (ios arm64 release) [INFO] Compiled 1 classes in 1.29 seconds [INFO] Linking 916 classes (ios arm64 release) [INFO] 7088 methods out of 9481 included in the executable [INFO] Building framework binary /Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/MyJavaFramework [INFO] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o /Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/MyJavaFramework -arch arm64 -Wl,-filelist,/Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/objects0 -stdlib=libstdc++ -miphoneos-version-min=8.0 -fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -dynamiclib -single_module -compatibility_version 1 -current_version 1 -install_name @rpath/MyJavaFramework.framework/MyJavaFramework -L /Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/unpacked/robovm-1.14.0/lib/vm/ios/arm64 -ObjC -exported_symbols_list /Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/exported_symbols -Wl,-no_implicit_dylibs -Wl,-dead_strip -fPIC -lrobovm-bc -lrobovm-core -lgc -lpthread -ldl -lm -lz -framework Foundation -force_load /Users/muhuaxin/.robovm/cache/ios/arm64/release/cp/dcb4bf31791a84f9cfb5a8098ab1eaf7.extracted/META-INF/robovm/ios/arm64/librobovm-rt-android.a -liconv -lsqlite3 -framework MobileCoreServices [ERROR] Undefined symbols for architecture arm64: [ERROR] "std::1::vector_base_common::throw_length_error() const", referenced from: [ERROR] void std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > >::push_back_slow_path<std::1::basic_string<char, std::1::char_traits, std::1::allocator > >(std::1::basic_string<char, std::1::char_traits, std::1::allocator >&&) in librobovm-rt-android.a(merged.o) [ERROR] void std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > >::push_back_slow_path<std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&>(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&&&) in librobovm-rt-android.a(merged.o) [ERROR] void std::1::vector<AsynchronousSocketCloseMonitor, std::__1::allocator<AsynchronousSocketCloseMonitor> >::push_back_slowpath<AsynchronousSocketCloseMonitor*>(AsynchronousSocketCloseMonitor&&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::pushback(char)", referenced from: [ERROR] realpath(char const, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::append(char const, unsigned long)", referenced from: [ERROR] realpath(char const, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] icu_51::StringByteSink<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > >::Append(char const_, int) in librobovm-rt-android.a(merged.o) [ERROR] std::__1::basic_string<char, std::1::char_traits, std::1::allocator > std::1::operator+<char, std::1::char_traits, std::1::allocator >(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&, char const_) in librobovm-rt-android.a(merged.o) [ERROR] "std::__1::basic_string<char, std::1::char_traits, std::1::allocator >::reserve(unsigned long)", referenced from: [ERROR] realpath(char const_, std::__1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::chartraits, std::1::allocator >::init(char const, unsigned long, unsigned long)", referenced from: [ERROR] std::1::basic_string<char, std::1::char_traits, std::1::allocator > std::1::operator+<char, std::__1::char_traits, std::1::allocator >(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, char const_) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::find(char, unsigned long) const", referenced from: [ERROR] realpath(char const_, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::compare(char const) const", referenced from: [ERROR] realpath(char const, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::~basic_string()", referenced from: [ERROR] _Java_java_io_File_realpath in librobovm-rt-android.a(merged.o) [ERROR] _Java_java_io_File_listImpl in librobovm-rt-android.a(merged.o) [ERROR] _Java_java_lang_System_specialProperties in librobovm-rt-android.a(merged.o) [ERROR] register_libcore_icu_ICU(JNIEnv) in librobovm-rt-android.a(merged.o) [ERROR] getExecutablePath() in librobovm-rt-android.a(merged.o) [ERROR] collectStandardNames(JNIEnv, char const, char const, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > >&) in librobovm-rt-android.a(merged.o) [ERROR] realpath(char const_, std::__1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] ... [ERROR] "std::1::basic_string<char, std::1::char_traits, std::_1::allocator >::erase(unsigned long, unsigned long)", referenced from: [ERROR] realpath(char const, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::rfind(char, unsigned long) const", referenced from: [ERROR] realpath(char const_, std::__1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::assign(char const, unsigned long)", referenced from: [ERROR] readlink(char const, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::_1::allocator >::append(char const)", referenced from: [ERROR] _Java_java_lang_System_specialProperties in librobovm-rt-android.a(merged.o) [ERROR] register_libcore_icu_ICU(JNIEnv) in librobovm-rt-android.a(merged.o) [ERROR] getExceptionSummary(JNINativeInterface const, jthrowable, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::basic_string(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: [ERROR] register_libcore_icu_ICU(JNIEnv) in librobovm-rt-android.a(merged.o) [ERROR] collectStandardNames(JNIEnv, char const, char const, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > >&) in librobovm-rt-android.a(merged.o) [ERROR] void std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > >::push_back_slow_path<std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&>(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&&&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::operator=(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&)", referenced from: [ERROR] register_libcore_icu_ICU(JNIEnv) in librobovm-rt-android.a(merged.o) [ERROR] realpath(char const_, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::chartraits, std::1::allocator >::init(char const, unsigned long)", referenced from: [ERROR] _Java_java_io_File_listImpl in librobovm-rt-android.a(merged.o) [ERROR] _Java_java_lang_System_specialProperties in librobovm-rt-android.a(merged.o) [ERROR] register_libcore_icu_ICU(JNIEnv) in librobovm-rt-android.a(merged.o) [ERROR] realpath(char const_, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] _jniGetStackTrace in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::__1::char_traits, std::1::allocator >::basic_string(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, unsigned long, unsigned long, std::1::allocator const&)", referenced from: [ERROR] realpath(char const_, std::__1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] "std::1::basic_string<char, std::1::char_traits, std::1::allocator >::assign(char const)", referenced from: [ERROR] getExecutablePath() in librobovm-rt-android.a(merged.o) [ERROR] realpath(char const, std::1::basic_string<char, std::1::char_traits, std::1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] getExceptionSummary(JNINativeInterface const*_, jthrowable, std::__1::basic_string<char, std::1::char_traits, std::__1::allocator >&) in librobovm-rt-android.a(merged.o) [ERROR] _jniGetStackTrace in librobovm-rt-android.a(merged.o) [ERROR] ld: symbol(s) not found for architecture arm64 [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:53 min [INFO] Finished at: 2016-03-18T10:11:13+08:00 [INFO] Final Memory: 22M/513M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.robovm:robovm-maven-plugin:1.14.0:install (default-cli) on project robovm-samples-dynamiclib: Failed to install: Command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o /Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/MyJavaFramework -arch arm64 -Wl,-filelist,/Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/objects0 -stdlib=libstdc++ -miphoneos-version-min=8.0 -fembed-bitcode -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -dynamiclib -single_module -compatibility_version 1 -current_version 1 -install_name @rpath/MyJavaFramework.framework/MyJavaFramework -L /Users/muhuaxin/.m2/repository/org/robovm/robovm-dist/1.14.0/unpacked/robovm-1.14.0/lib/vm/ios/arm64 -ObjC -exported_symbols_list /Users/muhuaxin/Developer/robovm-samples-master/MyJavaFramework/target/robovm.tmp/arm64/exported_symbols -Wl,-no_implicit_dylibs -Wl,-dead_strip -fPIC -lrobovm-bc -lrobovm-core -lgc -lpthread -ldl -lm -lz -framework Foundation -force_load /Users/muhuaxin/.robovm/cache/ios/arm64/release/cp/dcb4bf31791a84f9cfb5a8098ab1eaf7.extracted/META-INF/robovm/ios/arm64/librobovm-rt-android.a -liconv -lsqlite3 -framework MobileCoreServices' failed (Exit value: 1) -> [Help 1]