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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:41:10+00:00 2026-05-26T02:41:10+00:00

I’m trying to cross-compile libfaac to android for use with ffmpeg. I’ve gotten ffmpeg

  • 0

I’m trying to cross-compile libfaac to android for use with ffmpeg. I’ve gotten ffmpeg cross-compiled but libfaac is giving me major headaches.

This is the script I’m using to compile libfaac:

ANDROID_API=android-3
export ANDROID_NDK=${HOME}/android-ndk
export ANDROID_SDK=${HOME}/android-sdk
SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-arm
ANDROID_BIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/*-x86/bin/
CROSS_COMPILE=${ANDROID_BIN}/arm-linux-androideabi-
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools

export ARM_INC=$ANDROID_NDK/platforms/android-5/arch-arm/usr/include
export ARM_LIB=$ANDROID_NDK/platforms/android-5/arch-arm/usr/lib

CFLAGS=" -I$ARM_INC  -fPIC -Wall -Wextra -Wno-unused -Wno-multichar -mthumb-interwork -ffunction-sections -funwind-tables -fno-rtti -fstack-protector -fno-short-enums -DANDROID -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -Wa,--noexecstack -MMD -MP -MF"
LDFLAGS=" -nostdlib -Bdynamic -Wl,--gc-sections -Wl,--no-undefined -Wl,-z,noexecstack  -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib -L$ARM_LIB  $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -Wl,--start-group -lc -lm -ldl -lgcc $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a  $ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib/thumb/libsupc++.a -Wl,--end-group"

FLAGS="--host=arm-androideabi-linux --enable-static --disable-shared --prefix=$HOME "

export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}"
export LDFLAGS="$LDFLAGS"
export CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}"
export NM="${CROSS_COMPILE}nm"
export STRIP="${CROSS_COMPILE}strip"
export RANLIB="${CROSS_COMPILE}ranlib"
export AR="${CROSS_COMPILE}ar"

cd ../faac
./configure $FLAGS
make clean
make -j4 || exit 1
make install || exit 1

I’m very much a beginner when it comes to c++ code and cross-compiling, and I’ve build this script using many other scripts as reference so I may be doing some unnecessary or flat-out incorrect things.

Anyways, I’m getting literally hundreds of errors along the line of:

undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
undefined reference to `__cxa_end_cleanup'
undefined reference to `__cxa_throw'
undefined reference to `__gxx_personality_v0'

It seems the issue has to do with me not linking libsupc++ properly.

I tried doing what the person at this other stackoverflow question did, but I don’t know if I did it right, I’m unfamiliar with the linking process.

What am I doing wrong? Thank you for any help.

EDIT:
It turns out I may or may not be wrong about libsupc++ causing the problems, the configure.log tells me the compiler can’t create an executable, but I can’t figure out what the problem is.

Here is a pastebin of the configure log

  • 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-26T02:41:11+00:00Added an answer on May 26, 2026 at 2:41 am

    Well bizarrely enough the issue was actually that somehow libsupc++ was being linked multiple times, so when I removed some libraries and changed a few commands I got it working. Here’s the compile script I use:

    #!/bin/bash
    ANDROID_API=android-3
    export ANDROID_NDK=${HOME}/android-ndk
    export ANDROID_SDK=${HOME}/android-sdk
    SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-arm
    ANDROID_BIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/*-x86/bin/
    CROSS_COMPILE=${ANDROID_BIN}/arm-linux-androideabi-
    export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools
    
    export ARM_INC=$ANDROID_NDK/platforms/android-3/arch-arm/usr/include
    export ARM_LIB=$ANDROID_NDK/platforms/android-3/arch-arm/usr/lib
    
    CFLAGS=" -I$ARM_INC -fpic -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID  -Wa,--noexecstack -MMD -MP "
    LDFLAGS=" -nostdlib -Bdynamic -Wl,--whole-archive -Wl,--no-undefined -Wl,-z,noexecstack  -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib -L$ARM_LIB  -lc -lgcc -lm -ldl  "
    FLAGS="--host=arm-androideabi-linux --enable-static --disable-shared --prefix=$HOME --enable-armv5e  "
    
    export CPPFLAGS="$CFLAGS"
    export CFLAGS="$CFLAGS"
    export CXXFLAGS="$CFLAGS"
    export CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}"
    export LDFLAGS="$LDFLAGS"
    export CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}"
    export NM="${CROSS_COMPILE}nm"
    export STRIP="${CROSS_COMPILE}strip"
    export RANLIB="${CROSS_COMPILE}ranlib"
    export AR="${CROSS_COMPILE}ar"
    
    ./configure $FLAGS
    make clean
    make -j4 || exit 1
    make install || exit 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.