Note that there are some explanatory texts on larger screens.

plurals
  1. POin /usr/lib/system/libcache.dylib, missing required architecture armv6
    primarykey
    data
    text
    <p>In attempting to compile a dummy program for iphoneos, Xcode4, gcc does not appear to reach beyond the initial sysroot directory</p> <pre><code>$ echo $ISYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk $ gcc -arch armv6 --sysroot=$ISYSROOT test.cpp ld: in /usr/lib/system/libcache.dylib, missing required architecture armv6 in file for architecture armv6 collect2: ld returned 1 exit status </code></pre> <p>If I leave out sysroot,</p> <pre><code>$ gcc -arch armv6 test.cpp ld: warning: ignoring file /usr/lib/crt1.o, missing required architecture armv6 in file ld: warning: ignoring file /usr/lib/libgcc_s.1.dylib, missing required architecture armv6 in file ld: warning: ignoring file /usr/lib/libSystem.dylib, missing required architecture armv6 in file Undefined symbols for architecture armv6: "start", referenced from: -u command line option ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status </code></pre> <p>The following works, but it feels very cheesy, and not scalable. What's going on here?</p> <pre><code>$ gcc -arch armv6 -L$ISYSROOT/usr/lib/system --sysroot=$ISYSROOT test.cpp </code></pre> <p><strong>Update.</strong> Apparently this is a known issue, though it still is not clear how to pass sysroot to gcc but isysroot to ld</p> <p><a href="http://www.doitscared.com/?m=201104" rel="noreferrer">http://www.doitscared.com/?m=201104</a></p> <blockquote> <p>When compiling the library, if you see this error “ld: file not found: /usr/lib/system/libcache.dylib for architecture armv7″, then your linker command is using “–sysroot” which doesn’t work in Xcode 4. Instead, change the linker command to use “-isysroot”. (Note: This only applies to the linker command. The compile commands must continue to use “–sysroot”. See here for more details.)</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload