忍者ブログ

素人翻訳

適当に翻訳する。

id3lib-3.8.3 の構築

 id3lib-3.8.3 は修正しないと configure や make が通らない。

[user00@localhost id3lib-3.8.3]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
...
...
checking for string... yes
checking iomanip.h usability... no
checking iomanip.h presence... no
checking for iomanip.h... no
configure: error: Missing a vital header file for id3lib
[user00@localhost id3lib-3.8.3]$

 iomanip.h は不要なので、configure ファイル中のから「iomanip.h」が現れる箇所を消す。

(id3lib-3.8.3/configure にて)
10295 ...
10296 ...
10297 for ac_header in \
10298 string \
10299 ## iomanip.h \
10300
10301 do
10302 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10304 ...
10305 ...

 make でも2回エラーが出る。

[user00@localhost id3lib-3.8.3]$ make
make all-recursive
...
...
In file included from ../include/id3/utils.h:37,
from ../include/id3/tag.h:34,
from c_wrapper.cpp:30:
../include/id3/id3lib_strings.h: In static member function 'static unsigned char* std::char_traits::move(unsigned char*, const unsigned char*, size_t)':
../include/id3/id3lib_strings.h:87: error: 'memmove' was not declared in this scope
../include/id3/id3lib_strings.h: In static member function 'static unsigned char* std::char_traits::copy(unsigned char*, const unsigned char*, size_t)':
../include/id3/id3lib_strings.h:91: error: 'memcpy' was not declared in this scope
make[2]: *** [c_wrapper.lo] エラー 1
make[2]: ディレクトリ `/home/user00/id3lib/id3lib-3.8.3/src' から出ます
make[1]: *** [all-recursive] エラー 1
make[1]: ディレクトリ `/home/user00/id3lib/id3lib-3.8.3' から出ます
make: *** [all] エラー 2
[user00@localhost id3lib-3.8.3]$

 id3lib-3.8.3/include/id3/id3lib_strings.h に「#include <cstring>」を追加して解決。

[user00@localhost id3lib-3.8.3]$ make
...
...
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include/id3 -I../include -I../zlib/include -g -O2 -Wall -Wno-unused -Wno-inline -Woverloaded-virtual -Wmissing-declarations -c tag.cpp -MT tag.lo -MD -MP -MF .deps/tag.TPlo -fPIC -DPIC -o .libs/tag.lo
In file included from tag.cpp:29:
../include/id3/writers.h: In member function 'virtual uint32 ID3_MemoryWriter::writeChars(const uint8*, uint32)':
../include/id3/writers.h:171: error: '::memcpy' has not been declared
make[2]: *** [tag.lo] エラー 1
make[2]: ディレクトリ `/home/user00/id3lib/id3lib-3.8.3/src' から出ます
make[1]: *** [all-recursive] エラー 1
make[1]: ディレクトリ `/home/user00/id3lib/id3lib-3.8.3' から出ます
make: *** [all] エラー 2
[user00@localhost id3lib-3.8.3]$

 id3lib-3.8.3/include/id3/writers.h に「#include <cstring>」を追加して解決。

 「id3lib-3.8.3-gcc43-1.patch」という名前のパッチが至るところで配布されており、これを使って一括で直すことができる。

PR

id3v2にはid3libが必要

 id3v2-0.1.11のmakeで以下のエラーが出た。

[M_@localhost id3v2-0.1.11]$ make
g++ -I/usr/local/include/ -DVERSION="\"0.1.11\"" -c -o convert.o convert.cpp
convert.cpp:3:21: error: id3/tag.h: そのようなファイルやディレクトリはありません
convert.cpp: In function ‘void DeleteTag(int, char**, int, int)’:
convert.cpp:22: error: ‘ID3_Tag’ was not declared in this scope
convert.cpp:22: error: expected ‘;’ before ‘myTag’
convert.cpp:27: error: ‘myTag’ was not declared in this scope
convert.cpp:28: error: ‘ID3TT_ALL’ was not declared in this scope
convert.cpp:30: error: ‘luint’ was not declared in this scope
convert.cpp:30: error: expected ‘;’ before ‘nTags’
convert.cpp:34: error: ‘nTags’ was not declared in this scope
convert.cpp:34: error: ‘ID3TT_ID3V1’ was not declared in this scope
convert.cpp:38: error: ‘ID3TT_ID3V2’ was not declared in this scope
convert.cpp:43: error: ‘ID3TT_ID3’ was not declared in this scope
convert.cpp: In function ‘void ConvertTag(int, char**, int)’:
convert.cpp:58: error: ‘ID3_Tag’ was not declared in this scope
convert.cpp:58: error: expected ‘;’ before ‘myTag’
convert.cpp:63: error: ‘myTag’ was not declared in this scope
convert.cpp:64: error: ‘ID3TT_ALL’ was not declared in this scope
convert.cpp:66: error: ‘luint’ was not declared in this scope
convert.cpp:66: error: expected ‘;’ before ‘nTags’
convert.cpp:68: error: ‘nTags’ was not declared in this scope
convert.cpp:68: error: ‘ID3TT_ID3V2’ was not declared in this scope
make: *** [convert.o] エラー 1
[M_@localhost id3v2-0.1.11]$

 id3lib-3.8.3をインストールして解決。

 インストール後、

[M_@localhost id3v2-0.1.11]$ id3v2 --help
id3v2: error while loading shared libraries: libid3-3.8.so.3: cannot open shared object file: No such file or directory
[M_@localhost id3v2-0.1.11]$

 ソースコードから入れたlibid3が/usr/local/libにあるのに

export LD_LIBRARY_PATH="/usr/local/lib"

を忘れていた。id3v2を作り直し、入れ直して解決

カレンダー

12 2025/01 02
S M T W T F S
1 2 4
5 6 7 8 9 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

最新コメント

[09/07 NONAME]
[08/18 NONAME]
[05/18 NONAME]
[04/09 NONAME]
[03/21 NONAME]

最新記事

(01/10)
(01/03)
(12/20)
(12/08)
(11/20)
(10/30)
(10/24)
(09/20)
(09/16)
(09/11)
(09/03)
(09/02)
(08/27)
(08/17)
(07/31)
(07/30)
(07/19)
(07/13)
(05/02)
(03/17)
(11/01)
(07/20)
(05/17)
(04/20)
(03/10)

ブログ内検索

広告

バーコード

広告