我剛更新到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
我認爲這兩個答案 - 如何從頭開始comppaile和ppa之一 - 是有價值的。如果你喜歡編譯你自己的一切,並且想每次更新都重複編譯它(或者使用過時的東西) - 這只是你的意見。 – Adobe 2013-06-30 13:01:20
是的。我錯在沒有說明最多票數的答案在最簡單的解決方案中是正確的,但不是解決方案。沒有看到錯誤是由衝突引起的,你錯了。這是通過從頭開始刪除emacs和編譯來解決的。 – doed 2013-07-02 07:55:30