bugGNU roff - Bugs: bug #64059, 'make install' fails when you...

 
 

bug #64059: 'make install' fails when you build outside the source tree

Submitter:  None
Submitted:  Mon 17 Apr 2023 04:39:45 AM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jul 2023 09:06:17 AM UTC, comment #2: 


commit 253de4e70da425b99ed66c897440101a673caf89
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Mar 10 18:03:15 2023 -0600

    doc/doc.am: Fix Savannah #64059.

    * doc/doc.am (install-txt): Look for "groff.txt" in the source and build
      directories in sequence; it could be in either place depending on
      whether the build is from the Git repository or from a distribution
      archive.  Annotate this.  Fixes "install-doc" target when building
      from Git repository.  Problem introduced by me in commit 691fc70108,
      22 February.  Thanks to Nikita Ivanov for the report.

      (install-pdf-local, install-html-local): Similar.

    Also fixes <https://savannah.gnu.org/bugs/?64059>, later reported
    anonymously.

    I wasn't getting problems in my builds even with "make distcheck" (which
    performs a build from a distribution archive in a remote out-of-tree
    location), but changing $(top_srcdir)/doc to $(doc_builddir) revealed
    problems with repo builds.


G. Branden Robinson <gbranden>
Group administrator
Mon 17 Apr 2023 05:16:43 AM UTC, comment #1: 

Hello and thanks for the report.

I think you encountered the same issue that Nikita Ivanov did about a month ago.

https://git.savannah.gnu.org/cgit/groff.git/commit/?h=branden-2023-04-07&id=e92a7c7b693e4a3149fc4fd97b889da00e45850f

(N.B., that link will break in the near future when I replace my branch with branden-2023-04-17 or similar.)


doc/doc.am: Fix repo builds' install-doc targets.
* doc/doc.am (install-txt): Look for "groff.txt" in the source and build
  directories in sequence; it could be in either place depending on
  whether the build is from the Git repository or from a distribution
  archive.  Annotate this.  Fixes "install-doc" target when building
  from Git repository.  Thanks to Nikita Ivanov for the report.

  (install-pdf-local, install-html-local): Similar.

I wasn't getting problems in my builds even with "make distcheck" (which
performs a build from a distribution archive in a remote out-of-tree
location), but changing $(top_srcdir)/doc to $(doc_builddir) revealed
problems with repo builds.


Unfortunately the master branch is still closed to anything apart from doc fixes for the time being, so this fix didn't make it into RC4.  However, to address most of the issues discovered by Bruno Haible this weekend, we will need to reopen master for more intrusive changes.

Whether that happens for RC5, 1.23.0 final, or as part of the next release (1.23.1 or 1.24.0) is something our maintainer, Bertrand, and I will have to work out.

I've also added steps to my build scripts to catch more issues like this in the future.  Which is kind of annoying, because every time I switch back to the master branch, they tell me things are broken...

G. Branden Robinson <gbranden>
Group administrator
Mon 17 Apr 2023 04:39:45 AM UTC, original submission:  

Hi. I tried building groff from source and failed at the make install step.
what i did was:
$ ./bootstrap
#works fine
$ mkdir build && cd build
$ ../configure --prefix=$PWD
# succesful.
# $PWD might not be the best destination directory for an actual build but for the purpose of reproducing this error this i guess is ok.
$ make
# builds succesfully
$ make install
# fails with an error that I forgot to record properly (sorry)

the problem was with the file doc/groff.txt, which for some reason is being searched for in the source root's doc directory, not in my  build/doc directory. copying the build/doc/groff.txt file the source's root doc fixed that.
I also tried with a patch and it seems to work, but i warn you, autoconf is just magical incantations for me, i dont know really what i am doing here.

diff --git a/doc/doc.am b/doc/doc.am
index cddc51907..78a2a4e45 100644
--- a/doc/doc.am
+++ b/doc/doc.am
@@ -624,7 +624,7 @@ install-data-local: install-txt
 install-txt:
  -test -d $(DESTDIR)$(docdir) \
    || $(mkinstalldirs) $(DESTDIR)$(docdir)
- cp $(top_srcdir)/doc/groff.txt $(DESTDIR)$(docdir)
+ cp $(doc_builddir)/groff.txt $(DESTDIR)$(docdir)
 
 install-data-local: install_infodoc
 install_infodoc: doc/groff.info

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-10 gbranden CategoryNone General
        StatusReady for Merge Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-04-24 gbranden Summary'make install' fails when you build on a different directory 'make install' fails when you build outside the source tree
    2023-04-17 gbranden StatusNone Ready for Merge
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code