在使用ubuntu编译minidlna时遇到如下报错:
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_lookup'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_obsolete'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_experimental'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_unknown'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_compat_fixup'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_compat_lookup'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_text'
/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/lib/libid3tag/.libs/libid3tag.so: undefined reference to `id3_frametype_url'
collect2: ld returned 1 exit status
make[2]: *** [minidlna] Error 1
make[2]: Leaving directory `/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna/minidlna-1.1.4'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/work_sdc1/tenda3/ac18_LAS01/AC_PRODUCT_SVN4219/cbb/service/minidlna'
make: *** [cbb/service/minidlna/_only] Error 2
同事的ubuntu以前也遇到过这个问题,他的解决办法是删掉空文件再svn up再编译。
cd minidlna
find ./ -empty | xargs rm
svn up
然后再编译就过了。
但在我这儿没有用,即便删掉整个目录再svn up下来还是有问题。
搜索半天,像说是gperf产生几个文件时出现错误,生成了空文件,最后导致未定义的错误。
最后的解决办法是安装gperf,然后问题解决。
如何安装gperf?
第一种方法:直接sudo apt-get install gperf即可
第二种方法:源码安装
wget http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz
tar -xvf gperf-3.0.4.tar.gz
cd gperf-3.0.4
./configure
make
make install