emacs compile

I've managed to build and install (using checkinstall) an GNU Emacs 25.1 Debian package on 16.04, but on 16.10 for some unknown reason the compilation fails (at the make stage) giving the truncated output:

Loading language/czech...
Loading language/slovak...
Loading language/romanian...
Loading language/greek...
Loading language/hebrew...
Loading international/cp51932...
Loading international/eucjp-ms...
Loading language/japanese...
Loading language/korean...
Loading language/lao...
Loading language/tai-viet...
Loading language/thai...
Loading language/tibetan...
Loading language/vietnamese...
Loading language/misc-lang...
Loading language/utf-8-lang...
Loading language/georgian...
Loading language/khmer...
Loading language/burmese...
Loading language/cham...
Loading indent...
Loading emacs-lisp/cl-generic...
Loading frame...
Loading startup...
Loading term/tty-colors...
Loading font-core...
Loading facemenu...
Loading emacs-lisp/syntax...
Loading font-lock...
Loading jit-lock...
Loading mouse...
Loading scroll-bar...
Loading select...
Loading emacs-lisp/timer...
Loading isearch...
Loading rfn-eshadow...
Loading menu-bar...
Loading emacs-lisp/lisp...
Loading textmodes/page...
Loading register...
Loading textmodes/paragraphs...
Loading progmodes/prog-mode...
Loading emacs-lisp/lisp-mode...
Loading progmodes/elisp-mode...
Loading textmodes/text-mode...
Loading textmodes/fill...
Loading newcomment...
Loading replace...
Loading emacs-lisp/tabulated-list...
Loading buff-menu...
Loading fringe...
Loading emacs-lisp/regexp-opt...
Loading image...
Loading international/fontset...
Loading dnd...
Loading tool-bar...
Loading dynamic-setting...
Loading x-dnd...
Loading term/common-win...
Loading term/x-win...
Loading mwheel...
Loading emacs-lisp/float-sup...
Loading vc/vc-hooks...
Loading vc/ediff-hook...
Loading uniquify...
Loading electric...
Loading emacs-lisp/eldoc...
Loading cus-start...
Loading tooltip...
Loading /home/fusion809/Programs/emacs-25.1/lisp/leim/leim-list.el (source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
Makefile:736: recipe for target 'bootstrap-emacs' failed
make[1]: *** [bootstrap-emacs] Segmentation fault (core dumped)
make[1]: Leaving directory '/home/fusion809/Programs/emacs-25.1/src'
Makefile:398: recipe for target 'src' failed
make: *** [src] Error 2

To be clear I ran:

./autogen.sh && ./configure --prefix=/usr --with-x-toolkit=gtk2 && make

and it was at the make stage that the build failed. I did run sudo apt-get build-dep -y emacs24before running these commands.

EDIT: I can confirm that this segmentation fault occurs even when the --with-x-toolkit=gtk2option is substituted with --with-x-toolkit=gtk3.

compiling emacs segmentation-fault 16.10

shareimprove this question

edited Oct 15 '16 at 3:54

asked Oct 15 '16 at 3:38

BH2017

3,5621856105

add a comment

1 Answer

activeoldestvotes

up vote6down voteaccepted

This is reported as http://debbugs.gnu.org/24682. A workaround is to use ./configure CFLAGS=-no-pie .

shareimprove this answer

answered Oct 15 '16 at 7:57

Michael Albinus

1762

 

编译emacs 问题缺少 libXpm libjpeg libgif/libungif libtiff

2013年10月13日 ⁄ 综合 ⁄ 共 5186字 ⁄ 字号    ⁄ 评论关闭

 

原文连接:http://blog.csdn.net/gexueyuan/article/details/6452459

编译emacs 问题

分类: Linux2011-05-28
22:47 2064人阅读 评论(1) 收藏 举报

emacsgtkunixfiledatabaseimage

 用apt-get安装emacs的话,版本是23.1.1,版本太低,所以在GNU的网站下了一个GNU emacs来安装。

将在GNU的ftp下载的文件包解压到一目录,cd进入该目录,然后 ./configure进行配置生成make文件,但是运行完一阵子后报错如下

[c-sharp] view
plain
copy

  1. You seem to be running X, but no X development libraries  
  2. were found. You should install the relevant development files for X  
  3. and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make  
  4. sure you have development files for image handling, i.e.  
  5. tiff, gif, jpeg, png and xpm.  
  6. If you are sure you want Emacs compiled without X window support, pass  
  7. --without-x  
  8. to configure.  

原来是没有安装GTK的开发库,可以安装最新的gtk-3也可以安装gtk-2.0

[c-sharp] view
plain
copy

  1. sudo apt-get install libgtk2.0-dev  

或者选择用系统里的Synaptic管理器进行安装

再运行./configure ,没想到又报错了,如下:

[c-sharp] view
plain
copy

  1. configure: error: The following required libraries were not found:  
  2.     libXpm libjpeg libgif/libungif libtiff  
  3. Maybe some development libraries/packages are missing?  
  4. If you don't want to link with them give  
  5.     --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no  
  6. as options to configure   

貌似是缺几个库:
    libXpm libjpeg libgif/libungif libtiff

再进行安装

[c-sharp] view
plain
copy

  1. sudo apt-get install libxpm-dev  
  2. sudo apt-get install libjpeg62-dev  
  3. sudo apt-get install libgif-dev  
  4. sudo apt-get install libtiff4-dev  

sudo apt-get install libtinfo-dev

然后再运行./configure ,这下终于可以正常地跑到结束了,看输出的信息,该生成的文件都生成了。于是,运行make ,再运行sudo make install ,经过一段时间后,编译结束,安装成功。

如果遇到编译错误。并且打开emacs后报错为“Cannot open termcap database file”, 少了个叫libncurses5-dev库,于是,运行:

 

[c-sharp] view plaincopy

  1. sudo apt-get install libncurses5-dev  

因为前面编译过,所以运行make clean ,make distclean 来清理一下, 再重新运行./configure ,make ,sudo make install ,这回就完全安装成功了

如果报错为:

[c-sharp] view
plain
copy

  1. /usr/bin/ld: cannot find -linux-gnu  
  2. collect2: ld returned 1 exit status  
  3. make[1]: *** [temacs] Error 1  
  4. make[1]: Leaving directory `/home/gexueyuan/emacs-23.3/src'  
  5. make: *** [src] Error 2  

那么是因为在11.04中你安装了gtk3.0,而gtk2.0没有安装,这时只要

[c-sharp] view
plain
copy

  1. sudo apt-get install libgtk2.0-dev  

然后再进行

再重新运行./configure

,make ,错误会变成





[c-sharp] view plaincopy

  1. /usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory  

不要紧,这时因为11.04版本的问题,emace的网站给出了解决方法 http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-04/msg00307.html 具体就是在configure.in和configure中修改 cpp_undefs="`echo $srcdir $configuration $canonical unix | 这一行,结尾添加i386 cpp_undefs="`echo $srcdir $configuration $canonical unix i386 | 然后再重新编译,大功告成,在终端输入emacs进入emacs界面。 另附一个我在10.10下编译出错的问题 出错信息: Loading international/mule-cmds... Cannot open load file: case-table make[1]: *** [bootstrap-emacs] 错误 255 make[1]:正在离开目录 `/home/zerdison/下载/emacs-23.2/emacs-23.2/src' make: *** [src] 错误 2 还以为是下载的源代码出错,又下了一次问题依旧,改编译参数等也没用。 把路径改成英文后 make install 大功告成。 

分享到: 

 用apt-get安装emacs的话,版本是23.1.1,版本太低,所以在GNU的网站下了一个GNU emacs来安装。

将在GNU的ftp下载的文件包解压到一目录,cd进入该目录,然后 ./configure进行配置生成make文件,但是运行完一阵子后报错如下

[c-sharp] view
plain
copy

  1. You seem to be running X, but no X development libraries  
  2. were found. You should install the relevant development files for X  
  3. and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make  
  4. sure you have development files for image handling, i.e.  
  5. tiff, gif, jpeg, png and xpm.  
  6. If you are sure you want Emacs compiled without X window support, pass  
  7. --without-x  
  8. to configure.  

原来是没有安装GTK的开发库,可以安装最新的gtk-3也可以安装gtk-2.0

[c-sharp] view
plain
copy

  1. sudo apt-get install libgtk2.0-dev  

或者选择用系统里的Synaptic管理器进行安装

再运行./configure ,没想到又报错了,如下:

[c-sharp] view
plain
copy

  1. configure: error: The following required libraries were not found:  
  2.     libXpm libjpeg libgif/libungif libtiff  
  3. Maybe some development libraries/packages are missing?  
  4. If you don't want to link with them give  
  5.     --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no  
  6. as options to configure   

貌似是缺几个库:
    libXpm libjpeg libgif/libungif libtiff

再进行安装

[c-sharp] view
plain
copy

  1. sudo apt-get install libxpm-dev  
  2. sudo apt-get install libjpeg62-dev  
  3. sudo apt-get install libgif-dev  
  4. sudo apt-get install libtiff4-dev  

然后再运行./configure ,这下终于可以正常地跑到结束了,看输出的信息,该生成的文件都生成了。于是,运行make ,再运行sudo make install ,经过一段时间后,编译结束,安装成功。

如果遇到编译错误。并且打开emacs后报错为“Cannot open termcap database file”, 少了个叫libncurses5-dev库,于是,运行:

 

[c-sharp] view plaincopy

  1. sudo apt-get install libncurses5-dev  

因为前面编译过,所以运行make clean ,make distclean 来清理一下, 再重新运行./configure ,make ,sudo make install ,这回就完全安装成功了

如果报错为:

[c-sharp] view
plain
copy

  1. /usr/bin/ld: cannot find -linux-gnu  
  2. collect2: ld returned 1 exit status  
  3. make[1]: *** [temacs] Error 1  
  4. make[1]: Leaving directory `/home/gexueyuan/emacs-23.3/src'  
  5. make: *** [src] Error 2  

那么是因为在11.04中你安装了gtk3.0,而gtk2.0没有安装,这时只要

[c-sharp] view
plain
copy

  1. sudo apt-get install libgtk2.0-dev  

然后再进行

再重新运行./configure

,make ,错误会变成

[c-sharp] view plaincopy

  1. /usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory  

不要紧,这时因为11.04版本的问题,emace的网站给出了解决方法

http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-04/msg00307.html

具体就是在configure.in和configure中修改

cpp_undefs="`echo $srcdir $configuration $canonical unix |

这一行,结尾添加i386

cpp_undefs="`echo $srcdir $configuration $canonical unix i386 |

然后再重新编译,大功告成,在终端输入emacs进入emacs界面。

另附一个我在10.10下编译出错的问题

出错信息:

Loading international/mule-cmds...

Cannot open load file: case-table

make[1]: *** [bootstrap-emacs] 错误 255

make[1]:正在离开

猜你喜欢

转载自blog.csdn.net/liufengl138/article/details/82459426