Skip to content

Apple Mach-O Linker (ld) Error Group #258

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

Closed
TofPlay opened this issue Sep 13, 2017 · 24 comments
Closed

Apple Mach-O Linker (ld) Error Group #258

TofPlay opened this issue Sep 13, 2017 · 24 comments

Comments

@TofPlay
Copy link

TofPlay commented Sep 13, 2017

  • Xcode version: Xcode 9.0 (9A235) (GM version)
  • Firebase SDK version: Firebase 4.1.1
  • Library version: _____
  • Firebase Product: core, crash

Step 3: Describe the problem

At build generate error Apple Mach-O Linker (ld) Error Group

ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/Protobuf'
ld: warning: directory not found for option '-F/Users/me/Library/Developer/Xcode/DerivedData/My App-cbbpbhsjrtvjwkakgwmzqckliizs/Build/Products/Debug-iphoneos/nanopb'
ld: framework not found GoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce:

  1. Create a project and with CocoaPods define a Podfile:
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
use_frameworks!

target 'My App' do
  pod 'Firebase/Analytics'
  pod 'Firebase/Crash'
end
  1. Install pods
$ pod --version
1.3.1
$ pod install
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.1.1)
Installing FirebaseAnalytics (4.0.3)
Installing FirebaseCore (4.0.6)
Installing FirebaseCrash (2.0.1)
Installing FirebaseInstanceID (2.0.2)
Installing GoogleToolboxForMac (2.1.1)
Installing Protobuf (3.4.0)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `My App.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 9 total pods installed.
  1. Build the app
@paulb777
Copy link
Member

Most likely you need to generate the Xcode workspace instead of the Xcode project. More details at https://stackoverflow.com/questions/40358719/framework-not-found-googletoolboxformac

@TofPlay
Copy link
Author

TofPlay commented Sep 13, 2017

I used workspace already not the xcode project
I also done pod deintegrate, rm -rf Pods/ Podfile.lock *.xcworkspace followed by pod install to regenerate the workspace. That doesn't changed anything.

@paulb777
Copy link
Member

Try removing Xcode's DerivedData. One way is rm -rf ~/Library/Developer/Xcode/DerivedData

@TofPlay
Copy link
Author

TofPlay commented Sep 13, 2017

Already done several times

@paulb777
Copy link
Member

Are you able to build the Firebase Quickstarts? For example, https://github.com/firebase/quickstart-ios/tree/master/analytics

@TofPlay
Copy link
Author

TofPlay commented Sep 14, 2017

Yes I can build analytics

@TofPlay
Copy link
Author

TofPlay commented Sep 14, 2017

From what I can see CocoaPods does not build Firebase components on my project. On DerivedData/<My folder project build>/Build/Products/Debug-iphoneos I don't have any Firebase framework. The project Pods is not build automatically.

@TofPlay
Copy link
Author

TofPlay commented Sep 14, 2017

Found it!
Go to <Your app> > Edit Scheme > Build the option Find Implicit Dependencies must be checked

image

@TofPlay TofPlay closed this as completed Sep 14, 2017
@paulb777
Copy link
Member

@TofPlay Good find! Thanks for tracking it down and sharing!

Do you know how Find Implicit Dependencies got unchecked? It seems to always checked by default on project creation.

@TofPlay
Copy link
Author

TofPlay commented Sep 14, 2017

Do you know how Find Implicit Dependencies got unchecked?

No I don't know. I'm sure I doesn't unchecked by myself!

@omarhuss
Copy link

omarhuss commented Sep 21, 2017

I have the same errors, Xcode version is 8.3.3 and Pod version: 1.3.1 with @TofPlay's same pod installations, running on Mac OS X 10.12.6.

*Terminal displayed this in addition to @TofPlay error results:

        Ld build/emulator/PROJECT_NAME.app/PROJECT_NAME normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/user/Desktop/PROJECT_NAME/platforms/ios/cordova/build-debug.xcconfig,-
workspace,PROJECT_NAME.xcworkspace,-scheme,PROJECT_NAME,-configuration,Debug,-
sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone
SE,build,CONFIGURATION_BUILD_DIR=/Users/user/Desktop/PROJECT_NAME/platforms/ios/build/e
mulator,SHARED_PRECOMPS_DIR=/Users/user/Desktop/PROJECT_NAME/platforms/ios/build/sharedpch

@TofPlay
Copy link
Author

TofPlay commented Sep 24, 2017

@paulb777 do you have plan to provide a Carthage version of your component? On our new projects CocoaPods is no longer accepted. And gradually the components that do not support Carthage are removed from the old projects. If Firebase does not offer Carthage support we will migrate to another solution.

@morganchen12
Copy link
Contributor

@TofPlay see #9 (cc @salqadri)

@TofPlay
Copy link
Author

TofPlay commented Sep 26, 2017

@morganchen12 I know this ticket. I even tried to help you by providing you a link on a tutorial for cross platform framework and Carthage support.

The removal of CocoaPods is in progress... tic tac tic tac ⏳

@morganchen12
Copy link
Contributor

Ah, whoops :)

We don't have plans to distribute dylibs, which is the main driver behind us not supporting Carthage. However, it may be worth while trying to distribute a static framework module through Carthage since we'd be distributing a binary anyway. Carthage iirc should just download this module and place it in a folder, leaving the integration to the developer--so it shouldn't cause any fundamental incompatibility issues unless someone tries to wrap our static module in a dylib and redistribute it.

Would this be suitable for your needs?

@TofPlay
Copy link
Author

TofPlay commented Sep 30, 2017

Would this be suitable for your needs?

No. We will not, just for Firebase, have a special process.
If you do not support Carthage very soon Firebase will be removed from our projects.

@papago-development
Copy link

papago-development commented Oct 5, 2017

TofPlay same error for me , i have " Find Implicit " checked!! please help

@papago-development
Copy link

now i have
libMobileGestalt MobileGestaltSupport.m:153: pid 411 (MyApp) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled

@grubephi
Copy link

Here's what worked for me:
remove the affected pod (for me it was firebase) from your podfile
run pod install
put the removed pods back into the podfile again
run pod install.
Clean and rebuild your project!

@technoplato
Copy link

@grubephi Just tried that. Still no luck in a permanent solution when just creating a super simple Firebase project.

For me, what works is simply cleaning the project (CMD + SHIFT + K)

Very annoying, but I'm sure we'll find a better solution eventually.

@aperechnev
Copy link

I have exactly the same problem :(

@kartik-kanaujia
Copy link

If building on mac for ios in unity, make sure that in the build settings you disable "Metal Editor Support" under other settings for the ios platform.

@hostchange
Copy link

Here is the simple solution friends.

For cocoapods you have to use the xcode workspace file not the xcode project file

@nzrsrk
Copy link

nzrsrk commented Sep 21, 2018

using xcode workspace but same error

@firebase firebase locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests