简体   繁体   English

ubuntu 11.04上的autoconf错误

[英]autoconf error on ubuntu 11.04

i've been googling and installing libraries for a while, but I couldn't quite handle this problem with autoconf. 我一直在谷歌搜索和安装库一段时间,但我无法用autoconf解决这个问题。

i have downloaded a program that i want to compile, made a few changes, and need to run autogen.sh and ./configure and make install respectively. 我已下载了一个我想编译的程序,做了一些更改,需要分别运行autogen.sh和./configure并make install。

however, when i try to run autogen.sh, i get the following error; 但是,当我尝试运行autogen.sh时,我收到以下错误;

configure.ac:225: error: possibly undefined macro: AM_PATH_GTK_2_0
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.

so i went on, downloaded autoconf-2.68, automake-1.11, m4-1.4.16, and tried sudo apt-get install libgtk2.0-dev, none of which changed the outcome. 所以我继续,下载autoconf-2.68,automake-1.11,m4-1.4.16,并尝试了sudo apt-get install libgtk2.0-dev,其中没有一个改变了结果。 when i try aclocal, i again get the error 当我尝试aclocal,我再次得到错误

configure.ac:225: warning: macro `AM_PATH_GTK_2_0' not found in library

i'm currently stuck, and got nowhere to go. 我现在卡住了,无处可去。 so i'd be glad for any suggestion. 所以我很高兴有任何建议。

I know it's a bit late, but you just have to install the library libgtk2.0-dev : 我知道它有点晚了,但你只需要安装libgtk2.0-dev库:

sudo apt-get install libgtk2.0-dev

If you get errors about something related to GLIB, then install libglib2.0-dev as well: 如果您收到与GLIB相关的错误,请安装libglib2.0-dev

sudo apt-get install libglib2.0-dev

Given the name AM_PATH_GTK_2_0, one makes the following sequence of observations: 1) "AM_" is in automake's namespace, so that m4 macro must come from automake. 给定名称AM_PATH_GTK_2_0,可以进行以下观察序列:1)“AM_”在automake的命名空间中,因此m4宏必须来自automake。 2) Hmmm, it isn't in automake. 2)嗯,它不是在automake中。 3) It probably comes from gtk, so the gtk developer's have made an error in naming their m4 macro in conflict with automake. 3)它可能来自gtk,所以gtk开发人员在命名他们的m4宏与automake冲突时犯了一个错误。 That's a bug in gtk, but I'll probably need to download the newest version of gtk to get the macro. 这是gtk中的一个错误,但我可能需要下载最新版本的gtk来获取宏。

The problem is that you don't have the m4 macro that gtk expects you to have. 问题是你没有gtk期望你拥有的m4宏。 You probably need to install libgtk-devel (or something like that). 您可能需要安装libgtk-devel(或类似的东西)。 If I am correct and libgtk is indeed installing an m4 macro named AM_..., please report that as a bug to the developers. 如果我是正确的并且libgtk确实正在安装名为AM _...的m4宏,请向开发人员报告这是一个错误。 They are stomping on automakes' namespace (this is, unfortunately, an extremely common error.) 他们正在踩着automakes的命名空间(不幸的是,这是一个非常常见的错误。)

Since you mention downloading automake, I think the problem is that you are running aclocal that is not looking in /usr/share/aclocal, but in a different location (ie, you installed automake in /usr/local) When you installed libgtk-dev, it probably installed the *.m4 file in /usr/share/aclocal, but you need that file in /usr/local/share/aclocal (or $prefix/share/aclocal, where prefix is what you used to install automake.) The simplest solution is to copy that file to $(aclocal --print) That is, run "aclocal --print" to see where aclocal is looking for m4 files, then find the file that libgtk-dev installed that defines the improperly named m4 macro and copy that file to the appropriate location. 既然你提到下载automake,我认为问题是你运行的aclocal没有查看/ usr / share / aclocal,而是在不同的位置(即你在/ usr / local中安装了automake)当你安装了libgtk- dev,它可能在/ usr / share / aclocal中安装了* .m4文件,但是你需要在/ usr / local / share / aclocal(或$ prefix / share / aclocal中的那个文件,其中前缀是你用来安装automake的那个。)最简单的解决方案是将该文件复制到$(aclocal --print)即运行“aclocal --print”以查看aclocal在哪里查找m4文件,然后找到libgtk-dev安装的文件,定义了不正确地命名m4宏并将该文件复制到适当的位置。 Alternatively (and probably a better solution) you can put a file named dirlist in $(aclocal --print) that contains the single line "/usr/share/aclocal", so that your hand installed aclocal will always look for m4 files that are installed in /usr/share. 或者(也许是一个更好的解决方案)你可以把一个名为dirlist的文件放在$(aclocal --print)中,其中包含单行“/ usr / share / aclocal”,这样你手上安装的aclocal总会查找m4文件安装在/ usr / share中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM