Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:54+00:00 2026-05-25T09:34:54+00:00

Using Xcode 4.0.2 , I have a target that compiles, links, and runs properly

  • 0

Using Xcode 4.0.2, I have a target that compiles, links, and runs properly in the simulator. However when I compile and link it for an iOS device I get the following (full) linker error:

Ld /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness normal armv7
    cd /Users/mike/src/FOO/FOObar
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.2
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos -F/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos -filelist /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Intermediates/FOObar.build/Debug-iphoneos/FrameworkHarness.build/Objects-normal/armv7/FrameworkHarness.LinkFileList -dead_strip -miphoneos-version-min=4.2 -framework FOObar -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness

Assertion failed: (atom->fixupCount() == 1), function targetCString, file /SourceCache/ld64/ld64-123.3/src/ld/parsers/macho_relocatable_file.cpp, line 4831.
0  0x13886  __assert_rtn + 86
1  0x2dfd8  mach_o::relocatable::PointerToCStringSection<arm>::targetCString(mach_o::relocatable::Atom<arm> const*, ld::IndirectBindingTable const&) const + 280
2  0x2b27c  mach_o::relocatable::PointerToCStringSection<arm>::contentHash(mach_o::relocatable::Atom<arm> const*, ld::IndirectBindingTable const&) const + 76
3  0x2c57f  mach_o::relocatable::Atom<arm>::contentHash(ld::IndirectBindingTable const&) const + 47
4  0xae870  ld::tool::SymbolTable::findSlotForReferences(ld::Atom const*, ld::Atom const**) + 704
5  0xb21dc  ld::tool::Resolver::convertReferencesToIndirect(ld::Atom const&) + 268
6  0xb33f2  ld::tool::Resolver::doAtom(ld::Atom const&) + 642
7  0x21f7c  mach_o::relocatable::File<arm>::forEachAtom(ld::File::AtomHandler&) const + 60
8  0xaa29e  ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&) const + 46
9  0xb5924  ld::tool::Resolver::resolve() + 84
10  0x14ff7  main + 871
collect2: ld returned 1 exit status

Can someone shed some light on this?

Thanks Mike

Invocation with -v

/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -v -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos -F/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos -filelist /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Intermediates/FOObar.build/Debug-iphoneos/FrameworkHarness.build/Objects-normal/armv7/FrameworkHarness.LinkFileList -dead_strip -miphoneos-version-min=4.2 -framework FOObar -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness
Using built-in specs.
Target: arm-apple-darwin10
Configured with: /var/tmp/llvmgcc42_Embedded/llvmgcc42_Embedded-2373.6~5/src/configure --enable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/Developer/usr/llvm-gcc-4.2/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --enable-llvm=/var/tmp/llvmgcc42_Embedded/llvmgcc42_Embedded-2373.6~5/dst-llvmCore/Developer/usr/local --enable-werror-always --program-prefix=arm-apple-darwin10- --host=i686-apple-darwin10 --target=arm-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 --with-build-sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.Internal.sdk
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2373.6)
 /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../libexec/gcc/arm-apple-darwin10/4.2.1/collect2 -dynamic -arch armv7 -dead_strip -iphoneos_version_min 4.2 -syslibroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -weak_reference_mismatches non-weak -o /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos/FrameworkHarness.app/FrameworkHarness -lcrt1.3.1.o -L/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos -L/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/arm-apple-darwin10/4.2.1/v7 -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib -L/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/arm-apple-darwin10/4.2.1 -L/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc -L/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/arm-apple-darwin10/4.2.1/../../.. -filelist /Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Intermediates/FOObar.build/Debug-iphoneos/FrameworkHarness.build/Objects-normal/armv7/FrameworkHarness.LinkFileList -framework FOObar -framework UIKit -framework Foundation -framework CoreGraphics -lgcc_s.1 -lgcc -lSystem -F/Users/mike/Library/Developer/Xcode/DerivedData/FOObar-ezjrxybxyybadxguvscgaqtaelju/Build/Products/Debug-iphoneos
Assertion failed: (atom->fixupCount() == 1), function targetCString, file /SourceCache/ld64/ld64-123.3/src/ld/parsers/macho_relocatable_file.cpp, line 4831.
0  0x13886  __assert_rtn + 86
1  0x2dfd8  mach_o::relocatable::PointerToCStringSection<arm>::targetCString(mach_o::relocatable::Atom<arm> const*, ld::IndirectBindingTable const&) const + 280
2  0x2b27c  mach_o::relocatable::PointerToCStringSection<arm>::contentHash(mach_o::relocatable::Atom<arm> const*, ld::IndirectBindingTable const&) const + 76
3  0x2c57f  mach_o::relocatable::Atom<arm>::contentHash(ld::IndirectBindingTable const&) const + 47
4  0xae870  ld::tool::SymbolTable::findSlotForReferences(ld::Atom const*, ld::Atom const**) + 704
5  0xb21dc  ld::tool::Resolver::convertReferencesToIndirect(ld::Atom const&) + 268
6  0xb33f2  ld::tool::Resolver::doAtom(ld::Atom const&) + 642
7  0x21f7c  mach_o::relocatable::File<arm>::forEachAtom(ld::File::AtomHandler&) const + 60
8  0xaa29e  ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&) const + 46
9  0xb5924  ld::tool::Resolver::resolve() + 84
10  0x14ff7  main + 871
collect2: ld returned 1 exit status

Additional Details

This occurred when I was linking compiled .m files for an application called FrameworkHarness with a framework that I have created called FOOBar. The framework recipe came from: http://db-in.com/blog/2011/07/universal-framework-iphone-ios-2-0/

There is no linking error when I:

  • Compile .m files from the FOObar frameworks directly with FrameworkHarness’s .m files for the simulator.
  • Compile .m files from the FOObar frameworks directly with FrameworkHarness’s .m files for the iOS Device.
  • Link the FOObar framework with compiled FrameworkHarness’s .m files for the simulator.

There is a linking error when I:

  • Link the FOObar framework with compiled FrameworkHarness’s .m files for the iOS Device.

I tired to isolate the issue with the framework by removing one of the 5 areas that make from the framework. Each time I linked the modified framework with the compiled FrameworkHarness’s .m files for the iOS Device there were no link errors.

Next I left the framework intact, but removed calls to one of the 5 areas in the framework from the application. I was able to isolate the framework area that would cause the linker issue for the iOS Device. I did the same process removing code in the framework and was able to identify specific code that when link against caused the error. I moved code around in that area of the framework and the link error went away. However the code that I moved was superficial and all I did was move the code from one function into a new function, and call that function from the original function. The code that was moved is:

// Prompt are you sure?
NSString *message = [[NSString alloc] initWithFormat:@"Are you sure you want to remove the vlaue \"%@\" from the list?", [array objectAtIndex:[pickerView selectedRowInComponent:0]]];
UIAlertView *alertView =
    [[UIAlertView alloc] initWithTitle:@"Confirmation needed"
                               message:message
                              delegate:self
                     cancelButtonTitle:@"Keep"
                     otherButtonTitles:@"Remove", nil];
[message release];
[alertView show];
[alertView release];

Using nm to compare the framworks symbols

I ran nm on the iOS device and simulated frameworks. There were some difference between the versions, but nothing that screamed

nm -j -a

-j Just display the symbol names (no value or type).
-a Display all symbol table entries, including those inserted for use by debuggers.

diff nm.ios nm.sim 
125a126,134
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
> EH_Frame1
313d321
< ___divsi3
324a333
> _objc_msgSend_fpret
327a337,431
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
> func.eh
  • EH_Frame1 and func.eh are “S” (symbol in a section other than those above)
  • ___divsi3 and _objc_msgSend_fpret are “U” (undefined)

nm -j -g

-j Just display the symbol names (no value or type).
-g Display only global (external) symbols.

diff nm.ios nm.sim 
83d82
< ___divsi3
89a89
> _objc_msgSend_fpret

nm -j -u

-j Just display the symbol names (no value or type).
-u Display only undefined symbols.

diff nm.ios nm.sim 
37d36
< ___divsi3
43a43
> _objc_msgSend_fpret

Possible Next Steps

Is there a linker flag to tell it to spit out what it is working on so I can see what it was doing just before the assertion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:34:54+00:00Added an answer on May 25, 2026 at 9:34 am

    Upgrade to the latest version of Xcode (currently 4.1, not including beta). This should solve your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that works on iPhone simulator but not on iPhone target
I have an application that was originally created compatible with iOS 2.x. With Xcode
Possible Duplicate: Is it possible to target older iOS versions when using Xcode 4.2
I have a project that I started in xcode 3.x It is using 3
How can I self-sign an iPhone application using Xcode? I have done the following:
Ok, I'm programming in objective-C and using Xcode. I have read through the documentation
I have created a UItableView using the default Xcode template and configure it to
Currently, I have an iPhone app published in AppStore. I've developed it using XCode
Suppose I have my project using Base SDK = 4 but set the Target
This had been driving me crazy.... I have an iPhone app that is using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.