当我使用 android-ndk 构建 x264 时,它没有完成
When I build x264 with android-ndk it not done
当我使用 android-ndk 构建 x264 时,它没有完成。
Unknown option file/x264/android/armeabi, ignored
Unknown option --target-os=android, ignored
Unknown option --enable-cross-compile, ignored
Unknown option --arch=arm, ignored
Unknown option --cpu=armv5te, ignored
Unknown option --enable-armv5te, ignored
Unknown option --disable-stripping, ignored
No working C compiler found.
Makefile:3: config.mak: No such file or directory
./configure
platform: X86_64
byte order: little-endian
system: LINUX
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: avxsynth
lavf: no
ffms: no
mp4: no
gpl: yes
thread: posix
opencl: yes
filters: crop select_every
lto: no
debug: no
gprof: no
strip: no
PIC: no
bit depth: all
chroma format: all
我的构建文件
#!/bin/bash
TOOLCHAIN=/home/s/my_toolchains/arm
CROSS_PREFIX=$TOOLCHAIN/bin/arm-linux-androideabi-
rm -f $(pwd)/compat/strtod.o
function build_one
{
./configure --prefix=$PREFIX --enable-static --enable-pic --target-os=android --enable-cross- compile --cross-prefix=$CROSS_PREFIX --extra-cflags="-Os -fpic $ADDI_CFLAGS" --extra-ldflags="$ADDI_LDFLAGS" --sysroot=$TOOLCHAIN/sysroot $ADDITIONAL_CONFIG_FLAG
make clean
make
make install
}
CPU=armeabi
mkdir -p $(pwd)/android/$CPU
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -march=armv5te -mtune=arm9tdmi -msoft-float"
ADDI_LDFLAGS=""
ADDITIONAL_CONFIG_FLAG="--arch=arm --cpu=armv5te --enable-armv5te --disable-asm --disable-stripping"
build_one
我该如何解决这个问题?
为什么不这样做?我正确地制作了构建文件,但这还没有完成?
我使用 ubuntu os 来构建这个文件。
自带未知选项--target-os=android,忽略。
我假设您使用的是已弃用的 x264 版本,因为我在此处 https://www.videolan.org/developers/x264.html 使用以下脚本成功编译了最新版本:
armeabi-v7a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle # your android ndk folder
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang # c compiler path
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang++ # c++ compiler path
function build_armeabi-v7a
{
./configure \
--prefix=./android/armeabi-v7a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=arm-linux \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_armeabi-v7a
echo build_armeabi-v7a finished
arm64-v8a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++
function build_arm64-v8a
{
./configure \
--prefix=./android/arm64-v8a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=aarch64-linux \
--cross-prefix=$TOOLCHAIN/bin/aarch64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_arm64-v8a
echo build_arm64-v8a finished
x86
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/i686-linux-android18-clang
export CXX=$TOOLCHAIN/bin/i686-linux-android18-clang++
function build_x86
{
./configure \
--prefix=./android/x86 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=i686-linux \
--cross-prefix=$TOOLCHAIN/bin/i686-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86
echo build_x86 finished
x86_64
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/x86_64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/x86_64-linux-android21-clang++
function build_x86_64
{
./configure \
--prefix=./android/x86_64 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=x86_64-linux \
--cross-prefix=$TOOLCHAIN/bin/x86_64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86_64
echo build_x86_64 finished
并且不要忘记更改我在 armeabi-v7a 脚本中描述的导出变量。
当我使用 android-ndk 构建 x264 时,它没有完成。
Unknown option file/x264/android/armeabi, ignored
Unknown option --target-os=android, ignored
Unknown option --enable-cross-compile, ignored
Unknown option --arch=arm, ignored
Unknown option --cpu=armv5te, ignored
Unknown option --enable-armv5te, ignored
Unknown option --disable-stripping, ignored
No working C compiler found.
Makefile:3: config.mak: No such file or directory
./configure
platform: X86_64
byte order: little-endian
system: LINUX
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: avxsynth
lavf: no
ffms: no
mp4: no
gpl: yes
thread: posix
opencl: yes
filters: crop select_every
lto: no
debug: no
gprof: no
strip: no
PIC: no
bit depth: all
chroma format: all
我的构建文件
#!/bin/bash
TOOLCHAIN=/home/s/my_toolchains/arm
CROSS_PREFIX=$TOOLCHAIN/bin/arm-linux-androideabi-
rm -f $(pwd)/compat/strtod.o
function build_one
{
./configure --prefix=$PREFIX --enable-static --enable-pic --target-os=android --enable-cross- compile --cross-prefix=$CROSS_PREFIX --extra-cflags="-Os -fpic $ADDI_CFLAGS" --extra-ldflags="$ADDI_LDFLAGS" --sysroot=$TOOLCHAIN/sysroot $ADDITIONAL_CONFIG_FLAG
make clean
make
make install
}
CPU=armeabi
mkdir -p $(pwd)/android/$CPU
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm -march=armv5te -mtune=arm9tdmi -msoft-float"
ADDI_LDFLAGS=""
ADDITIONAL_CONFIG_FLAG="--arch=arm --cpu=armv5te --enable-armv5te --disable-asm --disable-stripping"
build_one
我该如何解决这个问题?
为什么不这样做?我正确地制作了构建文件,但这还没有完成?
我使用 ubuntu os 来构建这个文件。
自带未知选项--target-os=android,忽略。
我假设您使用的是已弃用的 x264 版本,因为我在此处 https://www.videolan.org/developers/x264.html 使用以下脚本成功编译了最新版本:
armeabi-v7a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle # your android ndk folder
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang # c compiler path
export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi18-clang++ # c++ compiler path
function build_armeabi-v7a
{
./configure \
--prefix=./android/armeabi-v7a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=arm-linux \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_armeabi-v7a
echo build_armeabi-v7a finished
arm64-v8a
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++
function build_arm64-v8a
{
./configure \
--prefix=./android/arm64-v8a \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=aarch64-linux \
--cross-prefix=$TOOLCHAIN/bin/aarch64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_arm64-v8a
echo build_arm64-v8a finished
x86
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/i686-linux-android18-clang
export CXX=$TOOLCHAIN/bin/i686-linux-android18-clang++
function build_x86
{
./configure \
--prefix=./android/x86 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=i686-linux \
--cross-prefix=$TOOLCHAIN/bin/i686-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86
echo build_x86 finished
x86_64
#!/bin/bash
export NDK=F:/Android/Sdk/ndk-bundle
export HOST_TAG=windows-x86_64 # adjust to your building host
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
export CC=$TOOLCHAIN/bin/x86_64-linux-android21-clang
export CXX=$TOOLCHAIN/bin/x86_64-linux-android21-clang++
function build_x86_64
{
./configure \
--prefix=./android/x86_64 \
--enable-static \
--enable-pic \
--disable-asm \
--disable-opencl \
--disable-cli \
--host=x86_64-linux \
--cross-prefix=$TOOLCHAIN/bin/x86_64-linux-android- \
--sysroot=$TOOLCHAIN/sysroot \
make clean
make
make install
}
build_x86_64
echo build_x86_64 finished
并且不要忘记更改我在 armeabi-v7a 脚本中描述的导出变量。