help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resources for an old newbie ?


From: David Masterson
Subject: Re: Resources for an old newbie ?
Date: Sun, 04 Jun 2023 00:26:54 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Masterson <dsmasterson@gmail.com>
>> Date: Sat, 03 Jun 2023 18:00:30 -0700
>> 
>> > # 1. setup directories
>> > src_dir=~/src
>> > emacs_dir=${src_dir}/emacs
>> > mkdir -p $emacs_dir
>> >
>> > # 2. get dependencies
>> > sudo apt-get -qq update
>> > sudo apt-get install build-essential debian-goodies libgccjit-10-dev
>> > sudo apt-get build-dep emacs
>> 
>> This pulled in a *LOT* of stuff.
>> 
>> > # 3. get source
>> > cd $src_dir
>> > git clone https://git.savannah.gnu.org/git/emacs.git
>> >
>> > # 4. refresh source/upgrade
>> > cd $emacs_dir
>> > git fetch
>> > git merge
>> 
>> I modified this to 'git pull' as previously suggested.  There was
>> nothing to pull.
>> 
>> > # 5. compile and install
>> > autogen.sh
>> > configure --with-x-toolkit=no --with-native-compilation
>> > make
>> > sudo make install
>> 
>> Gave this a try.  Still having problems:
>
> Is this about concise and comprehensive instructions for how to build
> Emacs?  In such cases, I've many times found the "Linux from scratch!"
> site very useful.  In this case, read here:
>
>   https://www.linuxfromscratch.org/blfs/view/svn/postlfs/emacs.html

Useful, but for Emacs 28.2.  The script I followed above got me
30.0.50.  I may rethink being bleeding edge.

Your URL link (sort of) assumes a GTK rather than Lucid X-toolkit.  The
above script seems to assume no-toolkit.  I'm still figuring out what
the limits of that are.

> This lists all the dependencies, both mandatory and optional.  Each
> dependency is a link to another page, which describes how to build it
> (if you don't have it installed already, and cannot download a
> pre-built package).  If you want to decide which optional dependency
> you want, read the file INSTALL in the Emacs source tree, it gives
> that information.

Yeah, but it gets you into dependency hell as you follow the tree of
dependencies down.  I wasn't confident enough to do this for 27.1 a year
or two ago, so I waited for Debian to release it as a package.  I've
learned a little bit about snap/flatpak/guix since then and thought I
might go that way for v28.2.

The "build-dep" step above looked like a good compromise to let me load
up Debian approved dependent libraries and source build Emacs itself.

>> 3. The GNUMakefile in the Emacs distribution seems to rerun configure
>> with no options, so your "configure" is NO-OP.
>
> That's incorrect.  I guess you've misread GNUMakefile.  In reality, if
> you have run the configure script, GNUMakefile redirects to the
> top-level Makefile, and that obeys the configure-time options.

Good point. Configure looked like it worked, but it didn't produce a
Makefile (and I didn't pay attention to that).  Therefore, when I did a
make, it saw (via GNUMakefile) configure, but no Makefile and, so, ran
configure and then used the generated Makefile.  I'm not sure why my
configure didn't build a Makefile.

I now note that it would've also run autogen.sh if configure didn't
exist, thus doing all the work to setup a freshly retrieved set of
sources.  A nice way to hide extra steps as long as autogen.sh and
configure guess the right setup.

>> 4. You can add arguments to the configure in the make step by passing
>> 'configure="--ARG1..."' to make.
>
> True.  Type "./configure --help" for the full story.
>
>> 7. Probably should've tee'd the output of make to a log file... :(
>
> Or run the commands inside Emacs's shell mode.

This is probably the reason I messed up on #3 -- key errors/warnings
scrolled off the screen without me noticing.  I prefer a complete log
file ("make |& tee log.file") for historical reasons in case I need to
check some things days or months later.  The config.status and
config.log are good, but the simple log is quicker to read.

-- 
David Masterson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]