logo
code:Haemophilus influenzae

ここに書かれていることは無保証です。同じことを行って問題が発生しても、 龍義は責任をとりません。

2004年10月20日

戻る

RedHat に VLC のインストール。

RedHat7.3 / RedHat9 に VLC media player をインストールした。そのときのメモ。

VLC をインストールしたマシンは、私が RedHat Linux をインストールした訳では
ないので、どのようなものをインストールしたのか、細かくは良くわからない。
なので、記述する内容が全ての環境で当てはまるとは限らないと思う。

まず、 VLC media player のページ http://www.videolan.org/vlc/ から、最新版の
vlc 、 vlc-0.7.2.tar.gz をダウンロードしてきた。

[toyota@smith]% tar xvfz vlc-0.7.2.tar.gz
[toyota@smith]% cd vlc-0.7.2
[toyota@smith]% ./configure
〜snip〜
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock

だそうだ…。ん?

[toyota@smith]% date
Sat Apr  5 09:05:26 JST 2004

なんで、こんな時間になっているのか、不明。とりあえず、修正。

[toyota@smith]% ntpdate time_server

気を取り直して。

[toyota@smith]% ./configure
〜snip〜
checking dvdcss/dvdcss.h usability... no
checking dvdcss/dvdcss.h presence... no
checking for dvdcss/dvdcss.h... no
configure: WARNING: libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss= for dynamic linking (recommended under Unix) or --with-dvdcss-tree= for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.
configure: error: cannot find libdvdcss headers

だそうだ。言われた通り、 http://www.videolan.org/libdvdcss/ より libdvdcss を
ダウンロードしてきた。最新の libdvdcss-1.2.8.tar.gz を入手。

[toyota@smith]% tar xvfz libdvdcss-1.2.8.tar.gz
[toyota@smith]% cd libdvdcss-1.2.8
[toyota@smith]% ./configure
[toyota@smith]% make
[toyota@smith]% su
[root@smith]# make install

問題なく、インストールが完了。 VLC のディレクトリに戻って、やり直し。

[toyota@smith]% ./configure
〜snip〜
checking libmodplug/modplug.h usability... no
checking libmodplug/modplug.h presence... no
checking for libmodplug/modplug.h... no
checking mad.h usability... no
checking mad.h presence... no
checking for mad.h... no
configure: error: Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.

だそうで、言われた通り、http://www.underbit.com/products/mad/ から libmad を
ダウンロードしてきた。最新の libmad-0.15.1b.tar.gz を入手。

[toyota@smith]% tar xvfz libmad-0.15.1b.tar.gz
[toyota@smith]% cd libmad-0.15.1b
[toyota@smith]% ./configure
[toyota@smith]% make
[toyota@smith]% su
[root@smith]# make install

問題なく、インストールが完了。 VLC のディレクトリに戻って、やり直し。

[toyota@smith]% ./configure
〜snip〜
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
configure: error: Missing header file ffmpeg/avcodec.h.

だそうで、 ffmpeg をダウンロードすることにする。
http://ffmpeg.sourceforge.net/index.php から、最新版の ffmpeg-0.4.8.tar.gz
を入手した。

[toyota@smith]% tar xvfz ffmpeg-0.4.8.tar.gz
[toyota@smith]% cd ffmpeg-0.4.8
[toyota@smith]% ./configure
[toyota@smith]% make
〜結構時間がかかった〜
[toyota@smith]% su
[root@smith]# make install

問題なく、インストールが完了。 VLC のディレクトリに戻って、やり直し。

[toyota@smith]% ./configure
〜snip〜
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
configure: error: Missing header file ffmpeg/avcodec.h.

同じメッセージ。ちょっと、 ffmpeg のディレクトリを調べてみる。どうやら
lib 周りがインストールされていないようである。 make installlib を実行
してみる。

[toyota@smith]% make installlib

lib 周りがインストールされたようである。 VLC のディレクトリに戻って、
やり直し。

[toyota@smith]% ./configure
〜snip〜
checking ffmpeg/avcodec.h usability... yes
checking ffmpeg/avcodec.h presence... yes
checking for ffmpeg/avcodec.h... yes
checking postproc/postprocess.h usability... no
checking postproc/postprocess.h presence... no
checking for postproc/postprocess.h... no
configure: error: Missing header file postproc/postprocess.h.

まだ足りないようである。 ffmpeg のディレクトリで検索をしてみた。

[toyota@smith]% find ./ -name postprocess.h
./libavcodec/libpostproc/postprocess.h

見つかった。Makefile を見て、こいつをインストールしてくれるオプションが
ないのか見てみたけど、なさそうなので、自分でコピーすることにした。

[root@smith]# mkdir /usr/local/include/postproc
[root@smith]# cp libavcodec/libpostproc/postprocess.h /usr/local/include/postproc

VLC のディレクトリに戻って、やり直し。

[toyota@smith]% ./configure
〜snip〜
checking mpeg2dec/mpeg2.h usability... no
checking mpeg2dec/mpeg2.h presence... no
checking for mpeg2dec/mpeg2.h... no
configure: error: Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ (you need the cvs version). Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.

次から次へと…。言われた通り、 libmpeg2 をインストールすることにする。
http://libmpeg2.sourceforge.net/downloads.html から最新版のファイル、
mpeg2dec-0.4.0b.tar.gz をダウンロードしてきた。

[toyota@smith]% tar xvfz mpeg2dec-0.4.0b.tar.gz
[toyota@smith]% cd mpeg2dec-0.4.0
[toyota@smith]% ./configure
[toyota@smith]% make
[toyota@smith]% su
[root@smith]# make install

問題なく、インストールが完了。 VLC のディレクトリに戻って、やり直し。

[toyota@smith]% ./configure
〜snip〜
vlc configuration
--------------------
vlc version           : 0.7.2
system                : linux
architecture          : i686 mmx
build flavour         : optim devel 
vlc aliases           : gvlc

You can tune the compiler flags in vlc-config.
To build vlc and its plugins, type `make'.

おぉ。やっと configure が通った。本当は configure のオプションを削って
エラーを無くしていっても良いのだけど、後々困るかもしれないので、実装できる
ものは実装する方向ということで。ここで、やっと make を実行。このとき、
RedHat7.3 では別の作業が必要だったので、別ページに追加する。

[toyota@smith]% make
〜snip〜
gcc -Wsign-compare -Wall -finline-limit-30000 -pipe -o vlc src/vlc-vlc.o lib/libvlc.a ./modules/misc/memcpy/libmemcpymmx.a ./modules/video_chroma/libi420_rgb_mmx.a ./modules/video_chroma/libi422_yuy2_mmx.a ./modules/video_chroma/libi420_ymga_mmx.a ./modules/video_chroma/libi420_yuy2_mmx.a ./modules/misc/memcpy/libmemcpymmxext.a ./modules/misc/memcpy/libmemcpy3dn.a ./modules/codec/ffmpeg/libffmpeg.a ./modules/stream_out/libstream_out_transcode.a -L/usr/local/lib -lrt -lpthread -ldl -lm -lavcodec -lm -lm
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o)(.text+0x32a): In function `InitPostproc__ffmpeg':
: undefined reference to `pp_get_context'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o)(.text+0x4ab): In function `PostprocPict__ffmpeg':
: undefined reference to `pp_postprocess'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o)(.text+0x584): In function `ClosePostproc__ffmpeg':
: undefined reference to `pp_free_mode'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o)(.text+0x592): In function `ClosePostproc__ffmpeg':
: undefined reference to `pp_free_context'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o)(.text+0x5e4): In function `PPQCallback':
: undefined reference to `pp_get_mode_by_name_and_quality'
collect2: ld returned 1 exit status
make[2]: *** [vlc] Error 1
make[2]: Leaving directory `/home/toyota/src/vlc/vlc-0.7.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/toyota/src/vlc/vlc-0.7.2'
make: *** [all] Error 2

だそうで、 ffmpeg に問題があるみたい。 ffmpeg のディレクトリに戻って、
調べてみる。configure の pp オプションがあるみたい。

[toyota@smith]% ./configure --help
〜snip〜
pp support       no
debug symbols    yes
optimize         yes
shared pp        no
〜snip〜

この pp オプションを有効にして、コンパイルした。

[toyota@smith]% ./configure --enable-pp
[toyota@smith]% make
[toyota@smith]% su
[root@smith]# libavcodec.libavcodec.a /usr/local/lib

VLC のディレクトリに戻って、やり直し。

[toyota@smith]% make

今度は、問題なく make が終わった。大丈夫そうである。早速インストールした。

[toyota@smith]% su
[root@smith]# make install

いやいや、長い道のりだった。


by Tatsuyoshi
since 2003