Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

defined symbols for architecture i386: After updating Yosemite and Pod install

I don't know how I am getting so many errors. I updated my mac to Yosemite, updated my cocoa did a pod install.

I feel bad cause there are tons of similiar questions but I cannot find any that seem relevant. I have tried to update cocoa pods reinstall. delete pod files and do a pod init, check my architecture which has armvs6, armvs7 standard architecture. I am really confused here.

defined symbols for architecture i386:
  "_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
      objc-class-ref in LoginController.o
  "_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
      objc-class-ref in ChatController.o
      objc-class-ref in TutorSessionViewController.o
      objc-class-ref in StudentSessionManager.o
      objc-class-ref in TutorSessionManager.o
      objc-class-ref in Device.o
      objc-class-ref in RequestHandler.o
      objc-class-ref in TutorMapController.o
      ...
  "_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
      objc-class-ref in ChatController.o
      objc-class-ref in TutorSessionViewController.o
      objc-class-ref in StudentSessionManager.o
      objc-class-ref in TutorSessionManager.o
      objc-class-ref in Device.o
      objc-class-ref in RequestHandler.o
      objc-class-ref in TutorMapController.o
      ...
  "_OBJC_CLASS_$_AMTagView", referenced from:
      objc-class-ref in ProfileController.o
  "_OBJC_CLASS_$_APNavigationController", referenced from:
      objc-class-ref in StudentSessionManager.o
      objc-class-ref in TutorSessionManager.o
  "_OBJC_CLASS_$_FUIButton", referenced from:
      _OBJC_CLASS_$_GreenButton in GreenButton.o
      _OBJC_CLASS_$_RedButton in RedButton.o
  "_OBJC_CLASS_$_JSBubbleImageViewFactory", referenced from:
      objc-class-ref in ChatController.o
  "_OBJC_CLASS_$_JSBubbleView", referenced from:
      objc-class-ref in ChatController.o
  "_OBJC_CLASS_$_JSMessage", referenced from:
      _OBJC_CLASS_$_TreeMessage in Treemessage.o
  "_OBJC_CLASS_$_JSMessagesViewController", referenced from:
      _OBJC_CLASS_$_ChatController in ChatController.o
  "_OBJC_CLASS_$_NZCircularImageView", referenced from:
      objc-class-ref in ChatController.o
  "_OBJC_CLASS_$_PKImagePickerViewController", referenced from:
      objc-class-ref in SignUpPhotoTableViewCell.o
  "_OBJC_CLASS_$_RATreeView", referenced from:
      objc-class-ref in SubjectViewController.o
  "_OBJC_CLASS_$_RNBlurModalView", referenced from:
      objc-class-ref in TutorOptions.o
      objc-class-ref in ChatController.o
      objc-class-ref in CHTumblrMenuView.o
      objc-class-ref in SubjectAddViewController.o
  "_OBJC_CLASS_$_SDImageCache", referenced from:
      objc-class-ref in ProfileSetting.o
      objc-class-ref in JAAppDelegate.o
  "_OBJC_CLASS_$_SRHubConnection", referenced from:
      objc-class-ref in JAAppDelegate.o
  "_OBJC_CLASS_$_SVProgressHUD", referenced from:
      objc-class-ref in TutorOptions.o
      objc-class-ref in ChatController.o
      objc-class-ref in JALeftViewController.o
      objc-class-ref in UserProfileView.o
      objc-class-ref in RequestHandler.o
      objc-class-ref in TimerSessionController.o
      objc-class-ref in SplashViewController.o
      ...
  "_OBJC_CLASS_$_TWMessageBarManager", referenced from:
      objc-class-ref in MessangeHandler.o
  "_OBJC_METACLASS_$_FUIButton", referenced from:
      _OBJC_METACLASS_$_GreenButton in GreenButton.o
      _OBJC_METACLASS_$_RedButton in RedButton.o
  "_OBJC_METACLASS_$_JSMessage", referenced from:
      _OBJC_METACLASS_$_TreeMessage in Treemessage.o
  "_OBJC_METACLASS_$_JSMessagesViewController", referenced from:
      _OBJC_METACLASS_$_ChatController in ChatController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Here is my Podfile

source 'https://github.com/CocoaPods/Specs.git'

target 'StudyTree' do

pod 'JSMessagesViewController'
pod 'XHRealTimeBlur'
pod 'PKImagePicker', '~> 0.0.3'
pod 'SVProgressHUD', :head
pod 'RMStepsController', '~> 1.0.1'
pod 'TWMessageBarManager', '~> 1.7.0'
pod 'TTCounterLabel'
pod 'RATreeView', '~> 0.2.2'


pod 'AFPopupView', '~> 1.0'
pod 'AMTagListView'
pod 'RNBlurModalView', '~> 0.1.0'
pod 'BPForms'
pod 'SignalR-ObjC', :git=>'https://github.com/DyKnow/SignalR-ObjC.git', :branch => 'feature-2.0.0.beta1'
pod 'APDropDownNavToolbar', '~> 1.1'
pod 'FlatUIKit'
pod 'NZCircularImageView', '~> 0.0.4'
xcodeproj '/Users/ethankeiser/WorkSpace/test/StudyTree/StudyTree.xcodeproj'
end

EDIT

So I removed all Other Linker Flag and replaced it with $(inherited) and I still get this.

[!] The `StudyTree [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-StudyTree/Pods-StudyTree.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `StudyTree [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-StudyTree/Pods-StudyTree.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.
like image 427
EK_AllDay Avatar asked Oct 19 '14 23:10

EK_AllDay


2 Answers

In the Build Settings, find "Other Linker Flags". If it is bold, select it and press backspace, it should be back to its normal state. If it is not fixed, delete all the flags, then remove and reinstall Pods.

like image 57
quaertym Avatar answered Oct 06 '22 05:10

quaertym


I had a very similar series of errors building my tests which use OCHamcrest and OCMock, e.g.:

Undefined symbols for architecture i386:
  "_HC_assertThatLongLongWithLocation", referenced from:
      -[WNGLoggerTests test_convertToMetricMessage_constructs_a_proper_metric] in loggerTests.o
  "_HC_assertThatUnsignedIntegerWithLocation", referenced from:
      -[WNGLoggerTests test_timerCount_reports_the_correct_number_of_timers_in_progress] in loggerTests.o
  "_OBJC_CLASS_$_OCMockObject", referenced from:
      objc-class-ref in LoggingConnectionDelegateTests.o
      objc-class-ref in loggerTests.o

but the solution was different for my scenario.

During my investigation I verified that the XCode 6.0.1 Command-Line tools were installed and it appeared things were ok.

However, my solution was to (re-)install the XCode Command-Line tools with:

xcode-select --install

I found it very helpful to use exactly the same version of CocoaPods (0.33.1) and note the differences in xctool between my local environment (0.2.2) and Travis (0.2).

I believe I am still encountering https://github.com/facebook/xctool/issues/380 on TravisCI, which still has https://github.com/travis-ci/travis-ci/issues/2841 open.

Note that everything had been working fine in XCode 6 before upgrading from Mavericks to Yosemite.

like image 38
skuenzli Avatar answered Oct 06 '22 06:10

skuenzli