* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
@ 2021-09-26 15:03 Ken Brown
2021-09-26 16:04 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Ken Brown @ 2021-09-26 15:03 UTC (permalink / raw)
To: 50818
An installed emacs built with native compilation won't start on Cygwin because
the executable permissions have been removed from the .eln files. This is done
in the install-eln target of the top-level Makefile.in, which installs the .eln
files with 644 permissions even though they were created with executable
permissions.
The failure is in Cygwin's dlopen, which calls the windows function
GetModuleHandleExW.
Would it hurt anything on other platforms if the .eln files were installed with
755 permissions? If so, I can submit a patch that does this just on Cygwin.
Ken
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
2021-09-26 15:03 bug#50818: 28.0.50; .eln files need to be executable on Cygwin Ken Brown
@ 2021-09-26 16:04 ` Eli Zaretskii
2021-09-26 16:57 ` Ken Brown
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-09-26 16:04 UTC (permalink / raw)
To: Ken Brown; +Cc: 50818
> From: Ken Brown <kbrown@cornell.edu>
> Date: Sun, 26 Sep 2021 11:03:53 -0400
>
> An installed emacs built with native compilation won't start on Cygwin because
> the executable permissions have been removed from the .eln files. This is done
> in the install-eln target of the top-level Makefile.in, which installs the .eln
> files with 644 permissions even though they were created with executable
> permissions.
Is what we do different from any other package the installs DLLs?
> Would it hurt anything on other platforms if the .eln files were installed with
> 755 permissions? If so, I can submit a patch that does this just on Cygwin.
Please define a new INSTALL_ELN macro for that purpose.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
2021-09-26 16:04 ` Eli Zaretskii
@ 2021-09-26 16:57 ` Ken Brown
2021-09-27 18:52 ` Ken Brown
0 siblings, 1 reply; 6+ messages in thread
From: Ken Brown @ 2021-09-26 16:57 UTC (permalink / raw)
To: Eli Zaretskii, Andrea Corallo; +Cc: 50818
On 9/26/2021 12:04 PM, Eli Zaretskii wrote:
>> From: Ken Brown <kbrown@cornell.edu>
>> Date: Sun, 26 Sep 2021 11:03:53 -0400
>>
>> An installed emacs built with native compilation won't start on Cygwin because
>> the executable permissions have been removed from the .eln files. This is done
>> in the install-eln target of the top-level Makefile.in, which installs the .eln
>> files with 644 permissions even though they were created with executable
>> permissions.
>
> Is what we do different from any other package the installs DLLs?
Yes. DLLs are always installed with 755 permissions. Packages that install
DLLs typically use libtool, which just does the right thing. I can't recall
offhand seeing a hand-written Makefile rule for installing a DLL, but I assume
it would use INSTALL or INSTALL_PROGRAM rather than INSTALL_DATA. It seems
strange to me to see INSTALL_DATA used for installing a library, but I'm not
really familiar with what's typically done on GNU/Linux, for example
>> Would it hurt anything on other platforms if the .eln files were installed with
>> 755 permissions? If so, I can submit a patch that does this just on Cygwin.
>
> Please define a new INSTALL_ELN macro for that purpose.
OK. But I'd like to hear first (maybe from Andrea?) whether there's a reason
for this to be Cygwin-specific, and whether INSTALL_DATA is in fact typically
used for installing libraries on other platforms.
Ken
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
2021-09-26 16:57 ` Ken Brown
@ 2021-09-27 18:52 ` Ken Brown
2021-09-27 19:12 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Ken Brown @ 2021-09-27 18:52 UTC (permalink / raw)
To: Eli Zaretskii, Andrea Corallo; +Cc: 50818
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
On 9/26/2021 12:57 PM, Ken Brown wrote:
> On 9/26/2021 12:04 PM, Eli Zaretskii wrote:
>> Please define a new INSTALL_ELN macro for that purpose.
>
> OK. But I'd like to hear first (maybe from Andrea?) whether there's a reason
> for this to be Cygwin-specific, and whether INSTALL_DATA is in fact typically
> used for installing libraries on other platforms.
I decide to go ahead with a Cygwin-specific patch (attached). If Andrea or
someone else decides this would be good for all platforms, they can do that later.
OK to push?
Ken
[-- Attachment #2: 0001-Make-.eln-files-executable-on-Cygwin.patch --]
[-- Type: text/plain, Size: 1557 bytes --]
From 6bec21243d20df015875ee8576bc722224480acb Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 27 Sep 2021 14:46:41 -0400
Subject: [PATCH] Make .eln files executable on Cygwin
* Makefile.in (INSTALL_ELN): New variable, equal to $(INSTALL) on
Cygwin and $(INSTALL_DATA) on other platforms.
(install-eln): Use INSTALL_ELN instead of INSTALL_DATA.
(Bug#50818)
---
Makefile.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 235b707673..5fc1edc7a3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -285,10 +285,16 @@ use_gamedir=
# not use an absolute path. So we must take care to always run
# INSTALL-type commands from the directory containing the Makefile.
# This explains (I think) the cd thisdir seen in several install rules.
+SYSTEM_TYPE = @SYSTEM_TYPE@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
+ifeq ($(SYSTEM_TYPE),cygwin)
+ INSTALL_ELN = $(INSTALL)
+else
+ INSTALL_ELN = $(INSTALL_DATA)
+endif
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
MKDIR_P = @MKDIR_P@
@@ -791,7 +797,7 @@ install-eln:
ifeq ($(HAVE_NATIVE_COMP),yes)
umask 022 ; \
find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \
- find native-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \;
+ find native-lisp -type f -exec ${INSTALL_ELN} "{}" "$(ELN_DESTDIR){}" \;
endif
### Build Emacs and install it, stripping binaries while installing them.
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
2021-09-27 18:52 ` Ken Brown
@ 2021-09-27 19:12 ` Eli Zaretskii
2021-09-27 19:26 ` Ken Brown
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-09-27 19:12 UTC (permalink / raw)
To: Ken Brown; +Cc: 50818, akrl
> From: Ken Brown <kbrown@cornell.edu>
> Cc: 50818@debbugs.gnu.org
> Date: Mon, 27 Sep 2021 14:52:15 -0400
>
> I decide to go ahead with a Cygwin-specific patch (attached). If Andrea or
> someone else decides this would be good for all platforms, they can do that later.
>
> OK to push?
Yes, please.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#50818: 28.0.50; .eln files need to be executable on Cygwin
2021-09-27 19:12 ` Eli Zaretskii
@ 2021-09-27 19:26 ` Ken Brown
0 siblings, 0 replies; 6+ messages in thread
From: Ken Brown @ 2021-09-27 19:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: akrl, 50818-done
On 9/27/2021 3:12 PM, Eli Zaretskii wrote:
>> From: Ken Brown <kbrown@cornell.edu>
>> Cc: 50818@debbugs.gnu.org
>> Date: Mon, 27 Sep 2021 14:52:15 -0400
>>
>> I decide to go ahead with a Cygwin-specific patch (attached). If Andrea or
>> someone else decides this would be good for all platforms, they can do that later.
>>
>> OK to push?
>
> Yes, please.
Done. Closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-09-27 19:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-26 15:03 bug#50818: 28.0.50; .eln files need to be executable on Cygwin Ken Brown
2021-09-26 16:04 ` Eli Zaretskii
2021-09-26 16:57 ` Ken Brown
2021-09-27 18:52 ` Ken Brown
2021-09-27 19:12 ` Eli Zaretskii
2021-09-27 19:26 ` Ken Brown
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).