2012-04-28 49 views
4

我刚更新到Kubuntu 12.04。一切工作正常,除了最新的自定义生成emacs。它现在说:构建emacs 24.1.50

emacs: symbol lookup error: emacs: undefined symbol: gtk_window_set_has_resize_grip 

所以我决定重新构建emacs。对于我已经git pull最新的快照,并做了一切,我通常做,但现在我在编译时出现错误:

In file included from /home/boris/its/blds/emacs/lib-src/emacsclient.c:76:0: 
../lib/getopt.h:196:8: error: redefinition of ‘struct option’ 
/usr/include/getopt.h:106:8: note: originally defined here 
../lib/getopt.h:245:12: error: conflicting types for ‘getopt_long’ 
/usr/include/getopt.h:175:12: note: previous declaration of ‘getopt_long’ was here 
../lib/getopt.h:249:12: error: conflicting types for ‘getopt_long_only’ 
/usr/include/getopt.h:179:12: note: previous declaration of ‘getopt_long_only’ was here 
make[1]: *** [emacsclient] Error 1 
make[1]: Leaving directory `/home/boris/its/blds/emacs/lib-src' 
make: *** [lib-src] Error 2 

谷歌搜索发现这些错误几乎没有。

编辑

下解决它(感谢JSON):

git pull 
./autogen.sh 
./configure --prefix=/home/boris/its/soft/Emacs_24.1.50 
make bootstrap 
make install 

回答

3

最简单的方法是使用PPA:emacs-snapshot

sudo add-apt-repository ppa:cassou/emacs 
sudo apt-get update 
sudo apt-get install emacs-snapshot 
2

我有这些问题,更新到Ubuntu 12.04,并获得过去,它通过返回从INSTALL.BZR指令首次检出 - 似乎配置文件需要再生由于在libc中的变化Ubuntu的新版本。

1

这是我做的,以建立一个git拉后的emacs(我script做夜间)

make distclean && autoreconf -i -I m4 && ./configure && make && sudo make install 
0

我有比运了同样的问题,我只是从系统中移除的Emacs,和从头开始编译。

不,我没有必要添加一个ppa,并且每次我看到类似于获得所有选票的答案时,它都会让我对通常的stackexchange感到疑惑,它只是误导和误导了其他可能拥有同样的问题。

不,我说过一次,我会再说一遍,只需从fsf下载最新的emacs即可。

让我补充一点,getopt.h是libc6-dev的一部分(如json所说)。而libc6-dev是libjpeg libncurses libpng libtiff xlibs等所需组的一部分。将其删除一次并重新安装。问题出在配置选项路径上,这个路径在配置的时候需要在emacs24的前缀中指定。但是autogen和bootstrap都不是必须的,只是make和make install。

+0

我认为这两个答案 - 如何从头开始comppaile和ppa之一 - 是有价值的。如果你喜欢编译你自己的一切,并且想每次更新都重复编译它(或者使用过时的东西) - 这只是你的意见。 – Adobe 2013-06-30 13:01:20

+0

是的。我错在没有说明最多票数的答案在最简单的解决方案中是正确的,但不是解决方案。没有看到错误是由冲突引起的,你错了。这是通过从头开始删除emacs和编译来解决的。 – doed 2013-07-02 07:55:30

0
make maintainer-clean 
./autogen.sh 
./configure 
make 

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10108#8

我有同样的问题,因为你,但对于24.5标签。问题是我没有重新运行autogen.sh来创建一个新的配置脚本。我认为任何未跟踪的文件都将通过git status列出,尽管autogen.sh的所有配置输出在.gitignore中被忽略。