FFMpeg - macOS build 报错 : xcrun -sdk iphoneos clang ...


在 macOS 上使用 https://github.com/kewlbear/FFmpeg-iOS-build-script 脚本,运行 ./build-ffmpeg.sh 运行报错。
遇到问题,搜索结果不太准,看 issues 比较有用:
https://github.com/kewlbear/FFmpeg-iOS-build-script/issues


报错1:xcrun -sdk iphoneos clang is unable to create an executable file

building arm64...
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

检查了 GCC、make 都是正确安装的

FFMpeg 也替换过新老版本:https://ffmpeg.org//releases/

搜索答案雷同,直到看到这个 issue,解决了我的问题
https://github.com/kewlbear/FFmpeg-iOS-build-script/issues/119


运行命令:

sudo xcode-select --switch /Applications/Xcode.app

前提是你在 /Applications/Xcode.app 安装了 Xcode


查看 xcode-select 所指

 % xcode-select -p
/Applications/Xcode.app/Contents/Developer

xcode-select 更详细的说明可参考:https://blog.csdn.net/lovechris00/article/details/114602610


报错 2 : error: unknown type name ‘AudioDeviceID’;

error: unknown type name ‘AudioDeviceID’;

参考:https://github.com/kewlbear/FFmpeg-iOS-build-script/issues/158

在脚本的 CONFIGURE_FLAGS 添加 --disable-audiotoolbox,变为:

...
CONFIGURE_FLAGS="--enable-cross-compile --disable-debug --disable-programs \
                 --disable-doc --enable-pic --disable-audiotoolbox  "            
...

伊织 2024-04-27(六)

相关推荐

  1. FFMpeg - macOS build xcrun -sdk iphoneos clang ...

    2024-04-28 07:40:01       33 阅读
  2. android版本webrtc使用ffmpeg 解码h264编译

    2024-04-28 07:40:01       62 阅读
  3. ffmpeg 读取流: Non-monotonous DTS in output stream

    2024-04-28 07:40:01       21 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 07:40:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 07:40:01       101 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 07:40:01       82 阅读
  4. Python语言-面向对象

    2024-04-28 07:40:01       91 阅读

热门阅读

  1. 打水问题(贪心算法)

    2024-04-28 07:40:01       34 阅读
  2. hive创建hbase外部关联表实例

    2024-04-28 07:40:01       29 阅读
  3. liunx 中 if 条件 语句

    2024-04-28 07:40:01       33 阅读
  4. 第三方登录以及微信小程序一键登录的实现方案

    2024-04-28 07:40:01       28 阅读
  5. 华为FusionCompute简介

    2024-04-28 07:40:01       66 阅读
  6. golang wire 依赖注入

    2024-04-28 07:40:01       37 阅读
  7. flask+uwsgi+nginx+cerbot配置

    2024-04-28 07:40:01       32 阅读
  8. 01-DispatchServlet和RequestMapping

    2024-04-28 07:40:01       25 阅读
  9. 14-@Autowired处理

    2024-04-28 07:40:01       28 阅读