我正在尝试在 Ubuntu 10.04 32 位上构建 Maliit ( https://wiki.maliit.org/Documentation/Installing )。我也有一台 Ubuntu 12.04 机器,构建 Maliit 在较新的 Ubuntu 上开箱即用,但我需要让它在 10.04 上构建。
我在 10.04 上遇到了几个早期的错误,在谷歌搜索后发现是由于 glib 的过时版本造成的。所以我抓住了最新版本并像这样构建:
cd /home/$user/Desktop
wget http://ftp.gnome.org/pub/gnome/sources/glib/2.33/glib-2.33.12.tar.xz
unxz glib-2.33.12.tar.xz
tar xvf glib-2.33.12.tar
cd glib-2.33.12
mkdir build-x86
cd build-x86
mkdir /home/$user/glib-2.33
../configure --prefix=/home/$user/glib-2.33
make
make install
export PATH=/home/$user/glib-2.33/bin:$PATH
cp -r /home/$user/glib-2.33/bin/* /usr/bin
cp -r /home/$user/glib-2.33/share/* /usr/share
cp -r /home/$user/glib-2.33/include/* /usr/include
cp -r /home/$user/glib-2.33/lib/* /usr/lib
cp -r /home/$user/glib-2.33/lib/*so* /lib/
构建几乎成功,但现在我陷入以下错误:
make[3]: Entering directory `/home/user/Desktop/maliit-framework-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/examples/apps/gtk2'
g++ -Wl,-O1 -Wl,--as-needed -Wl,-rpath,/home/pclass/QtSDK/Desktop/Qt/4.8.1/gcc/lib -o maliit-exampleapp-gtk2 .obj/exampleapp-gtk.o -L/usr/X11R6/lib ../../../lib/libmaliit-glib-1.0.so -L/home/pclass/glib-2.33/lib -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lXext -lX11 -lm
../../../lib/libmaliit-glib-1.0.so: undefined reference to `dbus_g_value_build_g_variant'
../../../lib/libmaliit-glib-1.0.so: undefined reference to `dbus_g_value_parse_g_variant'
collect2: ld returned 1 exit status
make[3]: Leaving directory `/home/user/Desktop/maliit-framework-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/examples/apps/gtk2'
make[2]: Leaving directory `/home/user/Desktop/maliit-framework-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/examples/apps'
make[1]: Leaving directory `/home/user/Desktop/maliit-framework-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/examples'
make: Leaving directory `/home/user/Desktop/maliit-framework-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release'
make[3]: *** [maliit-exampleapp-gtk2] Error 1
make[2]: *** [sub-gtk2-make_default] Error 2
make[1]: *** [sub-apps-make_default] Error 2
make: *** [sub-examples-make_default-ordered] Error 2
13:48:42: The process "/usr/bin/make" exited with code 2.
Error while building project maliit-framework (target: Desktop)
When executing build step 'Make'
具体来说,错误归结为:
../../../lib/libmaliit-glib-1.0.so: undefined reference to `dbus_g_value_build_g_variant'
../../../lib/libmaliit-glib-1.0.so: undefined reference to `dbus_g_value_parse_g_variant'
collect2: ld returned 1 exit status
我不知道这意味着什么,谷歌也没有提供任何有用的东西。我认为这可能与 Glib 和 dbus 有关。有什么问题,我该如何解决?请帮我解决这个问题!