<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear support,<div><br></div><div>I want to compile x264 for ffmpeg and use it for iPhone related development.</div><div>I can successfully compile armv7 and armv7s. But when I want to compile for i386 used for iPhoneSimulator6.1 I meet a lot of issue.</div><div><br></div><div>Below is the command I use.</div><div><br></div><div>#For armv7 it works well</div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/<span style="text-decoration: underline">usr</span>/bin/<span style="text-decoration: underline">gcc</span> ./configure --host=arm-apple-<span style="text-decoration: underline">darwin</span> --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/<span style="text-decoration: underline">usr</span>/bin/ --<span style="text-decoration: underline">sysroot</span>=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.<span style="text-decoration: underline">sdk</span> --prefix='<span style="text-decoration: underline">dist</span>/armv7' --extra-<span style="text-decoration: underline">cflags</span>='-arch armv7' --extra-<span style="text-decoration: underline">ldflags</span>=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.<span style="text-decoration: underline">sdk</span>/<span style="text-decoration: underline">usr</span>/<span style="text-decoration: underline">lib</span>/system/ --extra-<span style="text-decoration: underline">ldflags</span>='-arch armv7' --enable-<span style="text-decoration: underline">pic</span> --enable-static --enable-shared</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">make</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">make install</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; "><span style="font-family: Helvetica; font-size: medium; ">#For armv7s it works well</span></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/<span style="text-decoration: underline">usr</span>/bin/<span style="text-decoration: underline">gcc</span> ./configure --host=arm-apple-<span style="text-decoration: underline">darwin</span> --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/<span style="text-decoration: underline">usr</span>/bin/ --<span style="text-decoration: underline">sysroot</span>=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.<span style="text-decoration: underline">sdk</span> --prefix='<span style="text-decoration: underline">dist</span>/armv7s' --extra-<span style="text-decoration: underline">cflags</span>='-arch armv7s' --extra-<span style="text-decoration: underline">ldflags</span>=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.<span style="text-decoration: underline">sdk</span>/<span style="text-decoration: underline">usr</span>/<span style="text-decoration: underline">lib</span>/system/ --extra-<span style="text-decoration: underline">ldflags</span>='-arch armv7s' --enable-<span style="text-decoration: underline">pic</span> --enable-static --enable-shared</div></div><div><br></div><div><br></div><div>#For i386 it report error</div><div><br></div><div><div>CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk --prefix='dist/i386' --extra-cflags='-arch i386' --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/system/ --extra-ldflags='-arch i386' --enable-pic --enable-static --enable-shared --disable-asm</div><div>.<font color="#e32400">/configure: line 733: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings: No such file or directory</font></div><div><font color="#e32400">./configure: line 735: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings: No such file or directory</font></div><div><font color="#e32400">endian test failed</font></div></div><div><font color="#e32400"><br></font></div><div><font color="#e32400"><br></font></div><div><font color="#e32400">#If I remove the </font>--cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ </div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/<span style="text-decoration: underline">usr</span>/bin/<span style="text-decoration: underline">gcc</span> ./configure --host=arm-apple-<span style="text-decoration: underline">darwin</span> --<span style="text-decoration: underline">sysroot</span>=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.<span style="text-decoration: underline">sdk</span> --disable-<span style="text-decoration: underline">asm</span> --prefix=<span style="text-decoration: underline">dist</span>/i386 --extra-<span style="text-decoration: underline">cflags</span>='-arch i386' --extra-<span style="text-decoration: underline">ldflags</span>='-arch i386 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.<span style="text-decoration: underline">sdk</span>/<span style="text-decoration: underline">usr</span>/<span style="text-decoration: underline">lib</span>/system' --enable-<span style="text-decoration: underline">pic</span> --enable-static</div></div><div><br></div><div>when I execute make it will report error as below:</div><div><br></div><div><div><font color="#ff4013">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -Wshadow -O3 -fno-fast-math  -Wall -I. -I. --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -arch i386 -falign-loops=16 -std=gnu99 -fPIC -fomit-frame-pointer -fno-tree-vectorize   -c -o x264.o x264.c</font></div><div><font color="#ff4013">In file included from common/common.h:959,</font></div><div><font color="#ff4013">                 from x264.c:33:</font></div><div><font color="#ff4013">common/rectangle.h: In function 'x264_macroblock_cache_rect':</font></div><div><font color="#ff4013">common/rectangle.h:84: error: 'v4si' undeclared (first use in this function)</font></div><div><font color="#ff4013">common/rectangle.h:84: error: (Each undeclared identifier is reported only once</font></div><div><font color="#ff4013">common/rectangle.h:84: error: for each function it appears in.)</font></div><div><font color="#ff4013">common/rectangle.h:84: error: expected ';' before 'v16'</font></div><div><font color="#ff4013">common/rectangle.h:86: error: '__m128' undeclared (first use in this function)</font></div><div><font color="#ff4013">common/rectangle.h:86: error: expected ';' before 'v16'</font></div><div><font color="#ff4013">common/rectangle.h:87: error: expected ';' before 'v16'</font></div><div><font color="#ff4013">common/rectangle.h:89: error: expected ';' before 'v16'</font></div><div><font color="#ff4013">common/rectangle.h:90: error: expected ';' before 'v16'</font></div><div><font color="#ff4013">make: *** [x264.o] Error 1</font></div></div></body></html>