From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70246: 30.0.50; Update INSTALL for native compilation Date: Sun, 07 Apr 2024 13:48:41 +0200 Message-ID: <87r0fhpf52.fsf@gmx.net> References: <87plv29pro.fsf@gmx.net> <86il0t1z96.fsf@gnu.org> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31139"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70246@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 07 13:50:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rtR2J-0007sw-Lz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Apr 2024 13:50:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtR28-00041P-At; Sun, 07 Apr 2024 07:50:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtR24-0003vL-AT for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 07:49:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtR24-00017W-1o for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 07:49:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtR2A-0001ck-PQ for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 07:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Apr 2024 11:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70246 X-GNU-PR-Package: emacs Original-Received: via spool by 70246-submit@debbugs.gnu.org id=B70246.17124905445827 (code B ref 70246); Sun, 07 Apr 2024 11:50:02 +0000 Original-Received: (at 70246) by debbugs.gnu.org; 7 Apr 2024 11:49:04 +0000 Original-Received: from localhost ([127.0.0.1]:41726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtR17-0001Ui-FL for submit@debbugs.gnu.org; Sun, 07 Apr 2024 07:49:03 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:58079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtR15-0001Tu-A1 for 70246@debbugs.gnu.org; Sun, 07 Apr 2024 07:48:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1712490522; x=1713095322; i=stephen.berman@gmx.net; bh=RQ2FKJ86Fh0025MjIvq1LZVTl5tpPkwpZGX3oXdrdKs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=GNOmcl4nT0vu3iHRwhQu3t6ySuPnd81g3Xquj38mhpKye1R7lRUiZr0u6S/PUbdm FjRBCEg1LLiW7qK+qE4M/rBTCGvkT5ZewbXDOoTkTEdQeFctyAzgvcAUjnYqW7xkX 23xe4jvIr/e3xgOUe/y/n+CFl57/7cU98ou4VtBI8XgYtNYoFK6bSiLJfUqejUD1P qHxtQBwZKkIlhkS4OLUvEV4Z5DT6jjW9wYfK43YrddIQFtFDCLqWiz6Q3jDfROz21 6FluCwIti7efXSHqraiMq56Sn+v33bpJKB/rvk7F86TSrP7Y9oZxyVDpDSP3jM/IE rJN5FqAOsjAu9HhMow== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.95.232]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N2mBQ-1swIDO0d9Y-0135uI; Sun, 07 Apr 2024 13:48:42 +0200 In-Reply-To: <86il0t1z96.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 Apr 2024 09:08:05 +0300") X-Provags-ID: V03:K1:P83T+p4q8Te7kM9ZBywkRCQXi6w4vQDfRk5Q+emIm8X9nberckA 2/ew+Bin+dzv0hkt/eQmkBbnC4bh3rSK9TEp+TskRVckzzZHZejjpWAAWeNN+2aq0XFui0q lyhMoRmFEFioO8skVSI0upgrlYUtXi0dpo8IR8HF7M+r426syhGlUc9kiVRhfZZLqa5+znG F/MndDubkYFA5eQ5bUPuw== UI-OutboundReport: notjunk:1;M01:P0:xS6/bGZ3ipg=;ZOKePuO7cpLe+43VIibTas/Unrs fcF1slpYI74VR0QTPDRY9VycGRg97a3GH6CWBM4KHCeMfYvGC4npcoNUbakzZYe7cZS/SZDm7 kYi6f+f+BQErBRuJRYmRtXgGPl/9rulK7SF7LAtNd0j4gAunZuN0XTj02nmh6uC9gYz/wLupi Qq4K/IiEiSZ5CvslZlYGAIfi4PVK2wEdA1MCgeruaNR/1BfDeoowQdkC1UUjQqWWiwlUArXMW AwomL4cqvpytmsGekvSA6M94y4ahicuKVnWKhzUupkZ+QiA5L7A1J3x2T0qXPFx39eiKmg3ZP LW3h0PfLnNEDVznRusCR58xryCB/yXNluTTcxFdgVKq2H/7Ez0BrOqCNX8txL0/wao+Bfl4eL vrAlv4NCEF1cRUm2/yfgQ8CFQpCMdsMiahLXskvNGfSPqW2eHSCrXOgPvd6/PN+i4e0sKzNls GDSRf2zeiQH/0f0qMBCcu8WWs+uAmiSWGlbQLA1eO+xsx9RPHsRFemB88nguL7VRR+WA6P5Jf nsN7Y33Ua9H3/xPKBXWvLtSSs5B4e53dY63+vmq+FCPJiGG10Pp+gwjgMzgT85IZDa+I72pO6 ovqhcZNMcIeEgw92HqDnhCZgeyAQTxJopi/29RQf4Od7GqgqF26HXT6Y7BZTl3Pr8TXynArJA GIFZEb9UoozvWg5OcJ22zGy5pY1xaSsjqpjRp14y9hvzU7yUQnWPxgLy2UTLmTX2WLtnTuhiV J6MaeIPeU0XDlMm2bCu1ZIpjbNYqURO8IlkG1uG6IM2YU9zZMceOASSkOr2Z2O02zsK6d0aH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282865 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 07 Apr 2024 09:08:05 +0300 Eli Zaretskii wrote: >> Date: Sat, 06 Apr 2024 22:53:31 +0200 >> From: Stephen Berman via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> The INSTALL file in the Emacs sources makes no reference to native >> compilation. The attached patch is an attempt to fill this gap (but I'= m >> not sure about the default locations of installed natively compiled Lis= p >> files, since I do not install Emacs when I build and do not have a >> distribution installation of Emacs built with native compilation to >> check). > > Thanks. This LGTM, except the changes to item 6: there, I would only > mention the possibility of building out of the source tree. Whether > running uninstalled is possible in this case depends where is the > build tree relative to the source tree, so I'd rather not describe all > the gory details there because they are too complex to explain (what > you wrote is inaccurate); There was a mistake at the end of 6b; what I meant to write is "but the ../lib-src and ../native-lisp directories in the build directory (because the compiled files in these directories are machine-dependent)." If there were any other inaccuracies in what I wrote, can you please point them out to me (for my own edification)? > I'd just say that running uninstalled is > fully supported only when Emacs is built in the source tree. So instead of having 6{a,b,c} as in my patch, are the following additions to the current version (at the end of the first paragraph of 6) ok? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D , ../native-lisp (if built with support for native compilation). If you build Emacs in a directory separate from the source directory ("out-of-tree"), run 'make' in the build directory. Then you can execute the 'src/emacs' file under that directory "in place". However, running Emacs uninstalled is fully supported only when it is built in the source tree. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D But, again for my own edification, can you elaborate what "fully supported" means here? I've been running Emacs uninstalled from a build directory outside of the source tree for many years, and that statement suggests my builds are deficient (though perhaps only in unobvious ways that are not crucial for using Emacs), and if so, I'd like to know how and why. >> +'/usr/local/share/emacs/VERSION/native-lisp' holds the natively compil= ed >> + pre-loaded Emacs Lisp files. > > This is incorrect: native-lisp is installed under /usr/lib/emacs/VERSION= , > not under /usr/share/emacs/VERSION. I guess you meant /usr/local/lib/emacs/VERSION for the default location? The above changes are in the attached patch (which also corrects two typos in my previous patch in the first paragraph under the heading "Native compilation of Lisp files"). Steve Berman --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: INSTALL patch Content-Transfer-Encoding: quoted-printable diff --git a/INSTALL b/INSTALL index 2aaa02f37d7..edc7f0699e2 100644 =2D-- a/INSTALL +++ b/INSTALL @@ -264,6 +264,25 @@ to force GTK+ to run under Broadway, start Emacs like= this: The GNUstep build also supports the Wayland window system. If that is what you want, see nextstep/INSTALL. +* Native compilation of Lisp files + +In addition to byte-compiling files of Lisp code, Emacs can also produce +"native code", which usually runs several times faster than the +corresponding byte-compiled code. To build Emacs with this feature, +your system must have not only GCC (the C compiler) and Binutils (the +assembler and linker) but also the 'libgccjit' shared library, which is +part of the GCC distribution. If these components are available, +building Emacs will automatically produce natively compiled Lisp code. + +By default, Emacs natively compiles only pre-loaded Lisp files during +the build process; other Lisp files are natively compiled +"just-in-time", i.e, when they are loaded in the running Emacs. If you +want Emacs to natively compile all Lisp files during the build ("ahead +of time"), use the 'configure' option '--with-native-compilation=3Daot'. +If you do not want natively compiled Lisp code even if your system +satisfies the build requirements, use the 'configure' option +'--with-native-compilation=3Dno'. + DETAILED BUILDING AND INSTALLATION: (This is for a Unix or Unix-like system. For GNUstep and macOS, @@ -553,10 +572,17 @@ need to create them if you have nothing to put in th= em. wish to add to various termcap entries. (This is unlikely to be necessar= y.) 6) Run 'make' in the top directory of the Emacs distribution to finish -building Emacs in the standard way. The final executable file is -named 'src/emacs'. You can execute this file "in place" without -copying it, if you wish; then it automatically uses the sibling -directories ../lisp, ../lib-src, ../info. +building Emacs in the standard way. The final executable file is named +'src/emacs'. You can execute this file "in place" without copying it, +if you wish; then it automatically uses the sibling directories ../lisp, +../lib-src, ../info, ../native-lisp (if built with support for native +compilation). + +If you build Emacs in a directory separate from the source directory +("out-of-tree"), run 'make' in the build directory. Then you can +execute the 'src/emacs' file under that directory "in place". However, +running Emacs uninstalled is fully supported only when it is built in +the source tree. Or you can "install" the executable and the other files into their installed locations, with 'make install'. By default, Emacs's files @@ -574,6 +600,11 @@ are installed in the following directories: at the same time; in particular, you don't have to make Emacs unavailable while installing a new version. +'/usr/local/lib/emacs/VERSION/native-lisp' holds the natively compiled + pre-loaded Emacs Lisp files. + +'~/.emacs.d/eln-cache/' holds the remaining natively compiled Lisp files. + '/usr/local/share/emacs/VERSION/etc' holds the Emacs tutorial, the DOC file, and other architecture-independent files Emacs might need while running. --=-=-=--