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

  • Home
  • SEARCH
  • 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 5935039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:11:51+00:00 2026-05-22T15:11:51+00:00

I faced with strange problem. I installed iPhone SDK 4.3 and xCode 4 and

  • 0

I faced with strange problem. I installed iPhone SDK 4.3 and xCode 4 and now I can’t compile libav from ffmpeg for ARMv6 architecture. This is my script to compile it (it works fine for iPhone SDK 4.2):

./configure \
--disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile \
--enable-encoder=rawvideo \
--enable-decoder=h264 \
--enable-decoder=mpeg4 \
--enable-encoder=mjpeg \
--enable-muxer=rawvideo \
--enable-demuxer=h264 \
--enable-parser=h264 \
--enable-cross-compile \
--arch=c \
--target-os=darwin \
--enable-libopencore-amrnb --enable-libopencore-amrwb \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 \
--as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer    /usr/bin/arm-apple-darwin10-gcc-4.2.1' \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6'

make clean
make   

as a result I get library files but when I check it with lipo -info command it shows that library was compiled for i386 architecture.

Maybe somebody faced with such problem? Help me please.

Thanks.

  • 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-22T15:11:52+00:00Added an answer on May 22, 2026 at 3:11 pm

    Updated Post

    Here is an updated script that removes armv6, adds armv7s, uses the iOS 6.0 SDK, and fixes issues with changes to the lipo tool. Make sure you have the latest gas-preprocessor.pl from github in /usr/local/bin:

    rm -r ./compiled
    
    # configure for armv7 build
    ./configure \
    --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=arm \
    --cpu=cortex-a8 \
    --extra-cflags='-arch armv7' \
    --extra-ldflags='-arch armv7' \
    --extra-cflags='-mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad' \
    --prefix=compiled/armv7 \
    --enable-pic \
    --enable-neon \
    --enable-cross-compile \
    --enable-optimizations \
    --disable-debug \
    --disable-armv5te \
    --disable-armv6 \
    --disable-armv6t2 \
    --disable-armvfp \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for armv7
    make clean
    make && make install
    
    # configure for armv7s build
    ./configure \
    --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=arm \
    --cpu=cortex-a8 \
    --extra-cflags='-arch armv7s' \
    --extra-ldflags='-arch armv7s' \
    --extra-cflags='-mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad' \
    --prefix=compiled/armv7s \
    --enable-pic \
    --enable-neon \
    --enable-cross-compile \
    --enable-optimizations \
    --disable-debug \
    --disable-armv5te \
    --disable-armv6 \
    --disable-armv6t2 \
    --disable-armvfp \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for armv7s
    make clean
    make && make install
    
    # configure for i386 build
    ./configure \
    --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=i386 \
    --cpu=i386 \
    --extra-cflags='-arch i386' \
    --extra-ldflags='-arch i386' \
    --prefix=compiled/i386 \
    --enable-cross-compile \
    --disable-mmx \
    --disable-armv5te \
    --disable-armv6 \
    --disable-armv6t2 \
    --disable-armvfp \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for i386
    make clean
    make && make install
    
    # make fat (universal) libs
    mkdir -p ./compiled/fat/lib
    
    lipo -output ./compiled/fat/lib/libavcodec.a  -create \
    ./compiled/armv7s/lib/libavcodec.a \
    ./compiled/armv7/lib/libavcodec.a \
    ./compiled/i386/lib/libavcodec.a
    
    lipo -output ./compiled/fat/lib/libavdevice.a  -create \
    ./compiled/armv7s/lib/libavdevice.a \
    ./compiled/armv7/lib/libavdevice.a \
    ./compiled/i386/lib/libavdevice.a
    
    lipo -output ./compiled/fat/lib/libavfilter.a  -create \
    ./compiled/armv7s/lib/libavfilter.a \
    ./compiled/armv7/lib/libavfilter.a \
    ./compiled/i386/lib/libavfilter.a
    
    lipo -output ./compiled/fat/lib/libavformat.a  -create \
    ./compiled/armv7s/lib/libavformat.a \
    ./compiled/armv7/lib/libavformat.a \
    ./compiled/i386/lib/libavformat.a
    
    lipo -output ./compiled/fat/lib/libavutil.a  -create \
    ./compiled/armv7s/lib/libavutil.a \
    ./compiled/armv7/lib/libavutil.a \
    ./compiled/i386/lib/libavutil.a
    
    lipo -output ./compiled/fat/lib/libswresample.a  -create \
    ./compiled/armv7s/lib/libswresample.a \
    ./compiled/armv7/lib/libswresample.a \
    ./compiled/i386/lib/libswresample.a
    
    lipo -output ./compiled/fat/lib/libswscale.a  -create \
    ./compiled/armv7s/lib/libswscale.a \
    ./compiled/armv7/lib/libswscale.a \
    ./compiled/i386/lib/libswscale.a
    

    Original Post

    This will build ffmpeg static libraries for armv6, armv7, and i386 architectures and combine them into fat (universal) files for iOS 4.3 (iPhoneOS4.3 and iPhoneSimulator4.3):

    rm -r ./compiled
    
    # configure for armv7 build
    ./configure \
    --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=arm \
    --cpu=cortex-a8 \
    --extra-cflags='-arch armv7' \
    --extra-ldflags='-arch armv7' \
    --prefix=compiled/armv7 \
    --enable-pic \
    --enable-cross-compile \
    --disable-armv5te \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for armv7
    make clean
    make && make install
    
    # configure for armv6 build
    ./configure \
    --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=arm \
    --cpu=arm1176jzf-s \
    --extra-cflags='-arch armv6' \
    --extra-ldflags='-arch armv6' \
    --prefix=compiled/armv6 \
    --enable-cross-compile \
    --disable-armv5te \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for armv6
    make clean
    make && make install
    
    # configure for i386 build
    ./configure \
    --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \
    --as='gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \
    --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk \
    --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \
    --target-os=darwin \
    --arch=i386 \
    --cpu=i386 \
    --extra-cflags='-arch i386' \
    --extra-ldflags='-arch i386' \
    --prefix=compiled/i386 \
    --enable-cross-compile \
    --disable-armv5te \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffserver \
    --disable-ffprobe \
    --disable-doc
    
    # build for i386
    make clean
    make && make install
    
    # make fat (universal) libs
    mkdir -p ./compiled/fat/lib
    
    lipo -output ./compiled/fat/lib/libavcodec.a  -create \
    -arch armv6 ./compiled/armv6/lib/libavcodec.a \
    -arch armv7 ./compiled/armv7/lib/libavcodec.a \
    -arch i386 ./compiled/i386/lib/libavcodec.a
    
    lipo -output ./compiled/fat/lib/libavdevice.a  -create \
    -arch armv6 ./compiled/armv6/lib/libavdevice.a \
    -arch armv7 ./compiled/armv7/lib/libavdevice.a \
    -arch i386 ./compiled/i386/lib/libavdevice.a
    
    lipo -output ./compiled/fat/lib/libavfilter.a  -create \
    -arch armv6 ./compiled/armv6/lib/libavfilter.a \
    -arch armv7 ./compiled/armv7/lib/libavfilter.a \
    -arch i386 ./compiled/i386/lib/libavfilter.a
    
    lipo -output ./compiled/fat/lib/libavformat.a  -create \
    -arch armv6 ./compiled/armv6/lib/libavformat.a \
    -arch armv7 ./compiled/armv7/lib/libavformat.a \
    -arch i386 ./compiled/i386/lib/libavformat.a
    
    lipo -output ./compiled/fat/lib/libavutil.a  -create \
    -arch armv6 ./compiled/armv6/lib/libavutil.a \
    -arch armv7 ./compiled/armv7/lib/libavutil.a \
    -arch i386 ./compiled/i386/lib/libavutil.a
    
    lipo -output ./compiled/fat/lib/libpostproc.a  -create \
    -arch armv6 ./compiled/armv6/lib/libpostproc.a \
    -arch armv7 ./compiled/armv7/lib/libpostproc.a \
    -arch i386 ./compiled/i386/lib/libpostproc.a
    
    lipo -output ./compiled/fat/lib/libswscale.a  -create \
    -arch armv6 ./compiled/armv6/lib/libswscale.a \
    -arch armv7 ./compiled/armv7/lib/libswscale.a \
    -arch i386 ./compiled/i386/lib/libswscale.a
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've faced strange problem with my git repo. In process of cloning it looses
We've faced strange problem. We have log on service, that authenticates user, adds auth
I've faced strange problem. While user change of check box input element on form
Today I faced a strange problem in C#. I have an ASP.NET page where
I've faced a bit strange problem. There is a site client would like to
I faced a little trouble - I do not know if I can define
I have faced this problem quite often during the last couple of months, during
I am currently faced with a difficult sorting problem. I have a collection of
We have recently been faced with the problem of porting our C++ framework to
I recently faced a problem of presenting the output of simple genetic algorithm that

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.