我正在尝试编译一个包(libdrm-2.4.59)并使用sed
和autoreconf
删除依赖项:
sed -e "/pthread-stubs/d" -i configure.ac &&
autoreconf -fiv
它产生以下输出:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I /u/f0/students/estermad/tmp/share/aclocal --force -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --install --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: You should add the contents of 'm4/libtool.m4' to 'aclocal.m4'.
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: You should add the contents of 'm4/ltoptions.m4' to 'aclocal.m4'.
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: You should add the contents of 'm4/ltsugar.m4' to 'aclocal.m4'.
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: You should add the contents of 'm4/lt~obsolete.m4' to 'aclocal.m4'.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:32: installing `build-aux/missing'
exynos/Makefile.am: installing `build-aux/depcomp'
autoreconf: Leaving directory `.'
到目前为止,这看起来很好,但正如我所说,configure
构建因一个奇怪的错误而停止:
...
checking for pkg-config... /u/f0/students/estermad/tmp/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PCIACCESS... configure: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59':
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
...
以下是显示错误的部分部分、正确设置的相应编译器和链接器标志以及未设置的config.log
相关值:pkg-config
configure:12927: checking for PCIACCESS
configure:12932: $PKG_CONFIG --exists --print-errors "pciaccess >= 0.10"
configure:12935: $? = 0
configure:12945: $PKG_CONFIG --exists --print-errors "pciaccess >= 0.10"
configure:12948: $? = 0
configure:12970: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59':
...
ac_cv_env_PCIACCESS_CFLAGS_set=set
ac_cv_env_PCIACCESS_CFLAGS_value=-I/u/f0/students/estermad/tmp/include
ac_cv_env_PCIACCESS_LIBS_set=set
ac_cv_env_PCIACCESS_LIBS_value='-L/u/f0/students/estermad/tmp/lib -lpciaccess'
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
我的系统上缺少这些用途autoreconf
,所以我必须自己构建。我在这个系统上所做的所有构建都有一个前缀。用于构建其他事物之间的依赖关系的前缀。因为我跑了以下内容:libtoolize
libtool
libdrm
libtool
$ cd libtool-2.4.5
$ ./configure --prefix=/u/f0/students/estermad/tmp && make && make install
$ libtool --finish /u/f0/students/estermad/tmp/lib
然而,libtool 的构建和安装运行时没有任何错误。我不知道生成的configure
脚本是否由于autoreconf
(位于 /usr/bin/autoreconf 中)、libtoolize
(位于 /u/f0/students/estermad/tmp/bin 中)aclocal
或其他原因而损坏。
我尝试libdrm
在不使用autoreconf
、手动注释的情况下进行构建pthread-stubs
。构建运行良好。因此,上述问题只有在运行后才会显现出来autoreconf
。我真的很感激一些有用的提示。
答案1
解决方案是将 pkg-config 更新到最新版本(目前为 0.28)。我有0.18。