GNU bug report logs - #54677
Creating core files on macOS (Monterey)

Previous Next

Package: emacs;

Reported by: Perry Smith <pedz <at> easesoftware.com>

Date: Sat, 2 Apr 2022 01:31:02 UTC

Severity: normal

Full log


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

From: Perry Smith <pedz <at> easesoftware.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Alan Third <alan <at> idiocy.org>, 54677 <at> debbugs.gnu.org
Subject: Re: bug#54677: Creating core files on macOS (Monterey)
Date: Sat, 2 Apr 2022 11:21:45 -0500
> On Apr 2, 2022, at 09:16, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> 
> Perry Smith <pedz <at> easesoftware.com> writes:
> 
>> As I mentioned in an email on the developers list, making emacs
>> remains a drop dead easy process where
>> 
>> ./configure ; make ; make install
> 
> Note that you don't have to say "make install" -- you can just run it
> from src/emacs in the build directory (and that's usually a lot more
> convenient when building things yourself).

Well sorta but not really.  I can say command-space Emacs and Finder will find and launch Emacs if it is an application that is in /Applications or your local ~/Applications.

If I have things set up right, I can double click foo.txt will launch Emacs with it editing foo.txt

Also, generally, my core dumps come unexpectedly.  That is the reason for this whole endeavor.  It isn’t that I’m “working” on Emacs but using it and it goes Boom… I’d like a core file.

> 
>> To get the Emacs.app to launch, the quarantine needs to be removed and
>> that is done with:
>> 
>> sudo xattr -rds com.apple.quarantine nextstep/Emacs.app
> 
> And then you don't have to do this, for instance.
> 
>> To get an application to create a core file two particular things need
>> to be done.  The resource limit for core files needs to be set to the
>> max.  And an entitlement needs to be applied to the application.
>> 
>> The first I accomplished with this code change:
>> 
>> diff -r emacs-orig-27.2/src/emacs.c emacs-new-27.2/src/emacs.c
>> 1226c1226,1234
>> < 
>> ---
>>> #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_CORE) && !defined (CYGWIN)
>>>  if (getrlimit (RLIMIT_CORE, &rlim) == 0
>>>      && 0 <= rlim.rlim_cur && rlim.rlim_cur <= rlim.rlim_max)
>>>    {
>>>      rlim.rlim_cur = rlim.rlim_max;
>>>      setrlimit (RLIMIT_CORE, &rlim); /* Error??? */
>>>    }  
>>> #endif /* HAVE_SETRLIMIT and RLIMIT_CORE and not CYGWIN */
> 
> Is this necessary when you're not running installed?

If you do “ulimit -c unlimited” from the shell before running src/emacs, then no, you don’t need to do this step.  But, somewhere somehow, the limit on core files needs to be raised or you will not get a core file.

> 
> I've added Alan to the CCs; perhaps he has some comments.
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>   bloggy blog: http://lars.ingebrigtsen.no





This bug report was last modified 3 years and 163 days ago.

Previous Next


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