Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try building from source #3

Closed
xparq opened this issue Aug 25, 2023 · 0 comments
Closed

Try building from source #3

xparq opened this issue Aug 25, 2023 · 0 comments

Comments

@xparq
Copy link
Owner

xparq commented Aug 25, 2023

Just to have a feel of the cost, general robustness of the build setup etc.

Building from source

Source = the .zip from the GH mirror, which apparently means the relevant guide is INSTALL.REPO, not INSTALL!

Vanilla build at first, no options (like --with-modules etc., only the prefix to install in /opt/emacs), just to have a feel.
UPDATE: It's massive, as expected... Took ~half an hour on my old Toshiba laptop, and 10-15 min on my dev server.

Linux (WSL Debian 12)

  1. For configure to succeed, I ran (partly as per the messy build page of the Emacs Wiki, partly as per the errors make configure and then configure gave):

    sudo apt install libc6-dev libjpeg62-turbo libncurses5-dev libpng-dev libwebp-dev libtiff5-dev libgif-dev xaw3dg-dev zlib1g-dev libx11-dev texinfo libcairo-dev gnutls-bin gnutls-dev

    Note: no makeinfo, no gnutls pkg, and libcairo defaults to cairo2. Also, since this is a dev. host, a bunch of X-related and other libs have already been installed!

    Also had to add libxpm-dev libgif-dev libtiff-dev on my dev server! And --with-gnutls=ifavailable, because couldn't install that one for some reason...

2.1. To go ahead and build (with configure options, as needed, e.g. --with-tree-sitter --with-small-ja-dic):

make configure="--prefix=/opt/emacs CFLAGS='-O2 -g'"

Note: --with-native-compilation requires libgccjit-dev, but I couldn't even find the package name for my Deb11 server...)

2.2. Or... For more control, like building in a separate dir outside the repo:

./autogen.sh # to generate `configure`
cd ..
mkdir build.tmp && cd build.tmp
  1. ../emacs-master/configure --prefix=/opt/emacs, or more, e.g. this on my Deb11 dev server:

    ./configure --prefix=/opt/emacs --with-gnutls=ifavailable --with-tree-sitter --with-native-compilation --with-small-ja-dic

  2. make install -> ~150 MB to /opt/emacs, most of which is share... All is well, apparently.

    (The emacs exe is 26 MB though -- 8 after strip; I wonder how much of it is actually statically linked... Well, not much! ldd lists 65 shared libs! :-o )

Windows 10

-> #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant