Bug 27516 - install failure due to unconditional invocation of makeinfo for treelang.texi
Summary: install failure due to unconditional invocation of makeinfo for treelang.texi
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2006-05-09 07:53 UTC by Bernhard Reutner-Fischer
Modified: 2017-07-21 16:23 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.1.1, 4.2.0, 4.3.0
Last reconfirmed: 2006-05-20 11:15:36


Attachments
check if BUILD_INFO was requested explicitely (266 bytes, patch)
2006-05-09 07:58 UTC, Bernhard Reutner-Fischer
Details | Diff
Don't build info pages if makeinfo is too old (272 bytes, patch)
2006-05-09 08:13 UTC, Bernhard Reutner-Fischer
Details | Diff
fix MAKEINFO invocation for gcc-4_1-branch (264 bytes, patch)
2006-05-22 17:43 UTC, Bernhard Reutner-Fischer
Details | Diff
patch to avoid installing treelang info without makeinfo (264 bytes, patch)
2007-12-11 16:33 UTC, Michael Haubenwallner
Details | Diff
use conditional $(BUILD_INFO) variable for prerequs of info and install-info targets (521 bytes, patch)
2008-01-28 17:59 UTC, Bernhard Reutner-Fischer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Reutner-Fischer 2006-05-09 07:53:08 UTC
# uname -a
OSF1 tru64.init.at V5.1 1885 alpha
# makeinfo --version 
makeinfo (GNU texinfo) 4.0

Copyright (C) 1999 Free Software Foundation, Inc.
There is NO warranty.  You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING.


make install erroneously fails since makeinfo is invoked unconditionally for treelang.info as x$(BUILD_INFO) is not checked there as opposed to the other info files.


gccint.info does check proper if BUILD_INFO was requested explicitely, treelang.info does not; e.g.:


if [ x = xinfo ]; then \
        /usr/local/scratch/src/gcc-4.2/missing makeinfo --split-size=5000000 --s
plit-size=5000000 --no-split -I . -I ../../../src/gcc-4.2/gcc/doc \
                -I ../../../src/gcc-4.2/gcc/doc/include -o doc/gccint.info ../..
/../src/gcc-4.2/gcc/doc/gccint.texi; \
fi
rm -f /opt/gcc-4.2//info/gccint.info
if [ -f doc/gccint.info ]; then \
  for f in doc/gccint.info*; do \
    realfile=`echo $f | sed -e 's|.*/\([^/]*\)$|\1|'`; \
    /usr/local/scratch/src/gcc-4.2/install-sh -c -m 644 $f /opt/gcc-4.2//info/$r
ealfile; \
    chmod a-x /opt/gcc-4.2//info/$realfile; \
  done; \
else true; fi
if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \
  if [ -f /opt/gcc-4.2//info/gccint.info ]; then \
    install-info --dir-file=/opt/gcc-4.2//info/dir /opt/gcc-4.2//info/gccint.inf
o; \
  else true; fi; \
else true; fi;
/usr/local/scratch/src/gcc-4.2/missing makeinfo --split-size=5000000 --split-siz
e=5000000 --no-split -I ../../../src/gcc-4.2/gcc/doc/include -o doc/treelang.inf
o ../../../src/gcc-4.2/gcc/treelang/treelang.texi
WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
gmake[2]: *** [doc/treelang.info] Error 1
Comment 1 Bernhard Reutner-Fischer 2006-05-09 07:58:39 UTC
Created attachment 11418 [details]
check if BUILD_INFO was requested explicitely

2006-05-09  Bernhard Fischer  <aldot@gcc.gnu.org>

        PR/27516
        * Make-lang.in (doc/treelang.info): If configure says makeinfo is too old,
        don't build or install Info documentation.

Testing this patch.
Comment 2 Bernhard Reutner-Fischer 2006-05-09 08:13:34 UTC
Created attachment 11419 [details]
Don't build info pages if makeinfo is too old

Corrected syntax.
Comment 3 Bernhard Reutner-Fischer 2006-05-09 15:33:59 UTC
(In reply to comment #2)
> Created an attachment (id=11419) [edit]
> Don't build info pages if makeinfo is too old
> 
> Corrected syntax.
> 

With the gcc.correct_treelang.info_building.02.diff patch i can successfully install the languages c,c++,treelang on OSF5.1a.

Please apply.
Comment 4 Bernhard Reutner-Fischer 2006-05-19 17:29:39 UTC
This also fails on the gcc-4_1-branch.
Comment 5 Bernhard Reutner-Fischer 2006-05-21 12:16:54 UTC
Setting Target Milestone to 4.1.1.

Ok for trunk and the 4.1 branch?
Comment 6 Mark Mitchell 2006-05-21 17:07:30 UTC
Subject: Re:  install failure due to unconditional invocation
 of makeinfo for treelang.texi

aldot at gcc dot gnu dot org wrote:
> ------- Comment #5 from aldot at gcc dot gnu dot org  2006-05-21 12:16 -------
> Setting Target Milestone to 4.1.1.
> 
> Ok for trunk and the 4.1 branch?

Wouldn't it be better just to modify gcc/Makefile.in to do:

ifneq($(BUILD_INFO),)
info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
else
info:
fi

Then, in the subdirectory Makefiles we can avoid checking BUILD_INFO at all.

Comment 7 Bernhard Reutner-Fischer 2006-05-21 17:46:36 UTC
> Wouldn't it be better just to modify gcc/Makefile.in to do:
> 
> ifneq($(BUILD_INFO),)
> info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
> else
> info:
> fi
> 
> Then, in the subdirectory Makefiles we can avoid checking BUILD_INFO at all.

Agree, but i thought that this may be a bit more intrusive than touching the one invalid invocation.

Providing an empty info: and perhaps also html: would be the cleanest thing.
From the looks, html: may also be needed since gcc/Makefile.in reads:
TEXI2HTML = $(MAKEINFO) --html

OTOH, html is apparently not in the default install target, so if somebody requests it explicitely, it may be ok to fail noisily.
Comment 8 Mark Mitchell 2006-05-21 17:58:48 UTC
Subject: Re:  install failure due to unconditional invocation
 of makeinfo for treelang.texi

aldot at gcc dot gnu dot org wrote:
> ------- Comment #7 from aldot at gcc dot gnu dot org  2006-05-21 17:46 -------
>> Wouldn't it be better just to modify gcc/Makefile.in to do:
>>
>> ifneq($(BUILD_INFO),)
>> info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
>> else
>> info:
>> fi
>>
>> Then, in the subdirectory Makefiles we can avoid checking BUILD_INFO at all.
> 
> Agree, but i thought that this may be a bit more intrusive than touching the
> one invalid invocation.

Your original patch is OK for 4.1 -- but I would like the fix I
suggested for 4.2.  Also, we don't like to fix a problem on a release
branch without also having a fix in mainline.

Therefore, would you please test:

(a) for 4.1, your original patch

(b) for 4.2/mainline, a patch along the lines I suggested above,
together with removing checks for BUILD_INFO from */Make-lang.in

?

> OTOH, html is apparently not in the default install target, so if somebody
> requests it explicitely, it may be ok to fail noisily.

Yes, I think we can avoid this complication for HTML.

Comment 9 Bernhard Reutner-Fischer 2006-05-21 20:11:26 UTC
> 
> Your original patch is OK for 4.1 -- but I would like the fix I
> suggested for 4.2.  Also, we don't like to fix a problem on a release
> branch without also having a fix in mainline.
> 
> Therefore, would you please test:
> 
> (a) for 4.1, your original patch
> 
> (b) for 4.2/mainline, a patch along the lines I suggested above,
> together with removing checks for BUILD_INFO from */Make-lang.in
> 
> ?
I will test test the fix you suggested for 4.2 ASAP, but it may take a couple of  days.

The fix for 4.1 was only tested on 4.2, but should be the same for 4.1.
I can double-check on 4.1 tomorrow and apply it if the fix is identical (else i'll follow up).
Comment 10 Bernhard Reutner-Fischer 2006-05-22 17:43:39 UTC
Created attachment 11494 [details]
fix MAKEINFO invocation for gcc-4_1-branch

I cannot test this patch right now since i have to bootstrap gcc-4.2 on the OSF5.1a box first in order to be able to bootstrap 4.1..

gcc-4_1-branch from today fails due to the use of __VA_ARGS__ in the preprocessor:
cc -c   -O2 -DIN_GCC     -DHAVE_CONFIG_H -I. -I. -I../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc -I../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/. -I../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/../include -I../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/../libcpp/include     ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c -o c-parser.o
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/tree.h, line 3147: Formal parameter isn't an identifier. (badformalparm)
#define build(code, ...) \
--------------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/tree.h, line 3151: Formal parameter isn't an identifier. (badformalparm)
#define _buildC1(...)           _buildC2(__VA_ARGS__,9,8,7,6,5,4,3,2,1,0,0)
-----------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/tree.h, line 3152: Formal parameter isn't an identifier. (badformalparm)
#define _buildC2(x,a1,a2,a3,a4,a5,a6,a7,a8,a9,c,...) c
------------------------------------------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3632: Too many actual parameters in macro call. (toomanyactls)
    add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE));
---------------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3632: Too many actual parameters in macro call. (toomanyactls)
    add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE));
--------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3695: Too many actual parameters in macro call. (toomanyactls)
    add_stmt (build (LABEL_EXPR, void_type_node, c_break_label));
---------------------^
cc: Warning: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3695: Too many actual parameters in macro call. (toomanyactls)
    add_stmt (build (LABEL_EXPR, void_type_node, c_break_label));
--------------^
cc: Error: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3632: In this statement, "__VA_ARGS__" is not declared. (undeclared)
    add_stmt (build (NOP_EXPR, NULL_TREE, NULL_TREE));
--------------^
cc: Error: ../../../cvs/alphaev56-dec-osf5.1a/gcc-4.1/gcc/c-parser.c, line 3695: In this statement, "__VA_ARGS__" is not declared. (undeclared)
    add_stmt (build (LABEL_EXPR, void_type_node, c_break_label));
--------------^
gmake[2]: *** [c-parser.o] Error 1
gmake[2]: Leaving directory `/usr/local/scratch/obj/gcc-4.1/gcc'

oh joy
Comment 11 Mark Mitchell 2006-05-25 02:34:53 UTC
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
Comment 12 Philippe Schaffnit 2006-10-26 06:42:00 UTC
Isn't this also 'Bug#: 27133'?
Comment 13 Michael Haubenwallner 2007-12-10 15:40:23 UTC
Just asking for status of this bug:
Seems to be still valid with gcc-4.2.2 - don't (want to) have texinfo installed.
Comment 14 Bernhard Reutner-Fischer 2007-12-11 08:46:51 UTC
(In reply to comment #13)
> Just asking for status of this bug:
> Seems to be still valid with gcc-4.2.2 - don't (want to) have texinfo
> installed.

Please submit a tested patch along the lines of Mark's comment #8
Comment 15 Michael Haubenwallner 2007-12-11 16:33:08 UTC
Created attachment 14730 [details]
patch to avoid installing treelang info without makeinfo

This patch works with gcc-4.2.2, and should apply to trunk/gcc/Makefile.in too, as the important line looks the same.
Comment 16 Bernhard Reutner-Fischer 2008-01-25 15:24:23 UTC
Removing alphaev56-dec-osf5.1a since this is not target specific.

The treelang-noinfo.patch looks fine to me, but i cannot approve it (mark?).

Comment 17 Mark Mitchell 2008-01-25 18:54:13 UTC
This patch is OK.
Comment 18 Bernhard Reutner-Fischer 2008-01-28 17:59:49 UTC
Created attachment 15038 [details]
use conditional $(BUILD_INFO) variable for prerequs of info and install-info targets

Use the variable $(BUILD_INFO) to decide whether or not info-pages are to be installed.

This follows mark's comment #8 above but does not yet remove the testing of $(BUILD_INFO) in gcc/*/Make-lang.in . A tested patch which removes these now superfluous checks will follow.

Michael's treelang-noinfo.patch looks inappropriate (there is no 'install-' target AFAICS, so install would fail never the less), so i consider the approval nil, sorry.
Comment 19 Mark Mitchell 2008-01-28 18:12:12 UTC
In your patch, why does install-info still need doc and installdirs dependencies when BUILD_INFO is not set?  If those things still need to happen, shouldn't they be dependencies of some other target?  Logically, if BUILD_INFO is not set, then install-info should be a no-op.
Comment 20 Bernhard Reutner-Fischer 2008-01-28 20:43:27 UTC
(In reply to comment #19)
> In your patch, why does install-info still need doc and installdirs
> dependencies when BUILD_INFO is not set?  If those things still need to happen,
> shouldn't they be dependencies of some other target?  Logically, if BUILD_INFO
> is not set, then install-info should be a no-op.

I kept them due to precaution but ultimately they shouldn't be needed for install-info itself, yes. Will test how this works out with MAKEINFO=/bin/false and an old makeinfo before i attach a complete patch.
Comment 21 Michael Haubenwallner 2008-01-29 10:22:44 UTC
(In reply to comment #18)
> (there is no 'install-' target AFAICS, so install would fail never the less),

I'm pretty sure there is a target 'install-', already used for empty @POSUB@, because this inspired me to create the treelang-noinfo.patch the way it is.

However - you're the dev...
Comment 22 Bernhard Reutner-Fischer 2008-01-29 12:33:41 UTC
Michael,

You are right, sorry :(. I somehow managed not to find them although they are there!
---8<---
# Dummy rules to deal with dependencies produced by use of
# "build-@POSUB@" and "install-@POSUB@" above, when NLS is disabled.
build-: ; @true
install-: ; @true
---8<---
So for 4.3.0, Michaels patch from comment #15 (treelang-noinfo.patch as attached) is fine, we can clean this up for real for 4.4.
Comment 23 Joseph S. Myers 2008-07-04 19:29:31 UTC
Closing 4.1 branch.  Removing milestone altogether as it's not clear this is a regression - and treelang is no longer present on trunk, so if this only affected treelang then there is no bug on trunk here any more.

Comment 24 Eric Gallager 2017-07-21 16:23:24 UTC
(In reply to Joseph S. Myers from comment #23)
> Closing 4.1 branch.  Removing milestone altogether as it's not clear this is
> a regression - and treelang is no longer present on trunk, so if this only
> affected treelang then there is no bug on trunk here any more.

I'm taking "no bug on trunk here any more" to mean I can close this as RESOLVED FIXED by the removal of treelang.