From unknown Thu Sep 11 15:11:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54677 <54677@debbugs.gnu.org> To: bug#54677 <54677@debbugs.gnu.org> Subject: Status: Creating core files on macOS (Monterey) Reply-To: bug#54677 <54677@debbugs.gnu.org> Date: Thu, 11 Sep 2025 22:11:13 +0000 retitle 54677 Creating core files on macOS (Monterey) reassign 54677 emacs submitter 54677 Perry Smith severity 54677 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 21:30:11 2022 Received: (at submit) by debbugs.gnu.org; 2 Apr 2022 01:30:11 +0000 Received: from localhost ([127.0.0.1]:44016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naSah-00074q-0V for submit@debbugs.gnu.org; Fri, 01 Apr 2022 21:30:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:36094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naR6f-0004OY-Qd for submit@debbugs.gnu.org; Fri, 01 Apr 2022 19:55:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naR6f-000324-DR for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:55:05 -0400 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:50997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naR6d-0006FB-Do for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:55:05 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5C1CE1213C7 for ; Fri, 1 Apr 2022 23:54:58 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id C47231214DE for ; Fri, 1 Apr 2022 23:54:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1648857297; a=rsa-sha256; cv=none; b=SCjMMaFJRBI+T7cCps8iQ6d1W9n0cDZveXDB5MOxeZzj3nkTD9TJl+/LsMoRqKzmgU5Nb7 zzZMTEdDkllwB9GGy1ITJrT/aMBmVyrPRbfX1YCAYX9IrJA2/urxHSGwvcw9XGSBTH9f7u e7lT9bs/6Ve94pspwO+9PLGaExqavFM69mZKsngZ7eXxAKANVVxxtW1Owahh+DsoV8vH++ i+RCNCUc150eyhphxqBEH0mtX8OgPYIQTxaIHy9j58Flsh3K0txUgAfBeTKjwc+2zHai6L tknE3G6wcm4ywVUxNlT5X5tmz6zu6a/+d8lBzPinHHUrtVdk1OcCICH6J7LN4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1648857297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=poqmwDb5W1NY1Vx3bgJITbGgJqJYSFUwl7E2KCUSGyI=; b=HQUX1LSVFCeiwSx/WvgCv2zLWkRm4noPP+uPzZZL9fhJFAUYZN/pBtwoY8SaioFDevFbtp 7AVy1Qq1ZHKXsIrVMZlFaRnomYdgBL2mGBgUTdx4rwLSW4fQqNVS4CmFicDfGcMXWJRdMy d26PDDNoNFoEGQY4Qu8zmPICRNqMx3zEFQgTC7UtHdeRXtoHzJwHbumarxiJwSCLZHIdAK tIHFkpRm7Oulz4DbPCP66UudohG39Ttm9BXoKkcxQkHGIx3ITceyC4Ml7rNfuLMHk6LCL2 DQDGaCS+hMo5EBnPrWkOHNHfMSDrrlO98lR4xo6oYO7WSOBfw90KksR1k3iSZQ== ARC-Authentication-Results: i=1; rspamd-786f77c8d-9vgs5; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.124.238.97 (trex/6.7.1); Fri, 01 Apr 2022 23:54:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Attack-Share: 0e49e1e056a62563_1648857298128_3463995116 X-MC-Loop-Signature: 1648857298128:1546667119 X-MC-Ingress-Time: 1648857298128 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZutN2jPg2/XHRPm/qrlae5YEOMWkAMS6l8Au4ZtkLSI=; b=HySduRHxqF5t8iF0iMUoVSkX1L 7G0/JUtgiswQOcdtAyuXMnQPfe9tMxZn7HuqgCRD0p78BkZPePHc+2PPKY+Y6ef76STsynG/Ypv/8 oLipGLHaPrtV9oiDwBXfOMBaRstjKpbvCZQj+WNju7R5d/mE5vhytB/7K+bEuKJXwlxBl89EdCclk SuUxhH3Tm3pHztZnZXmm696WX7Zkf3OuauDZUjFOMSs4oq/l4nOjVoi9AMlFHyMEr0Fgf6RLkCyVy BXEUEu2Ru8MgMkKOHjiJXcy/Rp7xiteAYWl/2a3bQLl84rC1NJf7+khJGapIYsZSU7yZOWkCVxDad 4Llbev2Q==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:50284 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1naR6W-0000jM-TN for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 19:54:56 -0400 From: Perry Smith Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Creating core files on macOS (Monterey) Message-Id: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@easesoftware.com> Date: Fri, 1 Apr 2022 18:54:56 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3696.80.82.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com Received-SPF: pass client-ip=23.83.212.17; envelope-from=pedz@easesoftware.com; helo=bird.elm.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Apr 2022 21:30:10 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) The CONTRIBUTE document says to submit feature requests, etc to this list. I wish I could provide more expertise on this topic but I=E2=80=99m not = a serious macOS developer. I've cobbled together the info below over the past few days. Apple (like AIX) has decided that core files are bad and so has disabled them in the normal activities. So, a few things need to be done to get a core file from a particular applicaiton. Another Apple trait seems to be that if they did it yesterday, it must be changed for today. Thus, what follows is ONLY for Monterey (I've been told). The previous Apple releases require some but not all of these changes. AND... it appears that what is required for the M1 chips (Arm / Apple silicon) is not the same as what is required for Intel chips. So... I know that without these changes core dumps on Monterey with an M1 chip were not created and after these changes they are. As I mentioned in an email on the developers list, making emacs remains a drop dead easy process where ./configure ; make ; make install creates nextstep/Emacs.app ls -ld@ nextstep/Emacs.app shows: drwxr-xr-x@ 3 pedz staff 96 Apr 1 18:08 nextstep/Emacs.app com.apple.quarantine 57=20 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 The app can then be moved to /Applications and it will launch via Finder, etc but will not create a core file. 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 <=20 --- > #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_CORE) && !defined = (CYGWIN) > if (getrlimit (RLIMIT_CORE, &rlim) =3D=3D 0 > && 0 <=3D rlim.rlim_cur && rlim.rlim_cur <=3D rlim.rlim_max) > { > rlim.rlim_cur =3D rlim.rlim_max; > setrlimit (RLIMIT_CORE, &rlim); /* Error??? */ > } =20 > #endif /* HAVE_SETRLIMIT and RLIMIT_CORE and not CYGWIN */ > =20 The second I accomplished with this small script: #!/bin/zsh EMACS=3D/Applications/Emacs.app if [[ -d nextstep/Emacs.app ]] ; then sudo rm -rf ${EMACS} sudo mv nextstep/Emacs.app ${EMACS} rm -f /tmp/entitlements /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow = bool true" /tmp/entitlements sudo codesign -s - -f --deep --entitlements tmp.entitlements ${EMACS} else echo nextstep/Emacs.app is not present fi The PlistBuddy command will spew out a message: File Doesn't Exist, Will Create: /tmp/entitlements From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 10:16:43 2022 Received: (at 54677) by debbugs.gnu.org; 2 Apr 2022 14:16:43 +0000 Received: from localhost ([127.0.0.1]:46368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeYV-0001ZF-7b for submit@debbugs.gnu.org; Sat, 02 Apr 2022 10:16:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeYT-0001Tf-EE for 54677@debbugs.gnu.org; Sat, 02 Apr 2022 10:16:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GctQ+b5UOPtFh7mmvJIPZN/tKYmFAOy+F4DrJkV+G0M=; b=rKX8/5/U9zLnH5b54HqcpCQIYj XWw6WCSTectVcDheUCoASknuDcVtecgVc6ho5Uf3DqSSB1fG3L2CXYZjDfwhW8GGEvhbgWkMk19C6 junasn+ScSKa3o1kedRSkc9QaJdtzsLb+gDEAR1A0d9GNfQryKdfiorFDEdFdiaBvfhU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naeYK-0006SZ-2m; Sat, 02 Apr 2022 16:16:34 +0200 From: Lars Ingebrigtsen To: Perry Smith Subject: Re: bug#54677: Creating core files on macOS (Monterey) References: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@easesoftware.com> X-Now-Playing: Pet Shop Boys's _Actually_: "It's a sin" Date: Sat, 02 Apr 2022 16:16:31 +0200 In-Reply-To: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@easesoftware.com> (Perry Smith's message of "Fri, 1 Apr 2022 18:54:56 -0500") Message-ID: <87fsmvk1ts.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Perry Smith 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). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54677 Cc: Alan Third , 54677@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Perry Smith 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). > 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? 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 14:08:40 2022 Received: (at 54677) by debbugs.gnu.org; 2 Apr 2022 18:08:40 +0000 Received: from localhost ([127.0.0.1]:46825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naiAt-000474-Rl for submit@debbugs.gnu.org; Sat, 02 Apr 2022 14:08:39 -0400 Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:16704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nagVa-0001QM-Pg for 54677@debbugs.gnu.org; Sat, 02 Apr 2022 12:21:51 -0400 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9915C8E0BB7; Sat, 2 Apr 2022 16:21:49 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 52C2B8E0A24; Sat, 2 Apr 2022 16:21:47 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1648916508; a=rsa-sha256; cv=none; b=JWoCBKp9jicpDeeTXxS5q4TOhLL+LCkqp0t2/sTsW4f7dotcSO4/nw/+QiF44NLOPYzJ6y lyDSCi5GUXdMne90dnNeRgngh9xo4SW5vzNze5sqVSdD6oYeULovHL9sgs+UFVvQzrdGu7 fIevsNWI/Hx/Cnqo3FW/abe7Z7BC0HPQHowTekxMiyXuIIsFqQhZTN/hvBhk2/Vtzu6mmO oQM9WXr3codcr5HWj1qlKOuTlPYf9FuYHZth0okBDYaO49NAeYpJJTfnREgzYf2PCuy3sM XRiD1/vlbQINV3DoCcoLPx5bEc45/z2Zi1FF7fsSFkosDWkNZmwYxtKBOzvfGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1648916508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Jtg+LZNEsCaBbNJcATABUPqe4wmozm5qSeNVpMGCs9Q=; b=eMi8wTyWs74A7BC6pHhNUJi+YviIz8PEHiom98Wsh81EedKbxu3kxemaxzyRVuezK4vkan /iCVG88ztMY3DJQbJ5V44muNBODNaydEh/TuJs6t6HywqgdEKOPyKFiwtRkRoZ2HZLawao WCguQrv41R1ArM6a0D2V90EkTOOpDwXVFJZOuuh0c8WiuvsUnNCZ5Z/HEMslz3sQ87Wnu9 fauviIKqRA6jiAjixbPYUacaiJkxIvIEE4+ONz1XJf2IxfBQJ1pZZwvgis/4HgG+gwfOdd eGQ9fcubAjJ+2a7hlRLxf4YJ+VezTFXE1JUbs7kTSfj6TAPi734kBHZa1JLcYg== ARC-Authentication-Results: i=1; rspamd-f76767c84-zwsf6; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.125.123.15 (trex/6.7.1); Sat, 02 Apr 2022 16:21:49 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Spot-Attack: 7b8e007f32fc47f4_1648916509183_3952248878 X-MC-Loop-Signature: 1648916509183:1655621942 X-MC-Ingress-Time: 1648916509182 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Jtg+LZNEsCaBbNJcATABUPqe4wmozm5qSeNVpMGCs9Q=; b=bz8/dR6lks5CANDVbuL360w7Di b2nDuWHo8wt56mTqPjFmPCrz0egNGrJdz5HrxkcdXbYBMkFIcc7E7NVwqrcu5lnlb1JkWTjF6v89N 9CRk5cLu2qYLk5V6x15fQlTo4OypBdgFMgbV40gQ81OT5Qr/CHzTgsDXSBYbQnNAfLU+mfuC/W9Hq rXFdfQVg/whndquKMpxRufdPQPoMBby13BI8/mD/x07oB3HgfKKrhNYe3uuArX4Qi1Bbsfcbs5Okz YGN8YQmwuWedGuO7zwhWPPImaJGi5g6gCa5QLVdMQafWzGV3HpNIViSVZB5Ogd3YDGCc0oxt3r9r3 BnYIZpfA==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:51731 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nagVW-0005uc-Df; Sat, 02 Apr 2022 12:21:46 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: bug#54677: Creating core files on macOS (Monterey) From: Perry Smith In-Reply-To: <87fsmvk1ts.fsf@gnus.org> Date: Sat, 2 Apr 2022 11:21:45 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <789AF46F-ED6B-4D29-9699-A5B97206CECA@easesoftware.com> References: <1DAC996D-BBF6-4E3E-A0FB-EBD05CC9AFD2@easesoftware.com> <87fsmvk1ts.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3696.80.82.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54677 X-Mailman-Approved-At: Sat, 02 Apr 2022 14:08:35 -0400 Cc: Alan Third , 54677@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Apr 2, 2022, at 09:16, Lars Ingebrigtsen wrote: >=20 > Perry Smith writes: >=20 >> As I mentioned in an email on the developers list, making emacs >> remains a drop dead easy process where >>=20 >> ./configure ; make ; make install >=20 > 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=E2=80=99t that I=E2=80=99m = =E2=80=9Cworking=E2=80=9D on Emacs but using it and it goes Boom=E2=80=A6 = I=E2=80=99d like a core file. >=20 >> To get the Emacs.app to launch, the quarantine needs to be removed = and >> that is done with: >>=20 >> sudo xattr -rds com.apple.quarantine nextstep/Emacs.app >=20 > And then you don't have to do this, for instance. >=20 >> 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. >>=20 >> The first I accomplished with this code change: >>=20 >> diff -r emacs-orig-27.2/src/emacs.c emacs-new-27.2/src/emacs.c >> 1226c1226,1234 >> <=20 >> --- >>> #if defined (HAVE_SETRLIMIT) && defined (RLIMIT_CORE) && !defined = (CYGWIN) >>> if (getrlimit (RLIMIT_CORE, &rlim) =3D=3D 0 >>> && 0 <=3D rlim.rlim_cur && rlim.rlim_cur <=3D rlim.rlim_max) >>> { >>> rlim.rlim_cur =3D rlim.rlim_max; >>> setrlimit (RLIMIT_CORE, &rlim); /* Error??? */ >>> } =20 >>> #endif /* HAVE_SETRLIMIT and RLIMIT_CORE and not CYGWIN */ >=20 > Is this necessary when you're not running installed? If you do =E2=80=9Culimit -c unlimited=E2=80=9D from the shell before = running src/emacs, then no, you don=E2=80=99t 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. >=20 > I've added Alan to the CCs; perhaps he has some comments. >=20 > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no