개발환경 : Windows 10 64bit, Cygwin 2.9.5 64bit. ffmpeg 3.3.9, ndk r16b
build.sh :
#!/bin/bash
NDK=D:/android-ndk-r16b
SYSROOT=$NDK/platforms/android-21/arch-arm
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
CUR=`cygpath -m $(pwd)`
TEMPDIR=`cygpath -m /tmp`
TMP=`cygpath -m /tmp`
TMPDIR=`cygpath -m /tmp`
function build_one
{
# sed -i 's/ln_s="ln -s -f"/ln_s="cp -f"/g' ./configure
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
# sed -i ':a;N;$!ba;s/gcc 4.9\r/gcc 4.9/g' ./config.h # 4.9은 toolchain의 version과 같음
# sed -i ':a;N;$!ba;s/gcc 4.9\r/gcc 4.9/g' ./config.mak
make clean
make -j4
make install
}
CPU=arm
PREFIX=$CUR/android/$CPU
ADDI_CFLAGS="-marm"
build_one
에러 메세지 :
In file included from ./libavutil/rational.h:32:0,
from ./libavutil/opt.h:30,
from libavfilter/af_acrusher.c:21:
d:\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9.x\include\stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
=========================================================
configure 실행은 잘 됩니다.
make 에서 에러가 나는데요. 위와 같은 에러가 납니다. 저 경로에 h 파일은 존재합니다.
혹시 몰라 PATH 에도 등록했는데 결과는 같습니다.
제 생각에는
d:\android-ndk-r16b\toolchains\arm-linux-an... => d:/android-ndk-r16b/toolchains/arm-linux-an...
이렇게 되야 하지 않을까 하는데. 혹시 이런 에러 아시는 분 ..
저거 가지고 4일째 인터넷만 뒤지고 있네요...ㅠㅠ