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

Undefined symbols for architecture x86_64 #218

Closed
azurine-space opened this issue Apr 30, 2021 · 5 comments
Closed

Undefined symbols for architecture x86_64 #218

azurine-space opened this issue Apr 30, 2021 · 5 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@azurine-space
Copy link

Version of kakao-login libraries

3.0.6

Version of react-native

0.63.4~

Platforms you faced the error (IOS or Android or both?)

IOS

Expected behavior

xcode 업데이트 이후부터 빌드가 되지 않습니다. (이전버전이 12인지는 불분명합니다..)

Actual behavior

아래와 같은 에러가 뜨면서 빌드가 되지 않습니다.

Undefined symbols for architecture x86_64:
  "__swift_FORCE_LOAD_$_swiftWebKit", referenced from:
      __swift_FORCE_LOAD_$_swiftWebKit_$_kakao_login in libkakao-login.a(RNKakaoLogins-034241530150a0aa7a0b3bc4574e426ac1143302a7277f762abaa82ff3bb9204.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftWebKit_$_kakao_login)
  "Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
      generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in libAlamofire.a(NetworkReachabilityManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Tested environment (Emulator? Real Device?)

ios 에뮬레이터 환경입니다

@mikesukim
Copy link

mikesukim commented May 1, 2021

+1 같은 현상입니다. 어제까지 멀쩡히 되다가, Xcode(12.4 그전버전) 를 12.5로 업데이트 되면서 안됩니다.
검색해보니 bridging 문제라는 말이있어 bridging 파일 삭제하고 다시 추가해봐도 에러가 납니다.

@hyochan
Copy link
Member

hyochan commented May 2, 2021

Link Binary with Libraries => Build Phases 에서 libswiftWebKit.tbd를 추가해보시겠어요?

@hyochan hyochan added 📱 iOS Related to iOS 🙏 help wanted Extra attention is needed labels May 2, 2021
@themore8109
Copy link

오류

비슷한 현상 입니다. m1 Mac / xCode 12.5에서 발생했습니다.

react native init 으로 신규 프로젝트 만들고 kakao-login 패키지만 추가해서 빌드하면 아래와 같은 오류가 발생합니다.

ld: warning: Could not find or use auto-linked library 'swiftWebKit'
Undefined symbols for architecture arm64:
  "__swift_FORCE_LOAD_$_swiftWebKit", referenced from:
      __swift_FORCE_LOAD_$_swiftWebKit_$_kakao_login in libkakao-login.a(RNKakaoLogins-5cf9dfe5f5d3a86edcdbe058550d07c5280aa896e91d678865587622c4675d94.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftWebKit_$_kakao_login)
  "Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer) -> (Swift.IndexingIterator>, Swift.Int)", referenced from:
      generic specialization > of Swift._copyCollectionToContiguousArray(A) -> Swift.ContiguousArray in libAlamofire.a(NetworkReachabilityManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

해결법

자체적으로 찾은 해결법은 아래와 같습니다.
아래의 Library Search Paths에서 swift-5.0으로 되어 있는 Path를 삭제합니다.
image
도움이 되었으면 합니다.

참고 : https://stackoverflow.com/questions/67337293/xcode-v12-5-build-error-on-opening-sqlite-db

@azurine-space
Copy link
Author

@hyochan

Link Binary with Libraries => Build Phases 에서 libswiftWebKit.tbd를 추가해보시겠어요?

Undefined symbols for architecture x86_64:
  "Swift._ArrayBuffer._copyContents(initializing: Swift.UnsafeMutableBufferPointer<A>) -> (Swift.IndexingIterator<Swift._ArrayBuffer<A>>, Swift.Int)", referenced from:
      generic specialization <serialized, Swift._ArrayBuffer<Swift.Int8>> of Swift._copyCollectionToContiguousArray<A where A: Swift.Collection>(A) -> Swift.ContiguousArray<A.Element> in libAlamofire.a(NetworkReachabilityManager.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

다른 에러가 나면서 빌드가 되지 않습니다.

@azurine-space
Copy link
Author

@themore8109 님이 제시해주신 방법으로 빌드되는것을 확인했습니다. 모두 도움 주셔서 감사합니다. ( __)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

4 participants