Subject: Re: bug#17971: 24.3.92; Patch to fix el compression on RHEL/CentOS 7

From: Stephen Hassard <[email-masked]>
Date: Tue, 8 Jul 2014 08:50:52 -0700

Here's the relevant output from the 'make install' on CentOS 7:

----
[ -z "/usr/bin/gzip" ] || { \
  echo "Compressing *.el ..." && \
  cd "/home/shassard/opt/emacs/share/emacs/24.3.92/lisp" && \
  find . -name '*.elc' -exec /bin/sh -c \
    '/usr/bin/gzip -9n `expr "$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
}
Compressing *.el ...
find: ‘./progmodes/make-mode.el’: No such file or directory
find: ‘./progmodes/m4-mode.el’: No such file or directory
find: ‘./progmodes/cc-fonts.el’: No such file or directory
find: ‘./progmodes/cc-engine.el’: No such file or directory
find: ‘./progmodes/idlw-complete-structtag.el’: No such file or directory
find: ‘./progmodes/meta-mode.el’: No such file or directory
find: ‘./progmodes/bat-mode.el’: No such file or directory
find: ‘./progmodes/gud.el’: No such file or directory
find: ‘./progmodes/simula.el’: No such file or directory
find: ‘./progmodes/autoconf.el’: No such file or directory
find: ‘./progmodes/prog-mode.el’: No such file or directory
----

make immediately fails after this point.

I've attached a revised patch that adds the -9n flag to the gzip command
and switch back to -exec for find.

On Mon, Jul 7, 2014 at 11:04 PM, Glenn Morris <[email-masked]> wrote:

> Stephen Hassard wrote:
>
> > The current alpha builds are failing during 'make install' while
> > performing the .elc compression on CentOS 7.
>
> Please tell us how it fails.
>
> > I've cleaned up the find command in the Makefile and have a patch that
> > fixes the problem while retaining function on Ubuntu/Debian. Please find
> > it attached.
>
> Sadly I don't think -execdir is portable.
>
From 50c0162ec4fd22a757df69fabe8202685093ca74 Mon Sep 17 00:00:00 2001
From: Stephen Hassard <[email-masked]>
Date: Tue, 8 Jul 2014 08:46:54 -0700
Subject: [PATCH] Fix .el compression on CentOS 7

---
 Makefile.in | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 76a0304..f4fd4aa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -614,9 +614,8 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
 	  ${write_subdir} || true
 	[ -z "${GZIP_PROG}" ] || { \
 	  echo "Compressing *.el ..." && \
-	  cd "$(DESTDIR)${lispdir}" && \
-	  find . -name '*.elc' -exec $(SHELL) -c \
-	    '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
+          find "$(DESTDIR)${lispdir}" -name '*.el' \
+            -exec ${SHELL} -c 'test -f {}c' \; -exec ${GZIP_PROG} -9n {} \; ; \
 	}
 	-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
 
-- 
1.8.3.1