all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#43878: emacs fails to build on recent macOS 11.0 ARM betas
@ 2020-10-09  6:24 Itai Seggev
  2020-10-09 20:57 ` Unknown
  2020-11-16 20:53 ` bug#43878: patch for 43878 Itai Seggev
  0 siblings, 2 replies; 9+ messages in thread
From: Itai Seggev @ 2020-10-09  6:24 UTC (permalink / raw)
  To: 43878

In the last few betas of macOS on ARM, Apple has start enforcing a requirement
that all code be properly signed.  The linker automatically adds an "ad-hoc"
signature.  (At least for now, this is not required on x86_64, though I imagine
it is only a matter of time given Apple's public statements on code signing.)

The emacs build fails when the temacs is called to compile the Lisp files.
I've tracked this down to the call to make-fingerprint on temacs.tmp.  The call
modifies the Macho-O temacs.tmp after it was linked and signed, invaldinating
the code signature.  When it is launched, it is killed with a SIGABORT by the
OS due to the invalid signature.

I've come up with a couple of workarounds in my local build.  First, if I
modifiy make-fingerprint to not store the result in the Mach-O, then everything
seems to build fine.  It's not entirely clear to me what the purpose of this
modification of the Macho-O is, so I don't know if such a solution is
acceptable upstream.

If it is not, then the signature _must_ be repaired after make-fingerprint is
run.  This can be done quite simply, using 'codesign -s - -f temacs.tmp', which
creates a new "ad-hoc" signature for the executable.

If necessary, I am happy to test a patch / branch on my machine.

--
Itai

In 1997 a group of programmers started writing a desktop environment to fix a
travesty they didn't create.  Their program promptly found its way onto un*x
systems everywhere. Today, still opposed by a software monopolist, they survive
as soldiers of fortune.  If you share their vision, if you know you can help,
and if you can connect to internet, maybe you can join... the K-Team.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-24  8:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09  6:24 bug#43878: emacs fails to build on recent macOS 11.0 ARM betas Itai Seggev
2020-10-09 20:57 ` Unknown
2020-11-16 20:53 ` bug#43878: patch for 43878 Itai Seggev
2020-11-16 21:44   ` Lars Ingebrigtsen
2020-11-17 18:36     ` Itai Seggev
2020-11-18 23:34       ` Alan Third
2020-11-20 20:19         ` Itai Seggev
2020-11-24  5:54           ` Lars Ingebrigtsen
2020-11-24  8:25             ` Itai Seggev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.