Skip to content
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

Can't build iOS app #57

Open
TripwireNL opened this issue Oct 26, 2018 · 3 comments
Open

Can't build iOS app #57

TripwireNL opened this issue Oct 26, 2018 · 3 comments

Comments

@TripwireNL
Copy link

TripwireNL commented Oct 26, 2018

Hi,

I'm trying to build the iOS app to test and check how Kotlin Native is working. But I'm getting the following error (I just pulled the repo and changed the bundle identifier nothing else).

Ld /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/konfswift.app/konfswift normal arm64 (in target: konfswift)
cd /Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios
export IPHONEOS_DEPLOYMENT_TARGET=9.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/DynamicBlurView -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/MBProgressHUD -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/PopupDialog -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/SDWebImage -F/Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/TagListView-ObjC -F/Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios-framework/build/konan/bin/ios_x64 -F/Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios/build/konan/bin/xcode -F/Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios/build/konan/bin/xcode/ios_x64 -filelist /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Intermediates.noindex/konfswift.build/Debug-iphoneos/konfswift.build/Objects-normal/arm64/konfswift.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Intermediates.noindex/konfswift.build/Debug-iphoneos/konfswift.build/Objects-normal/arm64/konfswift_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Intermediates.noindex/konfswift.build/Debug-iphoneos/konfswift.build/Objects-normal/arm64/konfswift.swiftmodule -framework DynamicBlurView -framework MBProgressHUD -framework PopupDialog -framework SDWebImage -framework TagListView_ObjC -framework common -framework Pods_konfswift -framework Pods_konfswift -Xlinker -dependency_info -Xlinker /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Intermediates.noindex/konfswift.build/Debug-iphoneos/konfswift.build/Objects-normal/arm64/konfswift_dependency_info.dat -o /Users/sebastiaan/Library/Developer/Xcode/DerivedData/konfswift-booxjrfdbmkeptfctzmufoiwywgq/Build/Products/Debug-iphoneos/konfswift.app/konfswift

ld: warning: directory not found for option '-F/Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios-framework/build/konan/bin/ios_x64'
ld: warning: directory not found for option '-F/Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios/build/konan/bin/xcode/ios_x64'
ld: warning: ignoring file /Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios/build/konan/bin/xcode/common.framework/common, file was built for x86_64 which is not the architecture being linked (arm64): /Users/sebastiaan/Documents/Kotlin_Native_Projects/KotlinConf/konfios/build/konan/bin/xcode/common.framework/common
Undefined symbols for architecture arm64:
"OBJC_CLASS$_CommonConstantsKt", referenced from:
objc-class-ref in AppDelegate.o
"OBJC_CLASS$_CommonKotlinPair", referenced from:
objc-class-ref in SessionViewController.o
"OBJC_CLASS$_CommonSessionListPresenter", referenced from:
objc-class-ref in SessionsViewController.o
"OBJC_CLASS$_CommonKotlinConfDataRepository", referenced from:
objc-class-ref in SessionsViewController.o
objc-class-ref in SessionViewController.o
objc-class-ref in AppDelegate.o
"OBJC_CLASS$_CommonKtor_utils_iosGMTDate", referenced from:
objc-class-ref in SessionsViewController.o
objc-class-ref in SessionViewController.o
"OBJC_CLASS$_CommonUpdateProblem", referenced from:
objc-class-ref in BaseView.o
"OBJC_METACLASS$_CommonKotlinx_coroutines_core_nativeCoroutineDispatcher", referenced from:
OBJC_METACLASS$__TtC9konfswift2UI in UI.o
"OBJC_CLASS$_CommonSpeaker", referenced from:
objc-class-ref in SessionsViewController.o
objc-class-ref in SessionViewController.o
"OBJC_CLASS$_CommonKotlinUnit", referenced from:
objc-class-ref in AppDelegate.o
"OBJC_CLASS$_CommonSessionDetailsPresenter", referenced from:
objc-class-ref in SessionViewController.o
"OBJC_CLASS$_CommonMainPresenter", referenced from:
objc-class-ref in SessionsViewController.o
"OBJC_CLASS$_CommonCannotFavorite", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonCannotDeleteVote", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonPlatformSettings", referenced from:
objc-class-ref in AppDelegate.o
"OBJC_CLASS$_CommonSessionRating", referenced from:
objc-class-ref in SessionViewController.o
"OBJC_CLASS$_CommonUnauthorized", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonCannotPostVote", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonTooEarlyVote", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonSessionModel", referenced from:
objc-class-ref in SessionsViewController.o
"OBJC_CLASS$_CommonTooLateVote", referenced from:
objc-class-ref in BaseView.o
"OBJC_CLASS$_CommonKotlinx_coroutines_core_nativeCoroutineDispatcher", referenced from:
objc-class-ref in UI.o
type metadata for konfswift.UI in UI.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@MarcinMoskala
Copy link
Collaborator

Try first ./gradlew :common:iosMain:build and then run it in Xcode.

@iammini5
Copy link

iammini5 commented Oct 31, 2018

I am getting this ?

  • What went wrong:
    Project 'iosMain' not found in project ':common'.

@chrisHoekstra
Copy link

@iammini5 I was able to get the ./gradlew :common:iosMain:build command to work by adding include 'common:iosMain' to the settings.gradle file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants