Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidLeblond

macrumors 68020
Original poster
Jan 6, 2004
2,351
678
Raleigh, NC
I'm rebuilding one of my Cocoa programs so that it makes use of Core Data. So far I'm almost done, and I haven't even had to add one bit of code yet... sweet!

Anyway, on a whim I decided to check the little Intel box and compile it. This is what I got:

Code:
/usr/bin/ld: warning /System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libmx.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_atexit
_errno
_exit
_mach_init_routine
_NSAddressOfSymbol
_NSLookupAndBindSymbol
_abort
___sF
_fflush
_fprintf
_memcpy
_memset
_pthread_once
__keymgr_get_and_lock_processwide_ptr
__keymgr_set_and_unlock_processwide_ptr
__keymgr_unlock_processwide_ptr
_calloc
_free
_getsectdatafromheader
_malloc
_NSAddImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSCreateObjectFileImageFromFile referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSGetSectionDataInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSHasModInitObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSInstallLinkEditErrorHandlers referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSLinkModule referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSLookupAndBindSymbol referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSSymbolDefinitionCountInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSSymbolDefinitionNameInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
___sF referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_get_image_header referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_get_image_name referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_image_count referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_register_func_for_add_image referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_abort referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_fprintf referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_getenv referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_getsectbynamefromheader referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_malloc referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcat referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcmp referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcpy referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSAddressOfSymbol referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSFindSectionAndOffsetInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSIsSymbolNameDefined referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_fwrite referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_calloc referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
collect2: ld returned 1 exit status

What gives?
 

shambolic

macrumors regular
Oct 27, 2003
126
5
Staten Island, NY
From what I've read on the Apple developer lists, ZeroLink doesn't work with Intel targets. Disable it (or change your build style from Development to Deployment, that worked for me) and your universal binary should build successfully.
 

jcgerm

macrumors member
May 28, 2003
91
0
DavidLeblond said:
I'm rebuilding one of my Cocoa programs so that it makes use of Core Data. So far I'm almost done, and I haven't even had to add one bit of code yet... sweet!

Anyway, on a whim I decided to check the little Intel box and compile it. This is what I got:

Code:
/usr/bin/ld: warning /System/Library/Frameworks/Cocoa.framework/Cocoa cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libmx.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.0/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: warning fat file: /usr/lib/libSystem.B.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
___keymgr_dwarf2_register_sections
__cthread_init_routine
_atexit
_errno
_exit
_mach_init_routine
_NSAddressOfSymbol
_NSLookupAndBindSymbol
_abort
___sF
_fflush
_fprintf
_memcpy
_memset
_pthread_once
__keymgr_get_and_lock_processwide_ptr
__keymgr_set_and_unlock_processwide_ptr
__keymgr_unlock_processwide_ptr
_calloc
_free
_getsectdatafromheader
_malloc
_NSAddImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSCreateObjectFileImageFromFile referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSGetSectionDataInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSHasModInitObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSInstallLinkEditErrorHandlers referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSLinkModule referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSLookupAndBindSymbol referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSSymbolDefinitionCountInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSSymbolDefinitionNameInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
___sF referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_get_image_header referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_get_image_name referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_image_count referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
__dyld_register_func_for_add_image referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_abort referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_fprintf referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_getenv referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_getsectbynamefromheader referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_malloc referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcat referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcmp referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_strcpy referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSAddressOfSymbol referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSFindSectionAndOffsetInObjectFileImage referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_NSIsSymbolNameDefined referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_fwrite referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
_calloc referenced from ZeroLink expected to be defined in /usr/lib/libSystem.B.dylib
collect2: ld returned 1 exit status

What gives?

Well, you're using the wrong SDK. The 10.4 Universal SDK doesn't install by default. If you did install it make sure you change the SDK you're using to "10.4 Universal". It'll compile, but you won't be able to test it until you have access to an Intel Mac.

As far as the ZeroLink comment, you're right. Intel Macs don't use ZeroLink, but you don't have to mess with the ZeroLink settings at all. Xcode is smart enough to know what's going on in that respect.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.