disable package: emacs-x

I cannot build it anymore, fails with same error on both Github Actions
CI and local machine.

...
Dumping under the name emacs
**************************************************
Warning: Your system has a gap between BSS and the
heap (11711640 bytes).  This usually means that exec-shield
or something similar is in effect.  The dump may
fail because of this.  See the section about
exec-shield in etc/PROBLEMS for more information.
**************************************************
12313792 of 33554432 static heap bytes used
/bin/bash: line 1: 24675 Segmentation fault      (core dumped) ./temacs --batch --load loadup bootstrap
make[1]: *** [Makefile:741: bootstrap-emacs] Error 139
make[1]: Leaving directory '/home/builder/.termux-build/emacs-x/host-build/src'
...
This commit is contained in:
Leonid Pliushch 2020-12-11 15:38:07 +02:00 committed by Yaksh Bariya
parent 3e5581d8e4
commit fc11b2dc1c
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
14 changed files with 0 additions and 355 deletions

View File

@ -1,127 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/emacs/
TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more (with X11 support)"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=26.3
TERMUX_PKG_REVISION=17
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=4d90e6751ad8967822c6e092db07466b9d383ef1653feb2f95c93e7de66d3485
TERMUX_PKG_DEPENDS="fontconfig, freetype, gdk-pixbuf, giflib, glib, libgnutls, libice, libjpeg-turbo, libpng, librsvg, libsm, libtiff, libx11, libxaw, libxcb, libxext, libxfixes, libxft, libxinerama, libxml2, libxmu, libxpm, libxrandr, libxrender, libxt, littlecms, ncurses, zlib"
TERMUX_PKG_CONFLICTS="emacs"
TERMUX_PKG_REPLACES="emacs"
TERMUX_PKG_PROVIDES="emacs"
TERMUX_PKG_CONFFILES="var/service/emacsd/run var/service/emacsd/log/run"
TERMUX_PKG_HOSTBUILD=true
# Remove some irrelevant files:
TERMUX_PKG_RM_AFTER_INSTALL="
bin/ctags
bin/grep-changelog
share/emacs/${TERMUX_PKG_VERSION}/etc/images
share/emacs/${TERMUX_PKG_VERSION}/etc/refcards
share/info/dir
share/man/man1/ctags.1
share/man/man1/ctags.1.gz
share/man/man1/grep-changelog.1.gz"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-autodepend
--without-cairo
--without-imagemagick
--without-libotf
--without-xaw3d
--without-gpm
--without-dbus
--without-gconf
--without-gsettings
--with-x
--with-x-toolkit=lucid
"
# Ensure use of system malloc:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" emacs_cv_sanitize_address=yes"
# Prevent configure from adding -nopie:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" emacs_cv_prog_cc_no_pie=no"
# Prevent linking against libelf:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_lib_elf_elf_begin=no"
# implemented using dup3(), which fails if oldfd == newfd
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" gl_cv_func_dup2_works=no"
# disable setrlimit function to make termux-am work from within emacs
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_setrlimit=no"
termux_step_post_extract_package() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
# XXX: We have to start with new host build each time
# to avoid build error when cross compiling.
rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
# Termux only use info pages for emacs. Remove the info directory
# to get a clean Info directory file dir.
rm -Rf $TERMUX_PREFIX/share/info
# We cannot run a dumped emacs on Android 5.0+ due to the pie requirement.
# Also, the native emacs we build (bootstrap-emacs) cannot used dumps when
# building inside docker: https://github.com/docker/docker/issues/22801
export CANNOT_DUMP=yes
}
termux_step_host_build() {
# Build a bootstrap-emacs binary to be used in termux_step_post_configure.
local NATIVE_PREFIX=$TERMUX_PKG_TMPDIR/emacs-native
mkdir -p $NATIVE_PREFIX/share/emacs/$TERMUX_PKG_VERSION
ln -s $TERMUX_PKG_SRCDIR/lisp $NATIVE_PREFIX/share/emacs/$TERMUX_PKG_VERSION/lisp
$TERMUX_PKG_SRCDIR/configure --prefix=$NATIVE_PREFIX --without-all --with-x-toolkit=no
make -j $TERMUX_MAKE_PROCESSES
}
termux_step_post_configure() {
cp $TERMUX_PKG_HOSTBUILD_DIR/src/bootstrap-emacs $TERMUX_PKG_BUILDDIR/src/bootstrap-emacs
cp $TERMUX_PKG_HOSTBUILD_DIR/lib-src/make-docfile $TERMUX_PKG_BUILDDIR/lib-src/make-docfile
# Update timestamps so that the binaries does not get rebuilt:
touch -d "next hour" $TERMUX_PKG_BUILDDIR/src/bootstrap-emacs $TERMUX_PKG_BUILDDIR/lib-src/make-docfile
}
termux_step_post_make_install() {
cp $TERMUX_PKG_BUILDER_DIR/site-init.el $TERMUX_PREFIX/share/emacs/${TERMUX_PKG_VERSION}/lisp/emacs-lisp/
# Setup emacs --daemon service script
mkdir -p $TERMUX_PREFIX/var/service
cd $TERMUX_PREFIX/var/service
mkdir -p emacsd/log
echo "#!$TERMUX_PREFIX/bin/sh" > emacsd/run
echo 'exec emacs --fg-daemon 2>&1' >> emacsd/run
chmod +x emacsd/run
touch emacsd/down
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger emacsd/log/run
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" = "configure" ] || [ "\$1" = "abort-upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --install \
$TERMUX_PREFIX/bin/editor editor $TERMUX_PREFIX/bin/emacs 40
fi
fi
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "\$1" != "upgrade" ]; then
if [ -x "$TERMUX_PREFIX/bin/update-alternatives" ]; then
update-alternatives --remove editor $TERMUX_PREFIX/bin/emacs
fi
fi
EOF
}

View File

@ -1,18 +0,0 @@
--- ../emacsclient.c.orig 2019-08-29 20:08:48.840624090 +0200
+++ ./lib-src/emacsclient.c 2019-08-29 20:13:37.425382182 +0200
@@ -1289,11 +1289,12 @@
}
else
#endif
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
}
+ /* Use $PREFIX/var/run instead of $TMPDIR in termux. */
socket_name_storage =
- xmalloc (strlen (tmpdir) + strlen (server_name) + EXTRA_SPACE);
- char *z = stpcpy (socket_name_storage, tmpdir);
+ xmalloc (strlen ("@TERMUX_PREFIX@/var/run") + strlen (server_name) + EXTRA_SPACE);
+ char *z = stpcpy (socket_name_storage, "@TERMUX_PREFIX@/var/run");
z += sprintf (z, "/emacs%ld/", uid);
strcpy (z, server_name);
local_socket_name = socket_name_storage;

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-25.0.92/lisp/cus-start.el ./lisp/cus-start.el
--- ../emacs-25.0.92/lisp/cus-start.el 2016-03-02 05:21:42.000000000 -0500
+++ ./lisp/cus-start.el 2016-04-06 18:16:00.007272810 -0400
@@ -277,7 +277,7 @@
"/tmp"))
(t
(or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
- "/tmp"))))
+ "@TERMUX_PREFIX@/tmp"))))
:initialize custom-initialize-delay)
;; fns.c
(use-dialog-box menu boolean "21.1")

View File

@ -1,16 +0,0 @@
diff -u -r ../emacs-25.0.92/lisp/loadup.el ./lisp/loadup.el
--- ../emacs-25.0.92/lisp/loadup.el 2016-09-06 09:49:51.838175278 +0300
+++ ./lisp/loadup.el 2016-09-06 09:57:18.694585441 +0300
@@ -378,7 +378,11 @@
(message "Warning: Change in load-path due to site-init will be \
lost after dumping")))
-(setq current-load-list nil)
+;; On an emacs that runs undumped, i.e. Android, this causes bogus
+;; entries to appear in load-history. Commenting this out causes an entry
+;; for loadup.el with a bogus filename to appear instead, but since it
+;; neither provides nor requires anything, it appears to be safe.
+;;(setq current-load-list nil)
;; Avoid storing references to build directory in the binary.
(setq custom-current-group-alist nil)

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-26.1/lisp/net/tramp.el ./lisp/net/tramp.el
--- ../emacs-26.1/lisp/net/tramp.el 2018-04-23 14:17:48.000000000 +0000
+++ ./lisp/net/tramp.el 2018-05-29 09:26:34.017326913 +0000
@@ -127,7 +127,7 @@
:require 'tramp)
(defcustom tramp-encoding-shell
- (or (tramp-compat-funcall 'w32-shell-name) "/bin/sh")
+ (or (tramp-compat-funcall 'w32-shell-name) "@TERMUX_PREFIX@/bin/sh")
"Use this program for encoding and decoding commands on the local host.
This shell is used to execute the encoding and decoding command on the
local host, so if you want to use `~' in those commands, you should

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-25.0.92/lisp/server.el ./lisp/server.el
--- ../emacs-25.0.92/lisp/server.el 2016-03-02 05:21:42.000000000 -0500
+++ ./lisp/server.el 2016-04-06 17:34:48.134354070 -0400
@@ -267,7 +267,7 @@
;; does not read the init file.
(defvar server-socket-dir
(and (featurep 'make-network-process '(:family local))
- (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid)))
+ (format "%s/emacs%d" "@TERMUX_PREFIX@/var/run" (user-uid)))
"The directory in which to place the server socket.
If local sockets are not supported, this is nil.")

View File

@ -1,21 +0,0 @@
diff -u -r ../emacs-25.0.92/lisp/subr.el ./lisp/subr.el
--- ../emacs-25.0.92/lisp/subr.el 2016-03-02 05:21:42.000000000 -0500
+++ ./lisp/subr.el 2016-03-25 22:03:57.240066240 -0400
@@ -2975,7 +2975,7 @@
(declare (advertised-calling-convention (name buffer command) "23.1"))
(start-file-process
name buffer
- (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
+ (if (file-remote-p default-directory) "@TERMUX_PREFIX@/bin/sh" shell-file-name)
(if (file-remote-p default-directory) "-c" shell-command-switch)
(mapconcat 'identity args " ")))
@@ -3019,7 +3019,7 @@
(declare (advertised-calling-convention
(command &optional infile buffer display) "24.5"))
(process-file
- (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
+ (if (file-remote-p default-directory) "@TERMUX_PREFIX@/bin/sh" shell-file-name)
infile buffer display
(if (file-remote-p default-directory) "-c" shell-command-switch)
(mapconcat 'identity (cons command args) " ")))

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-26.1/lisp/term.el ./lisp/term.el
--- ../emacs-26.1/lisp/term.el 2018-05-25 08:53:30.000000000 +0000
+++ ./lisp/term.el 2018-05-29 09:28:08.472262228 +0000
@@ -1552,7 +1552,7 @@
;; do the decoding by hand on the parts that are made of chars.
(coding-system-for-read 'binary))
(apply 'start-process name buffer
- "/bin/sh" "-c"
+ "@TERMUX_PREFIX@/bin/sh" "-c"
(format "stty -nl echo rows %d columns %d sane 2>/dev/null;\
if [ $1 = .. ]; then shift; fi; exec \"$@\""
term-height term-width)

View File

@ -1,37 +0,0 @@
diff -u -r ../emacs-26.2/lisp/textmodes/ispell.el ./lisp/textmodes/ispell.el
--- ../emacs-26.2/lisp/textmodes/ispell.el 2019-02-20 13:44:42.000000000 +0000
+++ ./lisp/textmodes/ispell.el 2019-04-14 18:15:07.894909566 +0000
@@ -215,14 +215,14 @@
:group 'ispell)
(defcustom ispell-alternate-dictionary
- (cond ((file-readable-p "/usr/dict/web2") "/usr/dict/web2")
- ((file-readable-p "/usr/share/dict/web2") "/usr/share/dict/web2")
- ((file-readable-p "/usr/dict/words") "/usr/dict/words")
- ((file-readable-p "/usr/lib/dict/words") "/usr/lib/dict/words")
- ((file-readable-p "/usr/share/dict/words") "/usr/share/dict/words")
- ((file-readable-p "/usr/share/lib/dict/words")
- "/usr/share/lib/dict/words")
- ((file-readable-p "/sys/dict") "/sys/dict"))
+ (cond ((file-readable-p "@TERMUX_PREFIX@/dict/web2") "/usr/dict/web2")
+ ((file-readable-p "@TERMUX_PREFIX@/share/dict/web2") "/usr/share/dict/web2")
+ ((file-readable-p "@TERMUX_PREFIX@/dict/words") "/usr/dict/words")
+ ((file-readable-p "@TERMUX_PREFIX@/lib/dict/words") "/usr/lib/dict/words")
+ ((file-readable-p "@TERMUX_PREFIX@/share/dict/words") "/usr/share/dict/words")
+ ((file-readable-p "@TERMUX_PREFIX@/share/lib/dict/words")
+ "@TERMUX_PREFIX@/share/lib/dict/words")
+ ((file-readable-p "@TERMUX_PREFIX@/sys/dict") "@TERMUX_PREFIX@/sys/dict"))
"Alternate plain word-list dictionary for spelling help."
:type '(choice file (const :tag "None" nil))
:group 'ispell)
@@ -266,9 +266,7 @@
:group 'ispell)
(defcustom ispell-look-command
- (cond ((file-exists-p "/bin/look") "/bin/look")
- ((file-exists-p "/usr/local/bin/look") "/usr/local/bin/look")
- ((file-exists-p "/usr/bin/look") "/usr/bin/look")
+ (cond ((file-exists-p "@TERMUX_PREFIX@/bin/look") "@TERMUX_PREFIX@/bin/look")
(t "look"))
"Name of the look command for search processes.
This must be an absolute file name."

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-24.3/src/editfns.c ./src/editfns.c
--- ../emacs-24.3/src/editfns.c 2013-01-01 21:37:17.000000000 +0100
+++ ./src/editfns.c 2014-02-19 03:21:55.000000000 +0100
@@ -1304,7 +1304,7 @@
if (!pw)
return Qnil;
- p = USER_FULL_NAME;
+ p = "unknown";
/* Chop off everything after the first comma. */
q = strchr (p, ',');
full = make_string (p, q ? q - p : strlen (p));

View File

@ -1,4 +0,0 @@
; Enable terminal mouse events:
(xterm-mouse-mode 1)
(global-set-key [mouse-4] 'scroll-down-line)
(global-set-key [mouse-5] 'scroll-up-line)

View File

@ -1,12 +0,0 @@
diff -u -r ../emacs-25.0.92/src/callproc.c ./src/callproc.c
--- ../emacs-25.0.92/src/callproc.c 2016-03-02 05:21:43.000000000 -0500
+++ ./src/callproc.c 2016-03-25 22:02:38.977310920 -0400
@@ -1619,7 +1619,7 @@
dir_warning ("arch-independent data dir", Vdata_directory);
sh = getenv ("SHELL");
- Vshell_file_name = build_string (sh ? sh : "/bin/sh");
+ Vshell_file_name = build_string (sh ? sh : "@TERMUX_PREFIX@/bin/sh");
#ifdef DOS_NT
Vshared_game_score_directory = Qnil;

View File

@ -1,38 +0,0 @@
diff -u -r ../emacs-25.2/src/filelock.c ./src/filelock.c
--- ../emacs-25.2/src/filelock.c 2017-02-03 11:25:45.000000000 +0100
+++ ./src/filelock.c 2017-06-30 23:36:35.331596590 +0200
@@ -126,14 +126,14 @@
static time_t boot_time;
static bool boot_time_initialized;
-#ifdef BOOT_TIME
+#if defined(BOOT_TIME) && !defined(__ANDROID__)
static void get_boot_time_1 (const char *, bool);
#endif
static time_t
get_boot_time (void)
{
-#if defined (BOOT_TIME)
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
int counter;
#endif
@@ -169,7 +169,7 @@
}
}
-#if defined (BOOT_TIME)
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
#ifndef CANNOT_DUMP
/* The utmp routines maintain static state.
Don't touch that state unless we are initialized,
@@ -237,7 +237,7 @@
#endif
}
-#ifdef BOOT_TIME
+#if defined(BOOT_TIME) && !defined(__ANDROID__)
/* Try to get the boot time from wtmp file FILENAME.
This succeeds if that file contains a reboot record.

View File

@ -1,22 +0,0 @@
https://github.com/emacs-mirror/emacs/commit/18b235941109ab9e7a405cbe950886c97e897e11
diff --git a/src/keyboard.c b/src/keyboard.c
index 57757cf2112..f32b1560133 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8916,7 +8916,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
ptrdiff_t keys_start;
Lisp_Object current_binding = Qnil;
- Lisp_Object first_event = Qnil;
/* Index of the first key that has no binding.
It is useless to try fkey.start larger than that. */
@@ -9026,6 +9025,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
starting_buffer = current_buffer;
first_unbound = bufsize + 1;
+ Lisp_Object first_event = mock_input > 0 ? keybuf[0] : Qnil;
/* Build our list of keymaps.
If we recognize a function key and replace its escape sequence in