我正在交叉编译开放的 VMWare 工具。我预编译了 glib,并设置了PKG_CONFIG_PATH
变量来链接它们。我在链接阶段遇到以下错误。
libtool: link: warning: library `/u/git/extlib_vmtools/usr/local/lib/libgthread-2.0.la' was moved.
/bin/grep: /usr/local/lib/libglib-2.0.la: No such file or directory
/bin/sed: can't read /usr/local/lib/libglib-2.0.la: No such file or directory
libtool: link: `/usr/local/lib/libglib-2.0.la' is not a valid libtool archive
make[2]: *** [libhgfs.la] Error 1
make[2]: Leaving directory `/u/git/extlib_vmtools/src/open-vm-tools-11.0.0-14549434/libhgfs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/u/git/extlib_vmtools/src/open-vm-tools-11.0.0-14549434'
我关注了这篇有用的帖子(DESTDIR 和 PREFIX of make),但我认为我遗漏了一些东西。我没有--prefix
为任何模块设置,因为我想在部署时使用默认的目录结构。
glib 编译(低层模块):
./configure --host=${CROSS_COMPILE_HOST}
make
make install DESTDIR=/home/xport/
open-vmware-tools 编译(上层模块):
export PKG_CONFIG_SYSROOT_DIR="/home/xport/"
export PKG_CONFIG_PATH="/home/xport/usr/local/lib/pkgconfig"
autoreconf -i
./configure --host=${CROSS_COMPILE_HOST} --enable-lib64=no --without-kernel-modules --without-pam --disable-vgauth --without-x --without-gtk3 --without-gtk2 --without-gtkmm3 --without-gtkmm --enable-resolutionkms=no --enable-deploypkg=no
make
make install DESTDIR=/home/xport # <-- I don't even get here
在我设置PKG_CONFIG_PATH
变量之前,由于缺少 .h 文件,第二次 make 失败......所以我知道.pc
链接有效。我错过了什么?谢谢 !