probonopd / Emacs.AppImage

This repository builds GNU Emacs from git on Travis CI and packages it as an AppImage.
http://appimage.org/
Other
46 stars 14 forks source link

support centos6 (glibc 2.12) #11

Open jminh opened 5 years ago

jminh commented 5 years ago

The EOL for CentOS 6 is November 30, 2020.

Is it possible to provide Emacs.AppImage based on glibc 2.12?

probonopd commented 5 years ago

I'll see what I can do. Right now we are compiling on Ubuntu trusty, which unfortunately comes with a more recent glibc than that.

probonopd commented 5 years ago

Does anyone know how to build this statically on Alpine Linux using musl?

probonopd commented 4 years ago

I have uploaded an experimental version at https://github.com/probonopd/Emacs.AppImage/releases/tag/continuous. It bundles everything (including glibc) and should hence hopefully run on CentOS 6. However it seems not to find lisp files in subdirectories of e.g., usr/share/emacs/site-lisp/, do you know why?

jminh commented 4 years ago

Hi,

doom emacs only supports Emacs 26.1 and higher and I use it to check the experimental image and ran into the same problem.

git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
strace -f -e open ~/.emacs.d/bin/doom install
...
[pid 19856] open("~/squashfs-root/usr/share/emacs/site-lisp/cl-lib.elc.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/squashfs-root/usr/share/emacs/site-lisp/cl-lib.el", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/site-lisp/cl-lib.el.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.elc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.elc.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.el", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.el.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 6
[pid 19856] open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 19856] open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
...

The experimental image can run on CentOS 6 but lacks some data (e.g. site-lisp).

probonopd commented 4 years ago

Do you have any idea why it doesn't load some data (e.g. site-lisp)?

jminh commented 4 years ago

The image does not contain some files[1] as shown below.

./Emacs-26.3-x86_64.AppImage --appimage-extract

ls squashfs-root/usr/share/emacs/site-lisp
subdirs.el

ls squashfs-root/usr/share/emacs/26.3/lisp/cl*
ls: No match

Can you check why? It can not load those files while running because it does not bundle these files.

[1] Files like

[pid 19856] open("~/squashfs-root/usr/share/emacs/site-lisp/cl-lib.elc.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/squashfs-root/usr/share/emacs/site-lisp/cl-lib.el", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/site-lisp/cl-lib.el.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.elc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.elc.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.el", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 19856] open("~/e/squashfs-root/usr/share/emacs/26.3/lisp/cl-lib.el.gz", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
probonopd commented 4 years ago

Where would those files be supposed to come from? This is how I build and install:

https://github.com/probonopd/Emacs.AppImage/blob/9432eaf7e9bee7e7d88ae9c05e30e2c44722424e/.travis.yml#L12-L15

I think it is looking for gz, doesn't find these, and then should use .elc instead. What may be missing are some environment variables... let me give this a try.

probonopd commented 4 years ago

Please retry with the latest continuous build.

jminh commented 4 years ago

Hi,

Run emacs GUI mode and it shows (I tried it on two different OS and see same error.)

Error (initialization): User hello has no home directory

Any idea why it cannot find user home?

As for doom, it failed to install.

~/.emacs.d/bin/doom install
Run experimental self-contained bundle
Installing Doom Emacs!

> Creating .doom.d/
  ✓ Created .doom.d/
! init.el already exists, skipping
! config.el already exists, skipping
! packages.el already exists, skipping

Bootstrapping straight.el...
...
  eval-last-sexp(t)
  eval-print-last-sexp()
  (save-current-buffer (set-buffer (url-retrieve-synchronously (format "https://raw.githubusercontent.com/raxod502/straight.el/%s/install.el" straight-repository-branch) (quote silent) (quote inhibit-cookies))) (goto-char (point-max)) (eval-print-last-sexp))
...
...
probonopd commented 4 years ago

Can you get Emacs to print the environment variables, especially $HOME, and see whether they are correct? I suspect that something in https://github.com/probonopd/Emacs.AppImage/blob/experimental/AppRun might be causing this, although I don't know what. Maybe you can experiment with it a bit. (Full disclosure: I do know a few things about AppImage but next to nothing about Emacs).

jminh commented 4 years ago

The output of "C-x d ~/ " is my home directory.

Running emcas with --user="" workaround this problem[1]

emacs --user=""

But it cannot run doom emacs. So I ended up compiling emacs26.1 on the centos 6 machine and use it to run doom emacs.

[1] https://github.com/NixOS/nixpkgs/issues/12335, https://emacs.stackexchange.com/questions/34022/error-initialization-user-has-no-home-directory