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

Error while building 7.16.0 on Xcode 10 #255

Closed
daCelky opened this issue Jun 13, 2019 · 21 comments
Closed

Error while building 7.16.0 on Xcode 10 #255

daCelky opened this issue Jun 13, 2019 · 21 comments

Comments

@daCelky
Copy link

daCelky commented Jun 13, 2019

Hi ! It's been two days i'm trying to build for iOS and get stuck with a weird error :

clang: error: no such file or directory: 'iOS' clang: error: no such file or directory: 'Facebook/Frameworks/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework/FBSDKCoreKit' Command Ld failed with a nonzero exit code

I don't have any missing file, everything is present and I don't really understand, everything works fine on 7.15.0, what could have changed since?

Thanks in advance

@KylinChang
Copy link
Contributor

KylinChang commented Jun 13, 2019

Hi @daCelky, can you check whether FBSDKCoreKit exists under framework directory in your xcode project? It would be better if you can attach the structure of your FacebookSDK structure under framework directory.

@jsheikh27
Copy link

Same issue here. I was using 7.15.1 and updated to 7.16.

I do have the file. below is the screenshot of my directory structure

Screen Shot 2019-06-15 at 2 52 38 PM

@daCelky
Copy link
Author

daCelky commented Jun 17, 2019

Yes everything exists in my framework directory.

@soyer87
Copy link

soyer87 commented Jun 17, 2019

Same issue here with 7.16 and Xcode 10.2.1.

@Umair130815
Copy link

I am facing the same issue with facebook sdk version 7.16 and Xcode 10.2.1.

clang: error: no such file or directory: 'Builds/0.0.1/Frameworks/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework/FBSDKCoreKit'

@laijingfeng
Copy link

SDK v7.16.0、Unity 2018.3.0f2、Xcode 10.1(10B61)
Build Xcode project in Windows first, then transfer to Mac
Find a path in Xcode project settings, "Build Settings -> Other Linker Flags", has one line like "D:/XXX\Frameworks/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework/FBSDKCoreKit"
Two questions:
1.It is a Windows path, not in Mac
2.With Unity2018, frameworks paths are simple, FBSDKCoreKit.framework in "Frameworks" directory, not in "Frameworks/FacebookSDK/Plugins/iOS/"

FIX: Change the path to "$(SRCROOT)/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit"

@Snowblaze
Copy link

@daCelky does your build folder contain spaces?

@daCelky
Copy link
Author

daCelky commented Jun 18, 2019

@Snowblaze it did, I tried without any space and it succesfully build, how can it be an issue since every other SDKs are building without any problem ?

@soyer87
Copy link

soyer87 commented Jun 18, 2019

Finally I have used 7.15. I hope that fb fixed it soon.

@Snowblaze
Copy link

@daCelky try to use a command regarding any folder with a space, but without quotation marks, you'll probably get the same error. I'll try to find the cause and make a pull request in a day or two, so that we get it fixed in the next release.

@jsheikh27
Copy link

jsheikh27 commented Jun 18, 2019 via email

@andrejbroncek
Copy link

Having the same issue... :/

@jzhudev
Copy link

jzhudev commented Jun 19, 2019

  • Go to XCode-> Targets -> Unity-iPhone -> Build Settings -> Other Linker Flags
  • Double click the values of Other Linker Flags
  • Remove "-force_load" and FBSDKCoreKit Path if they are there

Try to build again.

@inxidious
Copy link

inxidious commented Jun 21, 2019

@jzhudev it solved the building problem, but the "-force_load" is needed for this issue: #208

edit: removing spaces solved my problem, as mentioned above

@jzhudev
Copy link

jzhudev commented Jun 21, 2019

@inxidious actually I didn't have this directory issue but issue #261. I'm using XCode 10.2.1 and Unity 2018.2.2.

@KylinChang
Copy link
Contributor

Hi all, we currently add "-all_load" to avoid the issue of both FB SDK path and #208 . However, if you want to use "-force_load" and have the "no such file or directory" issue, then change the FB SDK path to the correct.

@inxidious
Copy link

inxidious commented Jun 26, 2019

@KylinChang after updating to 7.16.1, i couldn't build my project because of an error.

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/xxx/Projects/XCodeProjects/zzz/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIRDynamicLinks", referenced from:
objc-class-ref in libFirebaseCppApp.a(invites_receiver_internal_ios_aa7b75b2efc3269e88f1077e55250e5a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But, if i change -all_load to -force_load, it works fine.
I know this is firebase error, but everything works fine on 7.16.0, and having to edit the linker every time i build is not convenient. do you have any idea?

@sathyarajshetigar
Copy link

@inxidious your solution worked for me. Thanks.

@stewartmiles
Copy link

@chkuang-g FYI

@KylinChang any chance you could change your SDK to not do --all_load? This can contribute to SDK bloat as nothing will be deadstripped. In the Firebase SDK (I'm an engineer on the team) we rely upon dead stripping on iOS to only link the components referenced directly by application code or explicitly linked using ---force_load archive, perhaps --force_load could be used for Facebook components instead?

@KylinChang
Copy link
Contributor

Hey @stewartmiles , in the latest v7.17.2, we already removed the flag and use cocoapods to add FBiOSSDK. Can you switch to use v7.17.2?

If you still want to use v7.16.0, you can use --force_load {PATH_OF_FBSDKCoreKit} instead.

@stewartmiles
Copy link

@KylinChang that's great, thanks for the heads up. We don't use Facebook's SDK directly, instead developers include it when they want to authenticate with Facebook and then link that identity with a Firebase auth token. I'm glad this has moved over to using Cocoapods, I hope you're using the iOS Resolver ;)

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