[SOLVED] Error when building Meteor App for iOS using Cordova


#1
Apple Mach-O Linker (ld) Error Group 
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am running: meteor run ios-device, and I am getting that in build-time error logs in XCode 8.3.2, running on macOS 10.12.4, and meteor version is: 1.2.1

Any help is more than welcome, I am completely lost at this.


#2

Solved
Using XCode8, Toggle Build Settings -> ‘No Common Blocks’ , see what works.


#3

Hitting this error now. What was the setting that worked for you?


#4

@themuffinman don’t remember try with both. Also make sure you check out the error logs.


#5

Turns out I was working with the .xcodeproj file;
I, instead, needed to open the .xcworkspace.

The error went away after that


#6

I just encountered this issue again. It was fixed last time by using the .xcworkspace but now nothing helps

“: Linker command failed with exit code 1 (use -v to see invocation)”

is there anything else I have to try?


#7

Same thing as @fullhdpixel : the workspace workaround used to work some months ago, but now it fails systematically with the same Meteor project.


#8

This issue is really urgent for me. I’ve got a broken IOS app since two weeks in the play store and I cannot release new update.


#9

OK, I solved the problem on my app by recreating a blank meteor project, carefully copying all code, asset and db files into the new folder, then reinstalling Meteor and npm packages.

Before reinstalling any Cordova plugin, I tried to deploy a build to iOS : it worked without problem. Then I reinstalled all Cordova plugins one by one, and noticed Xcode started to raise the Apple Mach-O Linker error again right after installing a specific plugin : phonegap-plugin-push.

But this time, the workspace workaround mentioned by @themuffinman worked again and I could deploy my app to iPhone.


#10

10 days later, the problem is back again. The very same app I mentioned in my previous post refuses to build.


#11

Still same issue. Here’s what I tried:

  • Removing cordova plugins
  • Switching to new empty project and then adding stuff back in
  • Removing and adding ios platform
  • Opening workspace instead of project

Honestly, I’m giving up on development with Meteor/Cordova right now. My startup idea is not working out anyway, but for my next project I’ll go try react native


#12
duplicate symbol _OBJC_CLASS_$_CDVLogger in:
    fullhdpixel/Library/Developer/Xcode/DerivedData/appname-aotwoinuwlctmlgpvvoasrqgfaon/Build/Intermediates.noindex/appname.build/Debug-iphonesimulator/appname.build/Objects-normal/x86_64/CDVLogger.o
    fullhdpixel/Library/Developer/Xcode/DerivedData/appname-aotwoinuwlctmlgpvvoasrqgfaon/Build/Products/Debug-iphonesimulator/libCordova.a(CDVLogger.o)
duplicate symbol _OBJC_METACLASS_$_CDVLogger in:
    fullhdpixel/Library/Developer/Xcode/DerivedData/appname-aotwoinuwlctmlgpvvoasrqgfaon/Build/Intermediates.noindex/appname.build/Debug-iphonesimulator/appname.build/Objects-normal/x86_64/CDVLogger.o
    fullhdpixel/Library/Developer/Xcode/DerivedData/appname-aotwoinuwlctmlgpvvoasrqgfaon/Build/Products/Debug-iphonesimulator/libCordova.a(CDVLogger.o)
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Screen Shot 2017-11-13 at 19.25.56


#13

Adding

cordova-plugin-console@1.1.0

to .meteor/cordova-plugins file fixed the problem for me.


#14

Wow it works! Thankss!!


#15

Indeed, installing this plugin - or upgrading to Meteor 1.6 beta 5 - removes the error if the build is issued from the workspace.


#16

One of my iOS developers is facing this type of error, I am going to provide @diaconutheodor solution, I hope that would be work!!


#17

The same issue still exists in Meteor v1.6.1 :smirk: .The root cause for me is the phonegap-plugin-push. I have had to rollback its version from 2.2.2 to1.9.4 to continue …