以下の内容はhttps://zaki-hmkc.hatenablog.com/entry/2025/08/24/212339より取得しました。


miseでffmpegを入れる場合はバイナリインストールでなくビルドが行われるのでgccなどが必要 (追記:最新8.0も可)

miseffmpegをインストールする場合依存するあれやこれやが必要だったのでメモ。

エラー

無邪気に入れようとすると、以下のようにエラーになる

[zaki@fedora-dev ~]$ mise use ffmpeg@7.1.1
mise ERROR ~/.local/share/mise/plugins/ffmpeg/bin/install failed
* Configuring ffmpeg with default options
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
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.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
asdf-ffmpeg: An error occurred while installing ffmpeg 7.1.1.
mise ERROR Failed to install tool: ffmpeg@7.1.1

ffmpeg@7.1.1: 
   0: failed to install asdf:ffmpeg@7.1.1
   1: ~/.local/share/mise/plugins/ffmpeg/bin/install exited with non-zero status: exit code 1

Location:
   src/plugins/script_manager.rs:184

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
mise mise 2025.8.20 by @jdx – use    

最初は入れようとしてるバイナリがLinux用にビルドされてないのかと思ったけど実はそうではなく、「miseでffmpegを入れる際はソースからビルドを行う」という動作になっているため。

gcc

まずはシステムにgccを入れる。(miseのパッケージにはないので)

sudo dnf install gcc

nasm

これで動くかと思いきや、ビルドにはnasm/yasmが必要。無いと以下のエラーが出力される。

[zaki@fedora-dev ~]$ mise use ffmpeg@7.1.1
mise ERROR ~/.local/share/mise/plugins/ffmpeg/bin/install failed
* Configuring ffmpeg with default options
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.

nasmはmiseで対応してるのでインストールする。(ただしnasmgccが必要でビルドされる)

[zaki@fedora-dev ~]$ mise use nasm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1634k  100 1634k    0     0  1032k      0  0:00:01  0:00:01 --:--:-- 1032k
./autogen.sh: line 18: automake: command not found
./autogen.sh: line 41: aclocal: command not found
./autogen.sh: line 48: autoheader: command not found
./autogen.sh: line 49: autoconf: command not found
configure: WARNING: No asciidoc package found, cannot build man pages
configure: WARNING: No xmlto package found, cannot build man pages
mise ~/.config/mise/config.toml tools: nasm@2.16

ビルドとインストール

これでffmpegをビルドできるようになる

[zaki@fedora-dev ~]$ time mise use ffmpeg@7.1.1
libavfilter/af_afftfilt.c: In function ‘filter_channel’:
libavfilter/af_afftfilt.c:297:9: warning: ‘memmove’ specified bound between 18446744065119617024 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
  297 |         memmove(buf, buf + s->hop_size, window_size * sizeof(float));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘generate_min_phase_kernel’,
    inlined from ‘generate_kernel’ at libavfilter/af_firequalizer.c:691:13:
libavfilter/af_firequalizer.c:559:5: warning: ‘memset’ specified bound between 18446744069414584316 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]

[...]

In file included from libavcodec/wmadec.c:45:
libavcodec/wma.h:112:13: note: at offset 2 into destination object ‘channel_coded’ of size 2
  112 |     uint8_t channel_coded[MAX_CHANNELS];    ///< true if channel is coded
      |             ^~~~~~~~~~~~~
mise ~/.config/mise/config.toml tools: ffmpeg@7.1.1

real    4m55.288s
user    8m49.025s
sys     0m36.650s

手元の環境でビルド完了まで約5分ほど。

[zaki@fedora-dev ~]$ ffmpeg -version
ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 15 (GCC)
configuration: --prefix=/home/zaki/.local/share/mise/installs/ffmpeg/7.1.1
libavutil      59. 39.100 / 59. 39.100
libavcodec     61. 19.101 / 61. 19.101
libavformat    61.  7.100 / 61.  7.100
libavdevice    61.  3.100 / 61.  3.100
libavfilter    10.  4.100 / 10.  4.100
libswscale      8.  3.100 /  8.  3.100
libswresample   5.  3.100 /  5.  3.100

追記:ver8.0

ほぼ同じくらいのビルド時間でインストールできた。

[zaki@fedora-dev ~]$ time mise use ffmpeg@8.0
libavfilter/af_afftfilt.c: In function ‘filter_channel’:
libavfilter/af_afftfilt.c:297:9: warning: ‘memmove’ specified bound between 18446744065119617024 and 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
  297 |         memmove(buf, buf + s->hop_size, window_size * sizeof(float));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘generate_min_phase_kernel’,
    inlined from ‘generate_kernel’ at libavfilter/af_firequalizer.c:691:13:

[...]

mise ~/.config/mise/config.toml tools: ffmpeg@8.0

real    5m49.791s
user    10m33.645s
sys     0m37.724s
[zaki@fedora-dev ~]$ ffmpeg -version
ffmpeg version 8.0 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 15 (GCC)
configuration: --prefix=/home/zaki/.local/share/mise/installs/ffmpeg/8.0
libavutil      60.  8.100 / 60.  8.100
libavcodec     62. 11.100 / 62. 11.100
libavformat    62.  3.100 / 62.  3.100
libavdevice    62.  1.100 / 62.  1.100
libavfilter    11.  4.100 / 11.  4.100
libswscale      9.  1.100 /  9.  1.100
libswresample   6.  1.100 /  6.  1.100

Exiting with exit code 0

なんかExit Codeも表示されるね。

環境

Proxmox上のVMで、CPU2コア、メモリ8GBのマシン

[zaki@fedora-dev ~]$ cat /etc/fedora-release 
Fedora release 42 (Adams)

[zaki@fedora-dev ~]$ gcc --version
gcc (GCC) 15.2.1 20250808 (Red Hat 15.2.1-1)
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[zaki@fedora-dev ~]$ mise --version
              _                                        __              
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2025.8.20 linux-x64 (2025-08-22)

コメント

miseを使ったインストールはモノによっては単純に入らずに、というよりバイナリインストールでなくビルドが必要だったりする場合がある、ということ。
ffmpegについては、複数のバージョンを簡単に切り替えて使いたい場合ならmiseも良いかもしれないが、そこに要件がなければOSのパッケージ管理(dnfapt)でインストールする方がおそらく楽。
あるいはリリースされたばかりの8.0のように、最新版をいち早く使いたい場合はアリかな。

forest.watch.impress.co.jp

参考

minerva.mamansoft.net




以上の内容はhttps://zaki-hmkc.hatenablog.com/entry/2025/08/24/212339より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14