【问题标题】:Build x264 with error: signal.h not found构建 x264 时出现错误:未找到 signal.h
【发布时间】:2018-02-12 14:46:25
【问题描述】:

当我使用构建脚本构建 x264 时:

#!/bin/bash
NDK=/Local/Android/sdk/android-ndk-r16b

PLATFORM=$NDK/platforms/android-26/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
PREFIX=./android/arm

function build_one
{
 ./configure \
 --prefix=$PREFIX \
 --enable-static \
--enable-pic \
 --host=arm-linux \
 --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
 --sysroot=$PLATFORM

  make clean
  make
  make install
}

build_one

echo Android ARM builds finished

但我总是报错:

x264.c:40:20: fatal error: signal.h: No such file or directory
#include <signal.h>
                ^

编译终止。 : 目标“x264.o”的配方失败 make: *** [x264.o] 错误 1

【问题讨论】:

    标签: x264


    【解决方案1】:

    android-ndk-r16b 的一个变化是The deprecated headers have been removed. Unified Headers are now simply "The Headers". For migration tips, see Unified Headers Migration Notes.

    因此,android-ndk-r16b 中不再存在 signal.h。您可以使用较低版本的 NDK,例如 android-ndk-r15c。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-03
      • 2020-06-22
      • 2016-08-02
      • 2016-02-27
      • 2020-03-12
      • 2021-12-14
      • 2021-06-17
      相关资源
      最近更新 更多