Apple Mach-O linker errors after updating XCode

183 views
Skip to first unread message

ar...@heka.house

unread,
Jul 2, 2018, 4:59:10 PM7/2/18
to Firebase Google Group
My app has not been able to build since I updated Xcode to 9.4, it has numerous Mach-O linker errors all stemming from Firebase. I made sure to launch from .xcworkspace file, have ensured that enable bitcode is set to no and that find implicit dependencies is selected - yet the errors remain.

I can find nothing helpful online, have removed derived folder and clean/built project many times.

I even rewrote the app which was previously in Swift and Objective-C to be entirely in Swift to no avail - it has the exact same errors.

Here is the Firebase section of my Podfile:

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'Firebase/MLVision'
  pod 'Firebase/MLVisionBarcodeModel'
mach-o_linker_error.txt

Jeremy Rosser

unread,
Jul 2, 2018, 8:35:11 PM7/2/18
to fireba...@googlegroups.com
Have you done a pod install recently. These usually seem to help me with those types of errors / warnings. 
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/87e98403-2c36-4ef3-b184-edbaa1ecef1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<mach-o_linker_error.txt>

Aron Price

unread,
Jul 3, 2018, 9:59:50 AM7/3/18
to fireba...@googlegroups.com
I have installed, removed and installed again with exactly the same result.

On Mon, Jul 2, 2018 at 7:29 PM, Jeremy Rosser <jro...@gmail.com> wrote:
Have you done a pod install recently. These usually seem to help me with those types of errors / warnings. 

On Jul 2, 2018, at 4:14 PM, ar...@heka.house wrote:

My app has not been able to build since I updated Xcode to 9.4, it has numerous Mach-O linker errors all stemming from Firebase. I made sure to launch from .xcworkspace file, have ensured that enable bitcode is set to no and that find implicit dependencies is selected - yet the errors remain.

I can find nothing helpful online, have removed derived folder and clean/built project many times.

I even rewrote the app which was previously in Swift and Objective-C to be entirely in Swift to no avail - it has the exact same errors.

Here is the Firebase section of my Podfile:

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'Firebase/MLVision'
  pod 'Firebase/MLVisionBarcodeModel'

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/87e98403-2c36-4ef3-b184-edbaa1ecef1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<mach-o_linker_error.txt>

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Paul Beusterien

unread,
Jul 3, 2018, 6:19:25 PM7/3/18
to Firebase Google Group
The link command line log is missing the -ObjC option which CocoaPods should have added to the app's "Other Linker Flags" Build Setting.


On Tuesday, July 3, 2018 at 6:59:50 AM UTC-7, Aron Price wrote:
I have installed, removed and installed again with exactly the same result.
On Mon, Jul 2, 2018 at 7:29 PM, Jeremy Rosser <jro...@gmail.com> wrote:
Have you done a pod install recently. These usually seem to help me with those types of errors / warnings. 

On Jul 2, 2018, at 4:14 PM, ar...@heka.house wrote:

My app has not been able to build since I updated Xcode to 9.4, it has numerous Mach-O linker errors all stemming from Firebase. I made sure to launch from .xcworkspace file, have ensured that enable bitcode is set to no and that find implicit dependencies is selected - yet the errors remain.

I can find nothing helpful online, have removed derived folder and clean/built project many times.

I even rewrote the app which was previously in Swift and Objective-C to be entirely in Swift to no avail - it has the exact same errors.

Here is the Firebase section of my Podfile:

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'Firebase/MLVision'
  pod 'Firebase/MLVisionBarcodeModel'

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/87e98403-2c36-4ef3-b184-edbaa1ecef1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<mach-o_linker_error.txt>

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

ar...@heka.house

unread,
Jul 4, 2018, 10:58:30 AM7/4/18
to Firebase Google Group

It appears that the -ObjC flag is set first


Is this where I would configure the option or is there somewhere else I can look?

ar...@heka.house

unread,
Jul 5, 2018, 10:36:24 AM7/5/18
to Firebase Google Group

After pulling out most of the hair I have left I discovered that another pod I was using did not include bitcode and this was actually what was causing the failure - although it was not mentioned at all in any of the error messages.


Specifically I was using the Stitch SDK from MongoDB Atlas and when they released a new version if did not include bitcode.

I discovered this was the issue by repeatedly toggling enable bitcode, deintegrating pods and clean/builds of the project.

This was only made apparent after changing the enable bitcode flag under Pods build settings instead of under my project settings, then toggling it again from project settings.


To anyone else who encounters this issue I recommend trying to remove any non-Firebase pods as there can be compatibility issues that are not at all apparent from the error messages provided by Xcode.


For the Firebase support staff, you may want to consider recommending something like I mention above if people encounter these errors.

Reply all
Reply to author
Forward
0 new messages