GNU bug report logs - #79466
31.0.50; Build in a separate directory

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Thu, 18 Sep 2025 08:02:01 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 79466 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79466; Package emacs. (Thu, 18 Sep 2025 08:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Eller <eller.helmut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 18 Sep 2025 08:02:02 GMT) Full text and rfc822 format available.

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

From: Helmut Eller <eller.helmut <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Build in a separate directory
Date: Thu, 18 Sep 2025 10:01:19 +0200
The file INSTALL under 3b) says that it should be possible to build in a
separate directory.  However this doesn't seem to work.  I did something
like

  cd /tmp
  mkdir build
  cd build
  /path/to/source/configure -C CFLAGS="-O0 -g3
  make

After some progress this aborts with:

  ...
  GEN      ../etc/DOC
/usr/bin/ld: cannot find dispnew.o: No such file or directory
/usr/bin/ld: cannot find frame.o: No such file or directory
/usr/bin/ld: cannot find scroll.o: No such file or directory
  ...

It seems that changing the .c.o rule in src/Makefile like so

 .c.o:
-       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
+       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $< -o $@

allows the build to complete.  However the .elc files still end up in
the source directory.  This might actually be useful, but I'm not sure
that it's intended.

Should we fix this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79466; Package emacs. (Thu, 18 Sep 2025 09:25:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 79466 <at> debbugs.gnu.org
Subject: Re: bug#79466: 31.0.50; Build in a separate directory
Date: Thu, 18 Sep 2025 12:24:27 +0300
> From: Helmut Eller <eller.helmut <at> gmail.com>
> Date: Thu, 18 Sep 2025 10:01:19 +0200
> 
> The file INSTALL under 3b) says that it should be possible to build in a
> separate directory.  However this doesn't seem to work.  I did something
> like
> 
>   cd /tmp
>   mkdir build
>   cd build
>   /path/to/source/configure -C CFLAGS="-O0 -g3
>   make
> 
> After some progress this aborts with:
> 
>   ...
>   GEN      ../etc/DOC
> /usr/bin/ld: cannot find dispnew.o: No such file or directory
> /usr/bin/ld: cannot find frame.o: No such file or directory
> /usr/bin/ld: cannot find scroll.o: No such file or directory
>   ...

You need to make sure the source tree is free from the artifacts of a
previous build.  Did you do that?

> It seems that changing the .c.o rule in src/Makefile like so
> 
>  .c.o:
> -       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
> +       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $< -o $@
> 
> allows the build to complete.  However the .elc files still end up in
> the source directory.  This might actually be useful, but I'm not sure
> that it's intended.
> 
> Should we fix this?

Shouldn't be needed, since VPATH should take care of that.  But if
some products of a build are in the source tree, Make could be fooled.




This bug report was last modified today.

Previous Next


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