4

I've just updated to Kubuntu 12.04. Everything works fine except for the latest custom-build emacs. It says now:

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

So I've decided to re-build emacs. For that I've git pull the latest snapshot, and have done everything as I usually do, but now I get an error during compilation:

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

Google search reveals almost nothing on these errors.

Edit:

The following solves it (thanks to JSON):

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

5 回答 5

3

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

sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot
于 2012-04-28T10:57:22.700 回答
2

我在更新到 Ubuntu 12.04 时遇到了这些问题,并通过返回 INSTALL.BZR 的说明进行首次结帐来解决问题 - 由于新版本 Ubuntu 中 libc 的更改,似乎需要重新生成配置文件。

于 2012-05-02T03:00:57.323 回答
1

这就是我在 git pull 之后构建 emacs 的方法(我的脚本每晚都做)

make distclean && autoreconf -i -I m4 && ./configure && make && sudo make install
于 2013-05-01T19:40:58.463 回答
0

我遇到了与操作相同的问题,我只是从系统中删除了 emacs,并从头开始编译。

不,我不必添加 ppa,每次我看到这样的答案获得所有选票时,我都会对 stackexchange 感到疑惑,它只会误导和误导可能有同样问题的其他人。

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

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

于 2013-06-30T11:51:15.527 回答
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 中都会被忽略。

于 2015-05-10T21:30:10.060 回答