Ubuntu 8.10 默認安裝的 pulseaudio版本是 0.9.10, 所以想嘗試自己編譯一下 0.9.10.
直接下載
pulseaudio-0.9.10 tarball, 然後執行如下命令
./configure --prefix=/home/tieg/pulse --disable-oss --disable-rpath --disable-dbus --disable-bluez --disable-samplerate --disable-gconf --disable-asyncns --disable-tcpwrap --disable-solaris --disable-per-user-esound-socket --disable-avahi --disable-jack --disable-lirc --disable-hal --disable-manpages --disable-xmltoman --enable-ltdl-install=no
編譯到最後出現如下的出錯信息:
pulseaudio-0.9.10/src/daemon/dumpmodules.c:140: undefined reference to `lt__PROGRAM__LTX_preloaded_symbols'
爲解決這個 undefined reference to `lt__PROGRAM__LTX_preloaded_symbols', 到網上一番搜索。 遇到這個問題的人還真不少, 也有不少人蔘與討論。造成該問題的基本原因是 libtool版本兼容問題,升級到 libtool 2.x 容易產生這個問題。 很多人建議 把 libtool 降級成 libtool 1.x ( pulseaudio的作者 lennart 都這麼建議), 暈,這不是走回頭路嗎。 如何在 libtool 2.x 環境下解決該問題, 很少有人提及。 經過我的苦苦搜索,終於發現了蛛絲馬跡。具體的解決辦法是這樣的:
在 pulseaudio-0.9.10 目錄下, 執行
libtoolize –force
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/share/aclocal/libtool.m4'
libtoolize: `/usr/share/aclocal/ltoptions.m4'
libtoolize: `/usr/share/aclocal/ltversion.m4'
libtoolize: `/usr/share/aclocal/ltsugar.m4'
libtoolize: `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
然後執行
autoreconf
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:63: required file `./config.guess' not found
configure.ac:63: `automake --add-missing' can install `config.guess'
configure.ac:63: required file `./config.sub' not found
configure.ac:63: `automake --add-missing' can install `config.sub'
src/Makefile.am:150: foreach f,$(PREOPEN_LIBS: non-POSIX variable name
src/Makefile.am:150: (probably a GNU make extension)
src/Makefile.am:152: foreach f,$(PREOPEN_LIBS: non-POSIX variable name
src/Makefile.am:152: (probably a GNU make extension)
autoreconf: automake failed with exit status: 1
根據上面的信息,執行
automake –add-missing
configure.ac:63: installing `./config.guess'
configure.ac:63: installing `./config.sub'
src/Makefile.am:150: foreach f,$(PREOPEN_LIBS: non-POSIX variable name
src/Makefile.am:150: (probably a GNU make extension)
src/Makefile.am:152: foreach f,$(PREOPEN_LIBS: non-POSIX variable name
src/Makefile.am:152: (probably a GNU make extension)
然後重新執行
autoreconf
到這裏,注意看一下 pulseaudio的目錄,你會發現很多編譯配置文件內容變了。接下來,就可以重新開始我們熟悉的
./configure
make
make install
編譯到最後,有發現一個錯誤
daemon/caps.c:134: error: conflicting types for ‘pa_drop_caps’
daemon/caps.h:28: error: previous declaration of ‘pa_drop_caps’ was here
查看了一下源文件,原來是頭文件 和 源文件 定義的類型 不匹配,手工改一下,繼續編譯,順利通過!
可能有人要問,爲什麼要執行 上面的 libtoolize 和 autoconf。 抱歉,本人還在研究,暫時無可奉告。