[x264-devel] how to compile x264 on Mac 10.8 for iPhoneSimulator6.1.sdk

Gmail clican at gmail.com
Sat Feb 16 14:02:10 CET 2013


Dear support,

I want to compile x264 for ffmpeg and use it for iPhone related development.
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.

Below is the command I use.

#For armv7 it works well
CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --prefix='dist/armv7' --extra-cflags='-arch armv7' --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/ --extra-ldflags='-arch armv7' --enable-pic --enable-static --enable-shared
make
make install

#For armv7s it works well
CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --prefix='dist/armv7s' --extra-cflags='-arch armv7s' --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/ --extra-ldflags='-arch armv7s' --enable-pic --enable-static --enable-shared


#For i386 it report error

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
./configure: line 733: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings: No such file or directory
./configure: line 735: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings: No such file or directory
endian test failed


#If I remove the --cross-prefix=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ 

CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk --disable-asm --prefix=dist/i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/usr/lib/system' --enable-pic --enable-static

when I execute make it will report error as below:

/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
In file included from common/common.h:959,
                 from x264.c:33:
common/rectangle.h: In function 'x264_macroblock_cache_rect':
common/rectangle.h:84: error: 'v4si' undeclared (first use in this function)
common/rectangle.h:84: error: (Each undeclared identifier is reported only once
common/rectangle.h:84: error: for each function it appears in.)
common/rectangle.h:84: error: expected ';' before 'v16'
common/rectangle.h:86: error: '__m128' undeclared (first use in this function)
common/rectangle.h:86: error: expected ';' before 'v16'
common/rectangle.h:87: error: expected ';' before 'v16'
common/rectangle.h:89: error: expected ';' before 'v16'
common/rectangle.h:90: error: expected ';' before 'v16'
make: *** [x264.o] Error 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130216/bddb568d/attachment.html>


More information about the x264-devel mailing list