may be its script problem 
I am also facing problem that c compiler test failed error 
take a look at my sh file it will help you to solve your problem


#!/bin/bash
# Author: Dmitry Dzakhov (based on Guo Mingyu's script)
 # Creating conf.sh in ffmpeg directory
NDK=~/android-ndk
PLATFORM=$NDK/platforms/android-14/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
output="conf.sh"
 [ -f conf.sh ] && echo "Old $output has been removed."
echo '#!/bin/bash' > $output
echo "PREBUILT=$PREBUILT" >> $output
echo "PLATFORM=$PLATFORM" >> $output
echo './configure --target-os=linux \
    --prefix=./android/armv7-a \
    --enable-cross-compile \
    --extra-libs="-lgcc" \
    --arch=arm \
    --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
    --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
    --nm=$PREBUILT/bin/arm-linux-androideabi-nm \
    --sysroot=$PLATFORM \
    --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 
-Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums 
-fno-strict-aliasing -finline-limit=300 -mfloat-abi=softfp -mfpu=neon -marm 
-march=armv7-a -mtune=cortex-a8 " \
    --disable-shared \
    --enable-static \
    --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib 
-nostdlib -lc -lm -ldl -llog" \
    --enable-parsers \
    --enable-encoders \
    --enable-decoders \
    --enable-muxers \
    --enable-demuxers \
    --enable-swscale \
    --enable-swscale-alpha \
    --disable-ffplay \
    --disable-ffprobe \
    --enable-ffserver \
    --enable-network \
    --enable-indevs \
    --disable-bsfs \
    --enable-filters \
    --enable-avfilter \
    --enable-protocols \
    --disable-asm \
    --enable-neon' >> $output
 # start configure
sudo chmod +x $output
echo "configuring..."
./$output || (echo configure failed && exit 1)
 # modify the config.h
echo "modifying the config.h..."
sed -i "s/#define restrict restrict/#define restrict/g" config.h
 # remove static functions in libavutil/libm.h
echo "removing static functions in libavutil/libm.h..."
sed -i "/static/,/}/d" libavutil/libm.h
 # modify Makefiles
echo "modifying Makefiles..."
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavcodec/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavcodec/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavfilter/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavfilter/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavformat/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavformat/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavutil/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavutil/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libpostproc/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libpostproc/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libswscale/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libswscale/Makefile
 # generate av.mk in ffmpeg
echo "generating av.mk in ffmpeg..."
echo '# LOCAL_PATH is one of libavutil, libavcodec, libavformat, or 
libswscale
 #include $(LOCAL_PATH)/../config-$(TARGET_ARCH).mak
include $(LOCAL_PATH)/../config.mak
 OBJS :=
OBJS-yes :=
MMX-OBJS-yes :=
include $(LOCAL_PATH)/Makefile
 # collect objects
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
OBJS += $(OBJS-yes)
 FFNAME := lib$(NAME)
FFLIBS := $(foreach,NAME,$(FFLIBS),lib$(NAME))
FFCFLAGS  = -DHAVE_AV_CONFIG_H -Wno-sign-compare -Wno-switch 
-Wno-pointer-sign
FFCFLAGS += -DTARGET_CONFIG=\"config-$(TARGET_ARCH).h\"
 ALL_S_FILES := $(wildcard $(LOCAL_PATH)/$(TARGET_ARCH)/*.S)
ALL_S_FILES := $(addprefix $(TARGET_ARCH)/, $(notdir $(ALL_S_FILES)))
 ifneq ($(ALL_S_FILES),)
ALL_S_OBJS := $(patsubst %.S,%.o,$(ALL_S_FILES))
C_OBJS := $(filter-out $(ALL_S_OBJS),$(OBJS))
S_OBJS := $(filter $(ALL_S_OBJS),$(OBJS))
else
C_OBJS := $(OBJS)
S_OBJS :=
endif
 C_FILES := $(patsubst %.o,%.c,$(C_OBJS))
S_FILES := $(patsubst %.o,%.S,$(S_OBJS))
 FFFILES := $(sort $(S_FILES)) $(sort $(C_FILES))' > av.mk
 echo 'include $(all-subdir-makefiles)' > ../Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_LIBRARIES := libavformat libavcodec libavutil libpostproc 
libswscale
LOCAL_MODULE := ffmpeg
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))' > Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_CFLAGS += -include "string.h" -Dipv6mr_interface=ipv6mr_ifindex
LOCAL_LDLIBS := -lz
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavformat/Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_CFLAGS += -std=c99
LOCAL_LDLIBS := -lz
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavcodec/Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavfilter/Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavutil/Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libpostproc/Android.mk
 echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES :=        \
    $(LOCAL_PATH)        \
    $(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libswscale/Android.mk
 # start build!
echo "start ndk-building..."
cd ../..
$NDK/ndk-build
# Change previous line to "$NDK/ndk-build V=1" if you'll get errors. This 
will give some more information.


On Friday, 13 July 2012 08:15:58 UTC+2, B.Arunkumar wrote:
>
> Hi, 
>
>   We are still seeing the crash. This is the compile script 
> build_android.sh that we are using (modified from the link as per you 
> r suggestion): 
>
> PREBUILT=/home/arun/android/android-ndk-r6b/toolchains/arm-linux- 
> androideabi-4.4.3/prebuilt/linux-x86 
> PLATFORM=/home/arun/android/android-ndk-r6b/platforms/android-9/arch- 
> arm 
>
> CPU=armv7-a 
> OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU - 
> mtune=cortex-a8" 
> PREFIX=./android/$CPU 
> ADDITIONAL_CONFIGURE_FLAG=--enable-neon 
>
> ./configure --target-os=linux \ 
>     --prefix=$PREFIX \ 
>     --enable-cross-compile \ 
>     --extra-libs="-lgcc" \ 
>     --arch=arm \ 
>     --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ 
>     --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ 
>     --nm=$PREBUILT/bin/arm-linux-androideabi-nm \ 
>     --sysroot=$PLATFORM \ 
>     --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 - 
> Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums - 
> fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \ 
>     --disable-shared \ 
>     --enable-static \ 
>     --extra-ldflags="-Wl,-malign-double -rpath-link=$PLATFORM/usr/lib - 
> L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \ 
>     --disable-everything \ 
>     --enable-demuxer=h264 \ 
>     --disable-ffplay \ 
>     --enable-protocol=file \ 
>     --enable-avformat \ 
>     --enable-avcodec \ 
>     --enable-decoder=rawvideo \ 
>     --enable-decoder=mjpeg \ 
>     --enable-decoder=h263 \ 
>     --enable-decoder=mpeg4 \ 
>     --enable-decoder=h264 \ 
>     --enable-parser=h264 \ 
>     --disable-network \ 
>     --enable-zlib \ 
>     --disable-avfilter \ 
>     --disable-avdevice \ 
>     $ADDITIONAL_CONFIGURE_FLAG 
>
> make clean 
> make  -j4 install 
> $PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a 
> inverse.o 
> $PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L 
> $PLATFORM/usr/lib  -soname libffmpeg.so -shared -nostdlib  - 
> z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/ 
> libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a 
> libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog 
> --warn-once  --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm- 
> linux-androideabi/4.4.3/libgcc.a 
>
> And the Android.mk is as follows: 
>
> LOCAL_PATH := $(call my-dir) 
>
> FFMPEG:= /home/arun/ffmpegneon1103/android/armv7-a/lib 
>
> include $(CLEAR_VARS) 
>
> LOCAL_MODULE    := OnVRView 
> LOCAL_SRC_FILES := OnVRView.cpp 
>
> ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 
>     LOCAL_CFLAGS := -DHAVE_NEON=1 
>     LOCAL_MODULE := OnVRView 
>     LOCAL_SRC_FILES += VideoDecoder.cpp.neon 
>     LOCAL_ARM_NEON := true 
> endif 
>
> LOCAL_C_INCLUDES := /home/arun/ffmpegneon1103/android/armv7-a/include 
>
> LOCAL_ARM_MODE := arm 
>
> LOCAL_STATIC_LIBRARIES := cpufeatures 
>
> LOCAL_LDLIBS    := -llog -L$(FFMPEG) -lswresample -lavformat - 
> lavcodec  -lswscale -lavutil -Werror 
>
> include $(BUILD_SHARED_LIBRARY) 
>
> $(call import-module,cpufeatures) 
>
> This requires any changes? 
>
> Thank you, 
> B.Arunkumar. 
>
>
> On Jul 12, 10:29 am, "B.Arunkumar" <[email protected]> 
> wrote: 
> > Hi, 
> > 
> > Actually, I am facing the same problem as Andrei and I posted to the 
> > android ndk googlegroups just yesterday that it is the same problem as 
> > his. 
> > 
> > http://groups.google.com/group/android-ndk/browse_frm/thread/495f7acf... 
>
> > 
> > I am yet to try out his suggestion. I will try it today and get back 
> > to the forum. 
> > 
> > Thank you,B.Arunkumar 
> > 
> > On Jul 11, 11:12 pm, Justin Buser <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > You'd really have to provide some relevant information, telling us the 
> > > sigspec and what your apps pid happened to be when it died is not 
> really 
> > > enough to go on. 
> > 
> > > On Friday, April 20, 2012 3:44:40 AM UTC-4,B.Arunkumarwrote: 
> > 
> > > > Hi, 
> > 
> > > >     We have designed an app which renders video from IP camera on 
> the 
> > > > Android mobile (Samsung Galaxy SII) through RTSP, the video frames 
> get 
> > > > decoded by ffmpeg and rendered on ImageView. We get the RTSP 
> responses 
> > > > and video packets from the IP camera using a socketchannel and 
> > > > asynchronous selector. Sometimes we get this error "Process 8769 
> > > > terminated by signal (7)" and the app crashes at the point where the 
> > > > asynchronous selector is read and the packets get processed. Could 
> > > > somebody give any clues on what could be the possible reasons why we 
> > > > get this error sometimes and the app crashes? 
> > 
> > > > Thank you, 
> > > >B.Arunkumar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to