自己编译 emacs 不知道需要哪些编译选项

nexstep文件夹下都是 macOS 的,nt 文件夹下都是 Windows的,Linux 的安装说明在根目录。 https://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL

2 个赞

感谢解惑 :grinning:

新笨问题(盲猜下载的不对?): 按说明

wget https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-29.0.90.tar.gz
tar -xf emacs-29.0.90.tar.gz
cd emacs-29.0.90

后 ./configure 提示找不到(目录下名字类似的只有一个configure.ac)

在repo安装需要参考INSTALL.REPO

谢谢,这就去学习

如果只是想尝试使用pretest 1,它有个单独的下载链接,那里可以使用./configure。下载链接之前有个帖子提到了。

貌似要先./autoconf.sh 还是什么的脚本根据configure.ac 生成configure文件

@ruijieyu pretest 1的链接没有找到, @wcq062821 是的,运行了./autoconf.sh

运行./configure 后报找不到gcc10,解决之后报:

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

怎样启用 x window support 呢

我的build.sh,你可以参考一下:

#!/bin/sh

./autogen.sh
./configure --prefix=$HOME/.local \
            --with-native-compilation=aot \
            --with-xwidgets \
            --with-tree-sitter \
            --with-imagemagick \
            --with-mailutils \
            --with-json
make -j 12

现在configure找不到X的包,需要额外安装。

感谢分享,这个也是提示

查到下面这句解决了

sudo apt-get install libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev

这个应该是指x11的库吧,去找这个包: xorg-x11-util-devel(openSUSE的,别的发行版的不知道叫啥),装上试试

推荐加上json和jit这两个支持,不然doom emacs 会有warring

感谢提醒,编译的原生的,一顿不懂的操作后运行上了 emacs 30 :rofl:

2 个赞

请问一下大家有没有遇到自己编译的版本无法加载svg图片的情况?我不知道要加什么选项

记得是要加 --with-rsvg

加了还是没用,configure配置的时候还是显示librsvg2 = no, 是不是系统也要安装什么svg的开发依赖?

肯定要安装 librsvg,具体安装的命令要看你用的是什么平台。

比如 macOS 可以这样安装:

sudo port install librsvg

如果是 Windows 平台,可以这样通过 msys2 安装:

pacman -S mingw-w64-x86_64-librsvg \

编译时没必要加 --with-rsvg 的,因为你系统安装了 librsvg 后,编译时--with-rsvg是默认开启的。不过加了也没坏处。

1 个赞