Vargol / ffmpeg-apple-arm64-build

Build script for ffmpeg targeting the latest open source video codecs running on macOS using Apple's M1 processor.
221 stars 38 forks source link

This is a great contribution #7

Closed MuZiLee closed 1 year ago

MuZiLee commented 1 year ago
MacBook Pro (16-inch, 2019)
2.6 GHz Six-core Intel Core I7
AMD Radeon Pro 5300M 4 GB

Hello @Vargol. This is a great contribution! I hope to keep this script updated for a long time!

But I got some mistakes

➜  ffmpeg-apple-arm64-build git:(master) ./build.sh
No action set, all failures wil stop the script
base directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build
script directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/build
test directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/test
working directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build
tool directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/tool
output directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/out

prepare workspace
use 12 cpu threads

compile cmake

took 508s

compile pkg-config
took 146s

compile FriBidi
took 54s

compile zlib
took 20s

compile libpng
check failed: build libpng
➜  ~ brew search libpng
==> Formulae
libpng ✔   libwpg     libupnp    libnl      libp11     libogg ✔   libgig
libspng    libmng     libtrng    libgnt     libpsl     libmnl
liboping   libbpg     libming    libpst     zlib-ng    libsvg
libpgm     libpano    libpq      libpcl     libagg     libvnc
MuZiLee commented 1 year ago

The compilation process tells me: "check failed: build libpng"

I feel a little sad!!!

MuZiLee commented 1 year ago

build-libpng.log

正克隆到 'libpng'... error: RPC 失败。curl 56 LibreSSL SSL_read: Operation timed out, errno 60 error: 预期仍然需要 50 个字节的正文 fatal: 在引用列表之后应该有一个 flush 包 check failed: download of libpng failed

MuZiLee commented 1 year ago

he @Vargol After I add the agent X265 has such an error. What should I do?

iTerm log

➜  ffmpeg-compile git clone https://github.com/Vargol/ffmpeg-apple-arm64-build.git
正克隆到 'ffmpeg-apple-arm64-build'...
remote: Enumerating objects: 192, done.
remote: Counting objects: 100% (65/65), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 192 (delta 54), reused 50 (delta 42), pack-reused 127
接收对象中: 100% (192/192), 2.32 MiB | 1.35 MiB/s, 完成.
处理 delta 中: 100% (125/125), 完成.
➜  ffmpeg-compile cd ffmpeg-apple-arm64-build
➜  ffmpeg-apple-arm64-build git:(master) ./build.sh
No action set, all failures wil stop the script
base directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build
script directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/build
test directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/test
working directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build
tool directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/tool
output directory is /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/out

prepare workspace
use 12 cpu threads

compile cmake
took 361s

compile pkg-config
took 97s

compile FriBidi
took 17s

compile zlib
took 8s

compile libpng
took 45s

compile brotli
took 35s

compile freetype
took 33s

compile harfbuzz
took 116s

compile libass
took 13s

compile x265
check failed: build x265

build-x265.log

/Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/x265/x265_git/source/common/x86/ipfilter8.asm:576: ... from macro `PROLOGUE' defined here
[ 98%] Built target common
[100%] Linking CXX static library libx265.a
[100%] Built target x265-static
+ checkStatus 0 'build of x265 failed'
+ '[' 0 -ne 0 ']'
+ ln -sf ../10bit/libx265.a libx265_main10.a
+ ln -sf ../12bit/libx265.a libx265_main12.a
+ mv libx265.a libx265_main.a
+ libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a
Usage: /usr/local/opt/libtool/libexec/gnubin/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
+ checkStatus 1 'merge of x265 objects failed'
+ '[' 1 -ne 0 ']'
+ echo 'check failed: merge of x265 objects failed'
check failed: merge of x265 objects failed
+ exit 1
Vargol commented 1 year ago

Hi, I'm afraid I'm on holidays so away from my computers.

This script was really designed to compile ffmpeg for arm64 from scratch with noting more than the Xcode tools installed.

I believe your current error is due to it using gnu's libtool (I'm guessing installed by brew) instead of apple's libtool. I know macports causes some incompatibility too.

in the main build.sh script there is this line export PATH=echo $PATH | sed 's/:/\n/g' | grep -v '/opt/local' | xargs | tr ' ' ':' designed to stop it using anything installed by macports.

For now try hard coding libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a

to /usr/bin/libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a

for now.

MuZiLee commented 1 year ago

@Vargol You mean comment out the "export PATH=echo $PATH | sed 's/:/\n/g' | grep -v '/opt/local' | xargs | tr ' ' ':'"?

...
/Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/x265/x265_git/source/common/x86/ipfilter8.asm:576: ... from macro `PROLOGUE' defined here
[ 98%] Built target common
[100%] Linking CXX static library libx265.a
[100%] Built target x265-static
+ checkStatus 0 'build of x265 failed'
+ '[' 0 -ne 0 ']'
+ ln -sf ../10bit/libx265.a libx265_main10.a
+ ln -sf ../12bit/libx265.a libx265_main12.a
+ mv libx265.a libx265_main.a
+ libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a
Usage: /usr/local/opt/libtool/libexec/gnubin/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
+ checkStatus 1 'merge of x265 objects failed'
+ '[' 1 -ne 0 ']'
+ echo 'check failed: merge of x265 objects failed'
check failed: merge of x265 objects failed
+ exit 1

I try again and get the same error...

Vargol commented 1 year ago

No I mean change the libtool line to use the full path to libtool.

On 15 Aug 2022, at 14:36, MuZiLee @.***> wrote:

 @Vargol You mean comment out the "export PATH=echo $PATH | sed 's/:/\n/g' | grep -v '/opt/local' | xargs | tr ' ' ':'"?

... /Users/lee/ffmpeg-compile/ffmpeg-apple-arm64-build/x265/x265_git/source/common/x86/ipfilter8.asm:576: ... from macro `PROLOGUE' defined here [ 98%] Built target common [100%] Linking CXX static library libx265.a [100%] Built target x265-static

  • checkStatus 0 'build of x265 failed'
  • '[' 0 -ne 0 ']'
  • ln -sf ../10bit/libx265.a libx265_main10.a
  • ln -sf ../12bit/libx265.a libx265_main12.a
  • mv libx265.a libx265_main.a
  • libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a Usage: /usr/local/opt/libtool/libexec/gnubin/libtool [OPTION]... [MODE-ARG]... Try 'libtool --help' for more information.
  • checkStatus 1 'merge of x265 objects failed'
  • '[' 1 -ne 0 ']'
  • echo 'check failed: merge of x265 objects failed' check failed: merge of x265 objects failed
  • exit 1 I try again and get the same error...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

Vargol commented 1 year ago

no response for a few months , closing the issue