markus-perl / ffmpeg-build-script

The FFmpeg build script provides an easy way to build a static FFmpeg on OSX and Linux with non-free codecs included.
MIT License
1.05k stars 334 forks source link

Commit 470f5912 breaks build on M1 mac #144

Open jeffli678 opened 2 years ago

jeffli678 commented 2 years ago

After the commit 470f5912, I get this error message when building libtheora:

building libtheora - version 1.1.1
=======================
Downloading https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-1.1.1.tar.gz as libtheora-1.1.1.tar.gz
... Done
Extracted libtheora-1.1.1.tar.gz
$ ./configure --prefix=/Users/jeff/ffmpeg-build-script/workspace --with-ogg-libraries=/Users/jeff/ffmpeg-build-script/workspace/lib --with-ogg-includes=/Users/jeff/ffmpeg-build-script/workspace/include/ --with-vorbis-libraries=/Users/jeff/ffmpeg-build-script/workspace/lib --with-vorbis-includes=/Users/jeff/ffmpeg-build-script/workspace/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
checking build system type... Invalid configuration `aarch64-apple-darwin21.4.0': machine `aarch64-apple' not recognized
configure: error: /bin/sh ./config.sub aarch64-apple-darwin21.4.0 failed

Failed to Execute ./configure --prefix=/Users/jeff/ffmpeg-build-script/workspace --with-ogg-libraries=/Users/jeff/ffmpeg-build-script/workspace/lib --with-ogg-includes=/Users/jeff/ffmpeg-build-script/workspace/include/ --with-vorbis-libraries=/Users/jeff/ffmpeg-build-script/workspace/lib --with-vorbis-includes=/Users/jeff/ffmpeg-build-script/workspace/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
jeffli678 commented 2 years ago

The config.guess that comes with the libtheora returns arm-apple-darwin21.4.0, while the gcc one returns aarch64-apple-darwin21.4.0. The libtheira configure script, however, rejects the name aarch64.

It appears to me that libtheora needs some fix to accept the name aarch64, so I am not super sure how we should fix it.

Maybe we can find a different config.guess script?

krono-i2 commented 2 years ago

Same here using release.

$ ./configure --prefix=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace --with-ogg-libraries=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/lib --with-ogg-includes=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/include/ --with-vorbis-libraries=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/lib --with-vorbis-includes=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
checking build system type... Invalid configuration `aarch64-apple-darwin21.6.0': machine `aarch64-apple' not recognized
configure: error: /bin/sh ./config.sub aarch64-apple-darwin21.6.0 failed

Failed to Execute ./configure --prefix=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace --with-ogg-libraries=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/lib --with-ogg-includes=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/include/ --with-vorbis-libraries=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/lib --with-vorbis-includes=/Users/krono/workspace/ffmpeg-build-script-1.39/workspace/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec

Do you have suggestions?

[UPDATE] A workaround is to comment the lines of the incriminated commit.

jamauai commented 2 years ago

A workaround is to comment the lines of the incriminated commit.

@krono86: Sorry, which lines did you comment out?

krono-i2 commented 2 years ago

The lines of commit https://github.com/markus-perl/ffmpeg-build-script/commit/470f591269cd31514af40e2ef30db43fbb13d168 at the top of the page.