unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Building Emacs out of source tree?
@ 2024-03-17 12:54 tomas
  2024-03-17 14:18 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: tomas @ 2024-03-17 12:54 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

Hello, Emacs

after a while, I'm trying again to pick up the custom of
compiling Emacs.

Usually, I compiled in an empty build directory, invoking
../emacs/configure.

This used to work pretty well but doesn't seem to these
days. I hit two-and-a-half snags:

- one missing chartab.o which happened to lie around 
  in the source dir under src; copying it over to the
  corresponding spot in the build dir let the build
  continue
- one missing symbol rpl_chmodat; this gets defined in
  some header -- sneaking a strategically placed

    #undef rpl_chmodat

  let the build process continue (and now comes te half
  snag: pdump dumped core -- that's what you get for
  messing with things you only half-understand :)

Building in-source Just Works and produces an installable
Emacs which, prima vista behaves in a civilised manner.

It's a recent git pull, off the "master" branch:

  7a0f4de3c18 (HEAD -> master) Improve C++ standard library detection on Android

Now I'd be willing to gather more details for a bug report if
there is an interest in keeping out of source tree compiles
viable; for me those aren't that crucial anymore, with the
advent of git and of 1TB+ disks.

What do you think? Do we still care for out of source builds?

Cheers
-- 
tomás

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 12:54 Building Emacs out of source tree? tomas
@ 2024-03-17 14:18 ` Eli Zaretskii
  2024-03-17 17:53   ` Basile Starynkevitch
  2024-03-17 19:24   ` tomas
  2024-03-19  6:18 ` Andreas Röhler
  2024-03-20  5:41 ` SOLVED [was: Building Emacs out of source tree?] tomas
  2 siblings, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2024-03-17 14:18 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 17 Mar 2024 13:54:21 +0100
> From: <tomas@tuxteam.de>
> 
> after a while, I'm trying again to pick up the custom of
> compiling Emacs.
> 
> Usually, I compiled in an empty build directory, invoking
> ../emacs/configure.

That is the correct way.

> This used to work pretty well but doesn't seem to these
> days. I hit two-and-a-half snags:
> 
> - one missing chartab.o which happened to lie around 
>   in the source dir under src; copying it over to the
>   corresponding spot in the build dir let the build
>   continue

How come?  chartab.c is just one of the source files, and is not
mentioned specially in any Makefile, AFAICT.  Why is that file somehow
missing, and others aren't?  Please investigate why.  (Could it be
your src tree was not clean of all the *.o files?)

> - one missing symbol rpl_chmodat; this gets defined in
>   some header -- sneaking a strategically placed
> 
>     #undef rpl_chmodat

If this is on GNU/Linux, then you shouldn't need to have any
rpl_chmodat anywhere.  I just searched my source/build tree on
GNU/Linux, and didn't find rpl_chmodat anywhere.  So once again,
please investigate.

And in any case, this doesn't seem to have anything to do with
out-of-tree builds, does it?

> Now I'd be willing to gather more details for a bug report if
> there is an interest in keeping out of source tree compiles
> viable; for me those aren't that crucial anymore, with the
> advent of git and of 1TB+ disks.
> 
> What do you think? Do we still care for out of source builds?

Of course we do.  They are supported and should continue to be
supported.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 14:18 ` Eli Zaretskii
@ 2024-03-17 17:53   ` Basile Starynkevitch
  2024-03-17 19:33     ` tomas
  2024-03-17 19:24   ` tomas
  1 sibling, 1 reply; 11+ messages in thread
From: Basile Starynkevitch @ 2024-03-17 17:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On 3/17/24 15:18, Eli Zaretskii wrote:
> If this is on GNU/Linux, then you shouldn't need to have any
> rpl_chmodat anywhere.  I just searched my source/build tree on
> GNU/Linux, and didn't find rpl_chmodat anywhere.  So once again,
> please investigate.
>
> And in any case, this doesn't seem to have anything to do with
> out-of-tree builds, does it?
>
>> Now I'd be willing to gather more details for a bug report if
>> there is an interest in keeping out of source tree compiles
>> viable; for me those aren't that crucial anymore, with the
>> advent of git and of 1TB+ disks.
>>
>> What do you think? Do we still care for out of source builds?
> Of course we do.  They are supported and should continue to be
> supported.


I actually am git pulling and buiding GNU emacs on Linux Debian/x86-64  
(inside its source tree) more than twice a week.

(Why do you want to build it outside of source tree?)

Very often it build and works ok.

> rimski.x86_64 % /usr/local/bin/emacs-30.0.50 --version GNU Emacs 
> 30.0.50 Development version ad3a3ad6e616 on master branch; build date 
> 2024-03-16. Copyright (C) 2024 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. 

Thanks

-- 
Basile Starynkevitch<basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/
See/voir:https://github.com/RefPerSys/RefPerSys


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 14:18 ` Eli Zaretskii
  2024-03-17 17:53   ` Basile Starynkevitch
@ 2024-03-17 19:24   ` tomas
  2024-03-18  8:25     ` Robert Pluim
  1 sibling, 1 reply; 11+ messages in thread
From: tomas @ 2024-03-17 19:24 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2088 bytes --]

On Sun, Mar 17, 2024 at 04:18:35PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 17 Mar 2024 13:54:21 +0100
> > From: <tomas@tuxteam.de>
> > 
> > after a while, I'm trying again to pick up the custom of
> > compiling Emacs.
> > 
> > Usually, I compiled in an empty build directory, invoking
> > ../emacs/configure.
> 
> That is the correct way.

Thanks for confirming.

> > This used to work pretty well but doesn't seem to these
> > days. I hit two-and-a-half snags:
> > 
> > - one missing chartab.o which happened to lie around 
> >   in the source dir under src; copying it over to the
> >   corresponding spot in the build dir let the build
> >   continue
> 
> How come?  chartab.c is just one of the source files, and is not
> mentioned specially in any Makefile, AFAICT.  Why is that file somehow
> missing, and others aren't?  Please investigate why.  (Could it be
> your src tree was not clean of all the *.o files?)

Good question. I was surprised myself -- anyway, copying chartab.o
from <source>/src/ (why was it there in the first place?) to
<build>src/ let the build continue, until...

> > - one missing symbol rpl_chmodat; this gets defined in
> >   some header -- sneaking a strategically placed
> > 
> >     #undef rpl_chmodat
> 
> If this is on GNU/Linux, then you shouldn't need to have any
> rpl_chmodat anywhere.  I just searched my source/build tree on
> GNU/Linux, and didn't find rpl_chmodat anywhere.  So once again,
> please investigate.

It is GNU/Linux, yes, and this was my take too, since "my" libc
does carry a chmodat.

> And in any case, this doesn't seem to have anything to do with
> out-of-tree builds, does it?

Thing is, in-tree build (after a make bootstrap) succeeds right
away. Out of tree builds (also after make bootstrap) failed for
me as described above.

So I'll definitely have a look. Next week is a bit busy, so it
might take me until weekend.

Thanks for confirming that (a) out-of-tree build is supposed to
work and (b) there is interest in knowing when it doesn't.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 17:53   ` Basile Starynkevitch
@ 2024-03-17 19:33     ` tomas
  0 siblings, 0 replies; 11+ messages in thread
From: tomas @ 2024-03-17 19:33 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: Eli Zaretskii, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On Sun, Mar 17, 2024 at 06:53:59PM +0100, Basile Starynkevitch wrote:
> 
> On 3/17/24 15:18, Eli Zaretskii wrote:

[...]

> I actually am git pulling and buiding GNU emacs on Linux Debian/x86-64 
> (inside its source tree) more than twice a week.

Thanks for one more (or actually many more :) data points!

As I wrote, it works for me in-tree, too.

> (Why do you want to build it outside of source tree?)

Back then (TM), when you built off a tarball, there was
a positive advantage to this. Nowadays, with git, it has
lost much of its importance.

Oldtimer habits,if you will.

That was my original post's intention, to find out whether
Emacs still cares about out-of-tree builds. Had the answer
been "no", I'd changed that habit, but I understood Eli's
answer as "yes", so I'll try to find out :-)

> Very often it build and works ok.

Some time ago I have been doing that, and my experience was
like yours, yes.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 19:24   ` tomas
@ 2024-03-18  8:25     ` Robert Pluim
  2024-03-18  8:50       ` tomas
  2024-03-18 13:27       ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Robert Pluim @ 2024-03-18  8:25 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

>>>>> On Sun, 17 Mar 2024 20:24:28 +0100, <tomas@tuxteam.de> said:
    >> If this is on GNU/Linux, then you shouldn't need to have any
    >> rpl_chmodat anywhere.  I just searched my source/build tree on
    >> GNU/Linux, and didn't find rpl_chmodat anywhere.  So once again,
    >> please investigate.

    Tomas> It is GNU/Linux, yes, and this was my take too, since "my" libc
    Tomas> does carry a chmodat.

That in itself doesnʼt mean gnulib wonʼt try to replace it: sometimes
gnulib deems libc versions of functions buggy and wraps them. But I
donʼt see that for chmodat on my GNU/Linux box.

    >> And in any case, this doesn't seem to have anything to do with
    >> out-of-tree builds, does it?

    Tomas> Thing is, in-tree build (after a make bootstrap) succeeds right
    Tomas> away. Out of tree builds (also after make bootstrap) failed for
    Tomas> me as described above.

Did you build in-tree and then build out-of-tree? Maybe 'make
bootstrap' in that situation is missing some cleanup.

    Tomas> So I'll definitely have a look. Next week is a bit busy, so it
    Tomas> might take me until weekend.

    Tomas> Thanks for confirming that (a) out-of-tree build is supposed to
    Tomas> work and (b) there is interest in knowing when it doesn't.

Yes to both (and it works fine for me).

Robert
-- 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-18  8:25     ` Robert Pluim
@ 2024-03-18  8:50       ` tomas
  2024-03-18 13:27       ` Eli Zaretskii
  1 sibling, 0 replies; 11+ messages in thread
From: tomas @ 2024-03-18  8:50 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1882 bytes --]

On Mon, Mar 18, 2024 at 09:25:16AM +0100, Robert Pluim wrote:
> >>>>> On Sun, 17 Mar 2024 20:24:28 +0100, <tomas@tuxteam.de> said:

[...]

>     Tomas> It is GNU/Linux, yes, and this was my take too, since "my" libc
>     Tomas> does carry a chmodat.
> 
> That in itself doesnʼt mean gnulib wonʼt try to replace it: sometimes
> gnulib deems libc versions of functions buggy and wraps them. But I
> donʼt see that for chmodat on my GNU/Linux box.
> 
>     >> And in any case, this doesn't seem to have anything to do with
>     >> out-of-tree builds, does it?
> 
>     Tomas> Thing is, in-tree build (after a make bootstrap) succeeds right
>     Tomas> away. Out of tree builds (also after make bootstrap) failed for
>     Tomas> me as described above.
> 
> Did you build in-tree and then build out-of-tree? Maybe 'make
> bootstrap' in that situation is missing some cleanup.

AFAIR, I first built out-of-tree after a "git pull" (I didn't a "git
clean", so the src tree might have been dirty [1]), then copied that
chartab.o, then #undef'd. After a "make bootstrap" (still out-of-tree)
the first issue (chartab.o) returned.

That's when I resorted to in-tree build, first "make bootstrap" then
"make", which succeeded right away.

Take all of this with a grain of salt, though: I'll do a more systematic
rehearsal this weekend, hopefully.

>     Tomas> So I'll definitely have a look. Next week is a bit busy, so it
>     Tomas> might take me until weekend.
> 
>     Tomas> Thanks for confirming that (a) out-of-tree build is supposed to
>     Tomas> work and (b) there is interest in knowing when it doesn't.
> 
> Yes to both (and it works fine for me).

Thanks, Robert. I'm reporting back :)

Cheers

[1] Since I've been doing out-of-tree all the time, there's no reason
   for the src tree to be dirty (famous last...).

-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-18  8:25     ` Robert Pluim
  2024-03-18  8:50       ` tomas
@ 2024-03-18 13:27       ` Eli Zaretskii
  2024-03-18 13:59         ` tomas
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2024-03-18 13:27 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Robert Pluim <rpluim@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 18 Mar 2024 09:25:16 +0100
> 
> Did you build in-tree and then build out-of-tree? Maybe 'make
> bootstrap' in that situation is missing some cleanup.

"make bootstrap" won't help, because the cleaning must be done in the
source tree, but the build should be done in the build tree.  I
suggest "git clean -fdx" in the source tree instead (or even delete
the clone and clone it anew).



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-18 13:27       ` Eli Zaretskii
@ 2024-03-18 13:59         ` tomas
  0 siblings, 0 replies; 11+ messages in thread
From: tomas @ 2024-03-18 13:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

On Mon, Mar 18, 2024 at 03:27:48PM +0200, Eli Zaretskii wrote:

[...]
> "make bootstrap" won't help, because the cleaning must be done in the
> source tree, but the build should be done in the build tree.  I
> suggest "git clean -fdx" in the source tree instead (or even delete
> the clone and clone it anew).

Actually "git clean -fdx" is in my plans, yes. Thanks for the reminder.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Building Emacs out of source tree?
  2024-03-17 12:54 Building Emacs out of source tree? tomas
  2024-03-17 14:18 ` Eli Zaretskii
@ 2024-03-19  6:18 ` Andreas Röhler
  2024-03-20  5:41 ` SOLVED [was: Building Emacs out of source tree?] tomas
  2 siblings, 0 replies; 11+ messages in thread
From: Andreas Röhler @ 2024-03-19  6:18 UTC (permalink / raw)
  To: help-gnu-emacs

I'm running autogen.sh first, then .configure

Am 17.03.24 um 13:54 schrieb tomas@tuxteam.de:
> Hello, Emacs
>
> after a while, I'm trying again to pick up the custom of
> compiling Emacs.
>
> Usually, I compiled in an empty build directory, invoking
> ../emacs/configure.
>
> This used to work pretty well but doesn't seem to these
> days. I hit two-and-a-half snags:
>
> - one missing chartab.o which happened to lie around
>    in the source dir under src; copying it over to the
>    corresponding spot in the build dir let the build
>    continue
> - one missing symbol rpl_chmodat; this gets defined in
>    some header -- sneaking a strategically placed
>
>      #undef rpl_chmodat
>
>    let the build process continue (and now comes te half
>    snag: pdump dumped core -- that's what you get for
>    messing with things you only half-understand :)
>
> Building in-source Just Works and produces an installable
> Emacs which, prima vista behaves in a civilised manner.
>
> It's a recent git pull, off the "master" branch:
>
>    7a0f4de3c18 (HEAD -> master) Improve C++ standard library detection on Android
>
> Now I'd be willing to gather more details for a bug report if
> there is an interest in keeping out of source tree compiles
> viable; for me those aren't that crucial anymore, with the
> advent of git and of 1TB+ disks.
>
> What do you think? Do we still care for out of source builds?
>
> Cheers



^ permalink raw reply	[flat|nested] 11+ messages in thread

* SOLVED [was: Building Emacs out of source tree?]
  2024-03-17 12:54 Building Emacs out of source tree? tomas
  2024-03-17 14:18 ` Eli Zaretskii
  2024-03-19  6:18 ` Andreas Röhler
@ 2024-03-20  5:41 ` tomas
  2 siblings, 0 replies; 11+ messages in thread
From: tomas @ 2024-03-20  5:41 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

On Sun, Mar 17, 2024 at 01:54:21PM +0100, tomas@tuxteam.de wrote:
> Hello, Emacs

[problems building out-of-source]

Turns out these were ghosts. "git clean -dfx" did the trick.

Sorry for the noise and thanks for all the helpful comments!

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-20  5:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-17 12:54 Building Emacs out of source tree? tomas
2024-03-17 14:18 ` Eli Zaretskii
2024-03-17 17:53   ` Basile Starynkevitch
2024-03-17 19:33     ` tomas
2024-03-17 19:24   ` tomas
2024-03-18  8:25     ` Robert Pluim
2024-03-18  8:50       ` tomas
2024-03-18 13:27       ` Eli Zaretskii
2024-03-18 13:59         ` tomas
2024-03-19  6:18 ` Andreas Röhler
2024-03-20  5:41 ` SOLVED [was: Building Emacs out of source tree?] tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).