2012-04-28 46 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中被忽略。