GNU bug report logs - #57563
28.1; macOS - layout warning at startup

Previous Next

Package: emacs;

Reported by: Bob Kline <bkline <at> rksystems.com>

Date: Sat, 3 Sep 2022 15:33:02 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57563 in the body.
You can then email your comments to 57563 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Sat, 03 Sep 2022 15:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bob Kline <bkline <at> rksystems.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Sep 2022 15:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; macOS - layout warning at startup
Date: Sat, 3 Sep 2022 10:39:46 -0400
This is related to bug report 53481

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53481

I followed the instructions to unarchive that bug by sending a message
to control AT debbugs.gnu.org, with unarchive 53481 in the body, and
then emailing my followup to 53481 AT debbugs.gnu.org, but that appears
to have had no effect.

In the thread for that bug report Alan Third (alan <at> idiocy.org)
wrote that the bug was fixed in Emacs 28, but that does not appear to be
true.

The unwanted behavior is the display at startup of an annoying warning
which suggests something may break in the future.

[BEGIN TERMINAL TRANSCRIPT]
% emacs --version
GNU Emacs 28.1
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
% emacs -Q
2022-09-03 09:35:53.118 Emacs-x86_64-10_14[37072:11711478] It's not
legal to call -layoutSubtreeIfNeeded on a view which is already being
laid out.  If you are implementing the view's -layout method, you can
call -[super layout] instead. Break on void
_NSDetectedLayoutRecursion(void) to debug.  This will be logged only
once.  This may break in the future.
[END TERMINAL TRANSCRIPT]

[begin environment information captured by M-x report-emacs-bug]
In GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS
appkit-1671.60 Version 10.14.6 (Build 18G95))
 of 2022-05-11 built on builder10-14.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.5.1

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils goto-addr thingatpt
noutline outline view jka-compr info misearch multi-isearch time-date
vc-git diff-mode easy-mmode vc-dispatcher web-mode advice disp-table
finder-inf time package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 350507 11196)
 (symbols 48 15228 1)
 (strings 32 82138 2244)
 (string-bytes 1 2046050)
 (vectors 16 24837)
 (vector-slots 8 339889 25814)
 (floats 8 36 50)
 (intervals 56 31601 0)
 (buffers 992 13))
[end environment information captured by M-x report-emacs-bug]

Thanks.

-- 
Bob Kline
https://www.rksystems.com
mailto:bkline <at> rksystems.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 05 Sep 2022 01:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Bob Kline <bkline <at> rksystems.com>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 05 Sep 2022 03:36:04 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> The unwanted behavior is the display at startup of an annoying warning
> which suggests something may break in the future.

[...]

> 2022-09-03 09:35:53.118 Emacs-x86_64-10_14[37072:11711478] It's not
> legal to call -layoutSubtreeIfNeeded on a view which is already being
> laid out.  If you are implementing the view's -layout method, you can
> call -[super layout] instead. Break on void
> _NSDetectedLayoutRecursion(void) to debug.  This will be logged only
> once.  This may break in the future.

[...]

> In GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS
> appkit-1671.60 Version 10.14.6 (Build 18G95))
>  of 2022-05-11 built on builder10-14.lan
> Windowing system distributor 'Apple', version 10.3.2113
> System Description:  macOS 12.5.1

I tried this on my M1 Apple laptop, and I did not get this warning.
This is with:

In GNU Emacs 28.1 (build 2, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Versi\
on 12.5.1 (Build 21G83))
 of 2022-09-05 built on emkay.local
Repository revision: 5a223c7f2ef4c31abbd46367b6ea83cd19d30aa7
Repository branch: HEAD
System Description:  macOS 12.5.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 05 Sep 2022 12:14:01 GMT) Full text and rfc822 format available.

Message #11 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 5 Sep 2022 08:13:15 -0400
On Sun, Sep 4, 2022 at 9:36 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> ...
> I tried this on my M1 Apple laptop, and I did not get this warning.
> ...

Doesn't happen on my M1 laptop either. Only on the Intel-based laptop
provided by one of my clients.

-- 
Bob Kline
https://www.rksystems.com
mailto:bkline <at> rksystems.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 05 Sep 2022 19:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Bob Kline <bkline <at> rksystems.com>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 05 Sep 2022 21:01:59 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Sun, Sep 4, 2022 at 9:36 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>> ...
>> I tried this on my M1 Apple laptop, and I did not get this warning.
>> ...
>
> Doesn't happen on my M1 laptop either. Only on the Intel-based laptop
> provided by one of my clients.

Could this be due to the different appkit versions?  I.e., 1671.60 vs
2113.60? 

> > In GNU Emacs 28.1 (build 1, x86_64-apple-darwin18.7.0, NS
> > appkit-1671.60 Version 10.14.6 (Build 18G95))
> 
> [...]
> 
> In GNU Emacs 28.1 (build 2, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Versi\
> on 12.5.1 (Build 21G83))

I can try to root out an Intel Apple laptop to test; I think I've got
one here somewhere...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Tue, 06 Sep 2022 01:12:01 GMT) Full text and rfc822 format available.

Message #17 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Tue, 06 Sep 2022 09:11:12 +0800
Bob Kline <bkline <at> rksystems.com> writes:

> This is related to bug report 53481
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53481
>
> I followed the instructions to unarchive that bug by sending a message
> to control AT debbugs.gnu.org, with unarchive 53481 in the body, and
> then emailing my followup to 53481 AT debbugs.gnu.org, but that appears
> to have had no effect.
>
> In the thread for that bug report Alan Third (alan <at> idiocy.org)
> wrote that the bug was fixed in Emacs 28, but that does not appear to be
> true.
>
> The unwanted behavior is the display at startup of an annoying warning
> which suggests something may break in the future.

We've already seen this in the font dialog, and that was a bug with
Apple's own code, so could you please put a breakpoint on
_NSDetectedLayoutRecursion, and show a backtrace from when it is set?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Tue, 06 Sep 2022 13:47:02 GMT) Full text and rfc822 format available.

Message #20 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Tue, 6 Sep 2022 09:45:42 -0400
On Mon, Sep 5, 2022 at 9:11 PM Po Lu <luangruo <at> yahoo.com> wrote:
> ... could you please put a breakpoint on
> _NSDetectedLayoutRecursion, and show a backtrace from when it is set?

I'm happy to provide whatever information is needed, but I'll need
more detailed instructions. I haven't done any Mac software
development since the previous century, well before OS X.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 01:05:01 GMT) Full text and rfc822 format available.

Message #23 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 09:03:52 +0800
Bob Kline <bkline <at> rksystems.com> writes:

> I'm happy to provide whatever information is needed, but I'll need
> more detailed instructions. I haven't done any Mac software
> development since the previous century, well before OS X.

I'm not sure I know how to do that with lldb, unfortunately.  Perhaps
someone else can chime in at this point.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 05:05:02 GMT) Full text and rfc822 format available.

Message #26 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 57563 <at> debbugs.gnu.org, Bob Kline <bkline <at> rksystems.com>
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 07:04:42 +0200
Po Lu <luangruo <at> yahoo.com> writes:

> Bob Kline <bkline <at> rksystems.com> writes:
>
>> I'm happy to provide whatever information is needed, but I'll need
>> more detailed instructions. I haven't done any Mac software
>> development since the previous century, well before OS X.
>
> I'm not sure I know how to do that with lldb, unfortunately.  Perhaps
> someone else can chime in at this point.

I think Bob is using x86_64, which GDB supports.  Anyway, it's not much
different for LLDB:

As usual, the more debug info your Emacs executable contains, the
better.  Then, from where you built Emacs

cd src
lldb ./emacs
(lldb) b _NSDetectedLayoutRecursion
(lldb) run

and when LLDB stops at the breakpoint, print the backtrace with

(lldb) bt





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 12:19:01 GMT) Full text and rfc822 format available.

Message #29 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 08:17:44 -0400
On Wed, Sep 7, 2022 at 1:04 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ... from where you built Emacs ...

I didn't build emacs myself, I installed it with "brew install --cask
--no-quarantine emacs." I did try gdb, but gdb didn't recognize emacs
as an executable. I tried following your instructions using lldb, and
I was actually able to set the breakpoint (so enough usable symbols
were present for the debugger to find the address for the breakpoint),
but "run" failed ("Not allowed to attach to process").




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 12:29:01 GMT) Full text and rfc822 format available.

Message #32 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 14:28:05 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Wed, Sep 7, 2022 at 1:04 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>> ... from where you built Emacs ...
>
> I didn't build emacs myself, I installed it with "brew install --cask
> --no-quarantine emacs." I did try gdb, but gdb didn't recognize emacs
> as an executable. I tried following your instructions using lldb, and
> I was actually able to set the breakpoint (so enough usable symbols
> were present for the debugger to find the address for the breakpoint),
> but "run" failed ("Not allowed to attach to process").

What does "DevToolsSecurity -status" say?  If it doesn't say "enabled",
maybe "sudo DevToolsSecurity -enable" helps.  (You can see what it does
with "man ...".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 12:48:02 GMT) Full text and rfc822 format available.

Message #35 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 08:47:36 -0400
On Wed, Sep 7, 2022 at 8:28 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> What does "DevToolsSecurity -status" say?  If it doesn't say "enabled",
> maybe "sudo DevToolsSecurity -enable" helps.  ...

It was disabled, and I was able to enable it, but the "run" command
failed with the same error message. That error message goes on to say
"Look in the console messages (Console.app), near the debugserver
entries, when the attach failed.  The subsystem that denied the attach
permission will likely have logged an informative message about why it
was denied." However, I can find no "debugserver" entries in any of
the console logs, or any entries which seem even remotely related.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 12:57:01 GMT) Full text and rfc822 format available.

Message #38 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 14:56:31 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Wed, Sep 7, 2022 at 8:28 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>> ...
>> What does "DevToolsSecurity -status" say?  If it doesn't say "enabled",
>> maybe "sudo DevToolsSecurity -enable" helps.  ...
>
> It was disabled, and I was able to enable it, but the "run" command
> failed with the same error message. That error message goes on to say
> "Look in the console messages (Console.app), near the debugserver
> entries, when the attach failed.  The subsystem that denied the attach
> permission will likely have logged an informative message about why it
> was denied." However, I can find no "debugserver" entries in any of
> the console logs, or any entries which seem even remotely related.

Hm, guessing...

Could you please see if your USER is in the _developers group?

groups | grep _developer





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:01:02 GMT) Full text and rfc822 format available.

Message #41 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 08:59:51 -0400
On Wed, Sep 7, 2022 at 8:56 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> Could you please see if your USER is in the _developers group?
> ...

Yes, it is.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:04:02 GMT) Full text and rfc822 format available.

Message #44 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 15:03:00 +0200
>>>>> On Wed, 7 Sep 2022 08:47:36 -0400, Bob Kline <bkline <at> rksystems.com> said:

    Bob> On Wed, Sep 7, 2022 at 8:28 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
    >> ...
    >> What does "DevToolsSecurity -status" say?  If it doesn't say "enabled",
    >> maybe "sudo DevToolsSecurity -enable" helps.  ...

    Bob> It was disabled, and I was able to enable it, but the "run" command
    Bob> failed with the same error message. That error message goes on to say
    Bob> "Look in the console messages (Console.app), near the debugserver
    Bob> entries, when the attach failed.  The subsystem that denied the attach
    Bob> permission will likely have logged an informative message about why it
    Bob> was denied." However, I can find no "debugserver" entries in any of
    Bob> the console logs, or any entries which seem even remotely related.

DevToolsSecurity -enable turns off the password prompting for accounts
which are allowed to run devtools. You still need to match the
configured policy, which is normally being a member of the _developer
or admin groups. You can check which it is by doing

    DevToolsSecurity -status -verbose

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:12:02 GMT) Full text and rfc822 format available.

Message #47 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 09:10:59 -0400
On Wed, Sep 7, 2022 at 9:03 AM Robert Pluim <rpluim <at> gmail.com> wrote:
> ... You still need to match the
> configured policy, which is normally being a member of the _developer
> or admin groups.

I'm in both groups.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:20:02 GMT) Full text and rfc822 format available.

Message #50 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 15:19:34 +0200
>>>>> On Wed, 7 Sep 2022 09:10:59 -0400, Bob Kline <bkline <at> rksystems.com> said:

    Bob> On Wed, Sep 7, 2022 at 9:03 AM Robert Pluim <rpluim <at> gmail.com> wrote:
    >> ... You still need to match the
    >> configured policy, which is normally being a member of the _developer
    >> or admin groups.

    Bob> I'm in both groups.

And that matches what 'DevToolsSecurity -status -verbose' says? If so,
Iʼm out of ideas.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:23:02 GMT) Full text and rfc822 format available.

Message #53 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 09:22:05 -0400
On Wed, Sep 7, 2022 at 9:19 AM Robert Pluim <rpluim <at> gmail.com> wrote:
> ...
> And that matches what 'DevToolsSecurity -status -verbose' says?

Here's the rule:
"rule" : { "is-admin", "is-developer", "authenticate-developer" }




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:42:02 GMT) Full text and rfc822 format available.

Message #56 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org,
 Bob Kline <bkline <at> rksystems.com>
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 15:41:01 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

>>>>>> On Wed, 7 Sep 2022 09:10:59 -0400, Bob Kline <bkline <at> rksystems.com> said:
>
>     Bob> On Wed, Sep 7, 2022 at 9:03 AM Robert Pluim <rpluim <at> gmail.com> wrote:
>     >> ... You still need to match the
>     >> configured policy, which is normally being a member of the _developer
>     >> or admin groups.
>
>     Bob> I'm in both groups.
>
> And that matches what 'DevToolsSecurity -status -verbose' says? If so,
> Iʼm out of ideas.

Hm, yeah.

It could be a missing get-task-allow entitlement for the Homebrew Emacs
executable, in which case debugserver (part of LLDB) cannot attach to
the Emacs process.  I've heard something like that in different contexts
from other developes, but I don't know how they fixed it.

Any change you can build Emacs yourself, Bob?







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:46:01 GMT) Full text and rfc822 format available.

Message #59 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 15:45:16 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Wed, Sep 7, 2022 at 9:19 AM Robert Pluim <rpluim <at> gmail.com> wrote:
>> ...
>> And that matches what 'DevToolsSecurity -status -verbose' says?
>
> Here's the rule:
> "rule" : { "is-admin", "is-developer", "authenticate-developer" }

That's what I see, too.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:48:01 GMT) Full text and rfc822 format available.

Message #62 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 07 Sep 2022 15:47:04 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Wed, Sep 7, 2022 at 9:19 AM Robert Pluim <rpluim <at> gmail.com> wrote:
>> ...
>> And that matches what 'DevToolsSecurity -status -verbose' says?
>
> Here's the rule:
> "rule" : { "is-admin", "is-developer", "authenticate-developer" }

Speaking of entitlements: Here's something I found on the Web.

https://gist.github.com/talaviram/1f21e141a137744c89e81b58f73e23c3




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:49:02 GMT) Full text and rfc822 format available.

Message #65 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 09:48:26 -0400
On Wed, Sep 7, 2022 at 9:41 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> Any change you can build Emacs yourself, Bob?

I'll give it a shot. I've built my own emacs on Linux, but it's been
more than a quarter century since I've done any serious development
for Mac software. Might take a day or two (assuming I succeed).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 13:59:01 GMT) Full text and rfc822 format available.

Message #68 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 15:58:37 +0200
On 22-09-07 15:48 , Bob Kline wrote:
> On Wed, Sep 7, 2022 at 9:41 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>> ...
>> Any change you can build Emacs yourself, Bob?
> 
> I'll give it a shot. I've built my own emacs on Linux, but it's been
> more than a quarter century since I've done any serious development
> for Mac software. Might take a day or two (assuming I succeed).

This worked for me a while ago (shell scripts and so on, using Homebrew):

https://github.com/jimeh/build-emacs-for-macos




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 14:19:01 GMT) Full text and rfc822 format available.

Message #71 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 10:18:01 -0400
On Wed, Sep 7, 2022 at 9:58 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> This worked for me a while ago (shell scripts and so on, using Homebrew):
>
> https://github.com/jimeh/build-emacs-for-macos

Awesome, thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Wed, 07 Sep 2022 18:02:01 GMT) Full text and rfc822 format available.

Message #74 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Wed, 7 Sep 2022 14:01:03 -0400
On Wed, Sep 7, 2022 at 9:58 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>
> On 22-09-07 15:48 , Bob Kline wrote:
> > On Wed, Sep 7, 2022 at 9:41 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> >> ...
> >> Any change you can build Emacs yourself, Bob?
> >
> > I'll give it a shot. I've built my own emacs on Linux, but it's been
> > more than a quarter century since I've done any serious development
> > for Mac software. Might take a day or two (assuming I succeed).
>
> This worked for me a while ago (shell scripts and so on, using Homebrew):
>
> https://github.com/jimeh/build-emacs-for-macos

I was able to build emacs using that tool. It does not exhibit the
unwanted behavior, which is both fortunate (I have an emacs without
the bug) and unfortunate (we didn't get the information we hoped would
help track down and eliminate the bug). The tool built version
29.0.50, so I suppose it's possible that the bug was in the emacs
code, not in Apple's software, and it got fixed. Or the bug was in
Apple's code, and the emacs developers came up (either intentionally
or inadvertently) with a workaround. But I'm wandering into territory
prohibited by the bug-reporting instructions (speculating about the
cause of a bug), so I'll stop. 😎




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 05:03:01 GMT) Full text and rfc822 format available.

Message #77 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 08 Sep 2022 07:02:01 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> I was able to build emacs using that tool. It does not exhibit the
> unwanted behavior, which is both fortunate (I have an emacs without
> the bug) and unfortunate (we didn't get the information we hoped would
> help track down and eliminate the bug). The tool built version
> 29.0.50, so I suppose it's possible that the bug was in the emacs
> code, not in Apple's software, and it got fixed. Or the bug was in
> Apple's code, and the emacs developers came up (either intentionally
> or inadvertently) with a workaround. But I'm wandering into territory
> prohibited by the bug-reporting instructions (speculating about the
> cause of a bug), so I'll stop. 😎

Hehe.

I think Po Lu will take over from here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 08:27:01 GMT) Full text and rfc822 format available.

Message #80 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org,
 Bob Kline <bkline <at> rksystems.com>
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 08 Sep 2022 16:25:48 +0800
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

>> I was able to build emacs using that tool. It does not exhibit the
>> unwanted behavior, which is both fortunate (I have an emacs without
>> the bug) and unfortunate (we didn't get the information we hoped would
>> help track down and eliminate the bug). The tool built version
>> 29.0.50, so I suppose it's possible that the bug was in the emacs
>> code, not in Apple's software, and it got fixed. Or the bug was in
>> Apple's code, and the emacs developers came up (either intentionally
>> or inadvertently) with a workaround. But I'm wandering into territory
>> prohibited by the bug-reporting instructions (speculating about the
>> cause of a bug), so I'll stop. 😎

Bob, could you please try using "git bisect" to determine which change
eliminated the unwanted warning?

Basically, we know that master is good, but emacs-28 exhibits the bug.
So you have to run the following commands in the Emacs repository, with
git installed:

  $ git bisect start
  $ git bisect bad emacs-28
  $ git bisect good master

Every time it asks you to try a different revision, run:

  $ make extraclean
  $ <however the tool builds emacs>

and then, after you test the resulting Emacs binary:

  $ git bisect bad

if the build does not exhibit the bug, or:

  $ git bisect good

if it does.

Hopefully, after repeating that procedure several times, the VCS will
tell you exactly which commit fixed the bug.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 13:05:01 GMT) Full text and rfc822 format available.

Message #83 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 8 Sep 2022 09:04:21 -0400
On Thu, Sep 8, 2022 at 4:25 AM Po Lu <luangruo <at> yahoo.com> wrote:
> ...
> Bob, could you please try using "git bisect" to determine which change
> eliminated the unwanted warning?
> ...

No version built with the tool we've been using displays the unwanted
warning (including emacs 28). On the other hand, "brew install
homebrew/cask-versions/emacs-nightly" gives me emacs-29.0.50 WITH the
warning. I did a little digging to try and find out which options were
used for building emacs, but didn't have any luck. I suppose I could
file a bug with the Homebrew folks. Anyone have any experience with
that? Is the Homebrew team as responsive as this one? 😉




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 13:20:01 GMT) Full text and rfc822 format available.

Message #86 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 08 Sep 2022 15:19:47 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Thu, Sep 8, 2022 at 4:25 AM Po Lu <luangruo <at> yahoo.com> wrote:
>> ...
>> Bob, could you please try using "git bisect" to determine which change
>> eliminated the unwanted warning?
>> ...
>
> No version built with the tool we've been using displays the unwanted
> warning (including emacs 28). On the other hand, "brew install
> homebrew/cask-versions/emacs-nightly" gives me emacs-29.0.50 WITH the
> warning. I did a little digging to try and find out which options were
> used for building emacs, but didn't have any luck. I suppose I could
> file a bug with the Homebrew folks. Anyone have any experience with
> that?

I don't.

The cask seems to come from emacsformacosx.com.  Don't know what that
is.  Maybe you could find something there?

> Is the Homebrew team as responsive as this one? 😉

Never ;-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 13:36:02 GMT) Full text and rfc822 format available.

Message #89 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 08 Sep 2022 21:35:11 +0800
Bob Kline <bkline <at> rksystems.com> writes:

> No version built with the tool we've been using displays the unwanted
> warning (including emacs 28). On the other hand, "brew install
> homebrew/cask-versions/emacs-nightly" gives me emacs-29.0.50 WITH the
> warning. I did a little digging to try and find out which options were
> used for building emacs, but didn't have any luck. I suppose I could
> file a bug with the Homebrew folks. Anyone have any experience with
> that? Is the Homebrew team as responsive as this one? 😉

Maybe it could be related to the version of Mac OS that the Emacs binary
was built on?

There are two knobs, MAC_OS_X_VERSION_MAX_ALLOWED and
MAC_OS_X_VERSION_MIN_REQUIRED, that change Emacs and operating system
behavior.  But I can never remember what they mean.  What if you build
Emacs with them defined to the same values that the Homebrew package was
built with?

I don't think you can obtain their values from binaries, so you will
probably have to ask the person who built the Homebrew package.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 13:56:02 GMT) Full text and rfc822 format available.

Message #92 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 57563 <at> debbugs.gnu.org, Bob Kline <bkline <at> rksystems.com>
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 08 Sep 2022 15:55:43 +0200
>>>>> On Thu, 08 Sep 2022 21:35:11 +0800, Po Lu <luangruo <at> yahoo.com> said:

    Po Lu> Bob Kline <bkline <at> rksystems.com> writes:
    >> No version built with the tool we've been using displays the unwanted
    >> warning (including emacs 28). On the other hand, "brew install
    >> homebrew/cask-versions/emacs-nightly" gives me emacs-29.0.50 WITH the
    >> warning. I did a little digging to try and find out which options were
    >> used for building emacs, but didn't have any luck. I suppose I could
    >> file a bug with the Homebrew folks. Anyone have any experience with
    >> that? Is the Homebrew team as responsive as this one? 😉

    Po Lu> Maybe it could be related to the version of Mac OS that the Emacs binary
    Po Lu> was built on?

    Po Lu> There are two knobs, MAC_OS_X_VERSION_MAX_ALLOWED and
    Po Lu> MAC_OS_X_VERSION_MIN_REQUIRED, that change Emacs and operating system
    Po Lu> behavior.  But I can never remember what they mean.  What if you build
    Po Lu> Emacs with them defined to the same values that the Homebrew package was
    Po Lu> built with?

emacssformacosx.com says they build on both macOS 10.10 and 10.14 and
then bundle those two version together. I canʼt find the actual
scripts used to produce the builds.
    
    Po Lu> I don't think you can obtain their values from binaries, so you will
    Po Lu> probably have to ask the person who built the Homebrew package.

Yes

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 14:03:01 GMT) Full text and rfc822 format available.

Message #95 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 8 Sep 2022 10:02:34 -0400
On Thu, Sep 8, 2022 at 9:35 AM Po Lu <luangruo <at> yahoo.com> wrote:
> ...
> I don't think you can obtain their values from binaries, so you will
> probably have to ask the person who built the Homebrew package.

I'm digging into https://github.com/caldwell/build-emacs (which has
the scripts used by https://emacsformacosx.com/ for building emacs).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 16:14:02 GMT) Full text and rfc822 format available.

Message #98 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 8 Sep 2022 12:12:57 -0400
On Thu, Sep 8, 2022 at 10:02 AM Bob Kline <bkline <at> rksystems.com> wrote:
> ...
> I'm digging into https://github.com/caldwell/build-emacs (which has
> the scripts used by https://emacsformacosx.com/ for building emacs).

Finally got emacs 28.1 built with that script. No spurious warning
displayed. I'm baffled, as I thought that this script was producing
the artifact which gets installed by "brew install --cask emacs." I
see no evidence that either of the MAC_OS_X_VERSION_... macros are
used by the build.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 08 Sep 2022 20:01:02 GMT) Full text and rfc822 format available.

Message #101 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 8 Sep 2022 16:00:01 -0400
On Thu, Sep 8, 2022 at 12:12 PM Bob Kline <bkline <at> rksystems.com> wrote:
> ... I'm baffled ...

I filed a ticket asking for the options used to build the artifacts
installed by homebrew.

https://github.com/caldwell/build-emacs/issues/123




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 09 Sep 2022 05:03:01 GMT) Full text and rfc822 format available.

Message #104 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 09 Sep 2022 07:02:27 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Thu, Sep 8, 2022 at 12:12 PM Bob Kline <bkline <at> rksystems.com> wrote:
>> ... I'm baffled ...
>
> I filed a ticket asking for the options used to build the artifacts
> installed by homebrew.
>
> https://github.com/caldwell/build-emacs/issues/123

Thanks.

I hope they'll tell how they codesign'ed their executable, and how to
change it to let a debugger attach.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 09 Sep 2022 08:56:02 GMT) Full text and rfc822 format available.

Message #107 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 57563 <at> debbugs.gnu.org,
 Bob Kline <bkline <at> rksystems.com>
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 09 Sep 2022 10:55:05 +0200
>>>>> On Fri, 09 Sep 2022 07:02:27 +0200, Gerd Möllmann <gerd.moellmann <at> gmail.com> said:

    Gerd> Bob Kline <bkline <at> rksystems.com> writes:
    >> On Thu, Sep 8, 2022 at 12:12 PM Bob Kline <bkline <at> rksystems.com> wrote:
    >>> ... I'm baffled ...
    >> 
    >> I filed a ticket asking for the options used to build the artifacts
    >> installed by homebrew.
    >> 
    >> https://github.com/caldwell/build-emacs/issues/123

    Gerd> Thanks.

    Gerd> I hope they'll tell how they codesign'ed their executable, and how to
    Gerd> change it to let a debugger attach.

I couldnʼt find MAC_OS_X_VERSION_MIN_REQUIRED or
MAC_OS_X_VERSION_MAX_ALLOWED in the homebrew building scripts, which
means theyʼre derived from
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityMacros.h,
which means they depends on what version of macOS they use to build.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Sun, 11 Sep 2022 11:14:02 GMT) Full text and rfc822 format available.

Message #110 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Sun, 11 Sep 2022 07:13:03 -0400
On Fri, Sep 9, 2022 at 1:02 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> I hope they'll tell how they codesign'ed their executable, and how to
> change it to let a debugger attach.

He didn't really know how to modify the program so that the debugger
could attach to it. He wrote

> It's possible that bypassing Gatekeeper (requires a reboot) might let it work.

But I tried that, without any success.

Oh, well. At least I know how to create an executable that behaves correctly.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 12 Sep 2022 05:59:02 GMT) Full text and rfc822 format available.

Message #113 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 12 Sep 2022 07:58:18 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Fri, Sep 9, 2022 at 1:02 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>> ...
>> I hope they'll tell how they codesign'ed their executable, and how to
>> change it to let a debugger attach.
>
> He didn't really know how to modify the program so that the debugger
> could attach to it. He wrote
>
>> It's possible that bypassing Gatekeeper (requires a reboot) might let it work.
>
> But I tried that, without any success.
>
> Oh, well. At least I know how to create an executable that behaves correctly.

Meanwhile, I also tried with codesign --remove-signature and with adding
entitlements with add_debug_entitlement.sh, which can be found on
github, and both of these "worked" but had no positive effect.  The
first one macOS doesn't like at all, the application cannot be started
anymore.  And the second one worked in the sense that the entitlements
were added, which can be seen with codesign -vdd --entitlements, but I
still couldn't debug Emacs.  I get to main, but then the application
mysteriously exits without me being able to see why.

So, as far as I'm concerned, I'm giving up.

Would it be okay with you when we declare this a problem of
other people, that is emacsformacosx.com, and close this bug?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 12 Sep 2022 11:12:01 GMT) Full text and rfc822 format available.

Message #116 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 12 Sep 2022 07:11:25 -0400
On Mon, Sep 12, 2022 at 1:58 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> So, as far as I'm concerned, I'm giving up.
>
> Would it be okay with you when we declare this a problem of
> other people, that is emacsformacosx.com, and close this bug?

Sure. Not a wasted effort, as we've captured a workaround. Thanks for
giving it a try.

Cheers,
Bob




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Mon, 12 Sep 2022 11:36:01 GMT) Full text and rfc822 format available.

Message #119 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Mon, 12 Sep 2022 13:35:18 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> On Mon, Sep 12, 2022 at 1:58 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>> ...
>> So, as far as I'm concerned, I'm giving up.
>>
>> Would it be okay with you when we declare this a problem of
>> other people, that is emacsformacosx.com, and close this bug?
>
> Sure. Not a wasted effort, as we've captured a workaround. Thanks for
> giving it a try.

Thanks.  I'll close this bug, then.




bug marked as fixed in version 29.1, send any further explanations to 57563 <at> debbugs.gnu.org and Bob Kline <bkline <at> rksystems.com> Request was from Gerd Möllmann <gerd.moellmann <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 12 Sep 2022 11:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Thu, 15 Sep 2022 13:34:02 GMT) Full text and rfc822 format available.

Message #124 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Thu, 15 Sep 2022 09:33:08 -0400
On Mon, Sep 12, 2022 at 7:35 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
> ...
> Thanks.  I'll close this bug, then.

Sounds good. One final note: I'm a bit embarrassed that I hadn't
noticed that the original bug report, which I linked at the top of
this one, included the stack trace that was requested in this ticket.
I still think closing this ticket is the right thing to do. I
reproduced the bug on a different Intel MacBook, which I had scrubbed
and on which the only third-party software I installed was Emacs from
https://emacsformacosx.com/.

That distribution of Emacs is built using three scripts:

* one to retrieve the source tar
* one to build the Emacs executables
* one to roll the executables into a single launcher

So what we know includes:

* the bug has only been reported for Intel-based Macs
* it can be reproduced on a pristine installation of Mac OS
* the launcher built with the third script decides which platform
version to launch
* the bug always happens on Intel using that Rust launcher
* it never happens running Emacs directly from the results of the second script

I'm going to guess (oops, here I am again disregarding the bug-filing
instructions) that the launcher is at least partially responsible for
the unwanted behavior. I'm not saying there can't be some subtle flaw
in the Emacs code on which the launcher has tripped, but it seems that
for now at least, the ball's in someone else's court.

https://github.com/caldwell/build-emacs/issues/123




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 16 Sep 2022 05:57:01 GMT) Full text and rfc822 format available.

Message #127 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 16 Sep 2022 07:56:22 +0200
Bob Kline <bkline <at> rksystems.com> writes:

> I'm going to guess (oops, here I am again disregarding the bug-filing
> instructions) that the launcher is at least partially responsible for
> the unwanted behavior. I'm not saying there can't be some subtle flaw
> in the Emacs code on which the launcher has tripped, but it seems that
> for now at least, the ball's in someone else's court.
>
> https://github.com/caldwell/build-emacs/issues/123

Thanks for the info, Bob.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 16 Sep 2022 13:18:01 GMT) Full text and rfc822 format available.

Message #130 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Robert Pluim <rpluim <at> gmail.com>,
 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 16 Sep 2022 09:16:48 -0400
On Fri, Sep 16, 2022 at 1:56 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>
> Bob Kline <bkline <at> rksystems.com> writes:
> ...
> > https://github.com/caldwell/build-emacs/issues/123
>
> Thanks for the info, Bob.

I got a quick response from the maintainer of the build scripts which
feed into emacsformacosx.com (which is where homebrew gets its
pre-built packages). He showed me how to figure out which Emacs
executable the launcher will choose and how to run that executable
directly, bypassing the launcher. I did so, and the bug still kicked
in. So as my mental picture of what's going on slowly comes into
better focus, what I think I'm seeing now is:

* the build script creates three binaries:
  - one for arm64 macOS 11
  - one for x86_64 macOS 10.11
  - one for x86_64 macOS 10.14
* the launcher narrows the candidates to those matching the computer's
architecture
* the launcher eliminates candidates built for a newer OS version than
the computer's
* the launcher chooses and runs the candidate built for the most
recent OS version
* when I run that Emacs (x86_64 macOS 10.14) on my x86_64 macOS 12 I see the bug
* when I run the build script on this machine I get Emacs built for
x86_64 macOS 12
* when I execute that Emacs on this machine I don't see the bug

So the launcher does not appear to be involved with the bug after all.
MacOS 12 appears to be happy running an Emacs (any version) built on
macOS 12, but unhappy running Emacs built on macOS 10.14. It seems
plausible that the reason the bug doesn't surface on arm64 is that
macOS 12 has no problems with an Emacs built on macOS 11, and the
launcher can find a macOS 11 Emacs for arm64 but not for x86_64. I
tried to set up a machine with macOS 10.14 or macOS 11 to see if the
bug showed up there, but it seems that Apple doesn't want users
installing older versions of macOS on their computers (Apple has
instructions [1] for downloading installers for those versions, but
when you follow the links you are taken to the Apple store where you
can click "Get" and watch the download progress to the end followed by
an error message saying that the installer was launched and failed,
and instead of dropping the launcher into the file system so you can
put it on some removable media the download is nowhere to be found, as
far as I could see).

I'll leave it up to you whether or not the bug should be reopened. As
noted in an earlier comment, we do have the requested stack trace [2].
I'm perfectly willing to supply any other information I can provide,
or attempt any further experiments, but I do have an Emacs without the
bug, so I'm happy (or as happy as I'll be with an unsolved mystery).
😂

[1] https://support.apple.com/en-gb/HT211683
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53481#5




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 16 Sep 2022 13:27:02 GMT) Full text and rfc822 format available.

Message #133 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 16 Sep 2022 21:26:07 +0800
Bob Kline <bkline <at> rksystems.com> writes:

> So the launcher does not appear to be involved with the bug after all.
> MacOS 12 appears to be happy running an Emacs (any version) built on
> macOS 12, but unhappy running Emacs built on macOS 10.14. It seems
> plausible that the reason the bug doesn't surface on arm64 is that
> macOS 12 has no problems with an Emacs built on macOS 11, and the
> launcher can find a macOS 11 Emacs for arm64 but not for x86_64. I
> tried to set up a machine with macOS 10.14 or macOS 11 to see if the
> bug showed up there, but it seems that Apple doesn't want users
> installing older versions of macOS on their computers (Apple has
> instructions [1] for downloading installers for those versions, but
> when you follow the links you are taken to the Apple store where you
> can click "Get" and watch the download progress to the end followed by
> an error message saying that the installer was launched and failed,
> and instead of dropping the launcher into the file system so you can
> put it on some removable media the download is nowhere to be found, as
> far as I could see).

I guess that means we do something different when the min version macro
is set to 10.14 or earlier.  Or maybe if the max version macro is set to
10.14 or later - is Mac OS 12 newer than OS X 10.12, or are both of
these the same?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 16 Sep 2022 13:42:02 GMT) Full text and rfc822 format available.

Message #136 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 16 Sep 2022 09:41:38 -0400
On Fri, Sep 16, 2022 at 9:26 AM Po Lu <luangruo <at> yahoo.com> wrote:
> ... is Mac OS 12 newer than OS X 10.12, or are both of
> these the same?

The current version of macOS is 12.6 (macOS Monterey), released last
Fall, whereas macOS 10.12 is macOS Sierra, released in September 2016.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53481#5




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Fri, 16 Sep 2022 14:34:02 GMT) Full text and rfc822 format available.

Message #139 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Bob Kline <bkline <at> rksystems.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Fri, 16 Sep 2022 10:33:14 -0400
On Fri, Sep 16, 2022 at 9:41 AM Bob Kline <bkline <at> rksystems.com> wrote:
> ...
> The current version of macOS is 12.6 (macOS Monterey), released last
> Fall, whereas macOS 10.12 is macOS Sierra, released in September 2016.
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53481#5

Oops, sorry, I had the wrong URL in my clipboard and didn't notice. It
should have been:

https://support.apple.com/en-us/HT201260

Basically, "OS X" and "macOS" do not represent different version
numbering series. They're just different prefix names applied by Apple
to the one version numbering series used over the past couple of
decades or so. See the "Is there any difference between Mac OS X and
macOS?" paragraph near the top of
https://setapp.com/how-to/full-list-of-all-macos-versions.

Apologies for the confusion. (And I'm sure Apple offers the same apology.) 😉




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57563; Package emacs. (Sat, 17 Sep 2022 01:58:02 GMT) Full text and rfc822 format available.

Message #142 received at 57563 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Bob Kline <bkline <at> rksystems.com>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 Robert Pluim <rpluim <at> gmail.com>, 57563 <at> debbugs.gnu.org
Subject: Re: bug#57563: 28.1; macOS - layout warning at startup
Date: Sat, 17 Sep 2022 09:57:26 +0800
Bob Kline <bkline <at> rksystems.com> writes:

> Oops, sorry, I had the wrong URL in my clipboard and didn't notice. It
> should have been:
>
> https://support.apple.com/en-us/HT201260
>
> Basically, "OS X" and "macOS" do not represent different version
> numbering series. They're just different prefix names applied by Apple
> to the one version numbering series used over the past couple of
> decades or so. See the "Is there any difference between Mac OS X and
> macOS?" paragraph near the top of
> https://setapp.com/how-to/full-list-of-all-macos-versions.
>
> Apologies for the confusion. (And I'm sure Apple offers the same apology.) 😉

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Oct 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.