User account creation filtered due to spam.

Bug 33200 - install fails when trying to install fix-header since fix-header wasn't built
Summary: install fails when trying to install fix-header since fix-header wasn't built
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-27 02:38 UTC by Rick Altherr
Modified: 2009-03-30 15:28 UTC (History)
5 users (show)

See Also:
Host: powerpc-apple-darwin8
Target: avr-unknown-none
Build: i686-apple-darwin8
Known to work:
Known to fail: 4.3.0
Last reconfirmed: 2008-01-18 18:06:21


Attachments
Full build log (65.78 KB, application/x-gzip)
2007-08-27 02:40 UTC, Rick Altherr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Altherr 2007-08-27 02:38:28 UTC
fix-header doesn't appear to be built during a canadian cross, but the install phase tries to install it anyway.

Build log excerpt:
if [ xstmp-install-fixproto != x ] ; then \
  /usr/bin/install -c /bin/sh /tmp/avr-gcc/src/gcc-4.1.2/gcc/../mkinstalldirs \
        /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/mkinstalldirs ; \
  /usr/bin/install -c /tmp/avr-gcc/src/gcc-4.1.2/gcc/fixproto /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/fixproto ; \
  /usr/bin/install -c build/fix-header \
        /tmp/avr-gcc/tmp/ppc/usr/local/avr/libexec/gcc/avr/4.1.2/install-tools/fix-header ; \
else :; fi
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
install: build/fix-header: No such file or directory
make[3]: *** [install-mkheaders] Error 71
make[2]: *** [install-gcc] Error 2
make[1]: *** [install] Error 2
make: *** [install] Error 2
Comment 1 Rick Altherr 2007-08-27 02:40:34 UTC
Created attachment 14119 [details]
Full build log

Attaching full build log.
Comment 2 Bernhard Reutner-Fischer 2008-01-18 18:06:21 UTC
Confirmed.

# Install supporting files for fixincludes to be run later.
install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
  macro_list fixinc_list
[snip]
        if [ x$(STMP_FIXPROTO) != x ] ; then \
          $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
          $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
                $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
        else :; fi

As you can see, fix-header is never built.

For reference:
toolchain_build_sh4/gcc-4.3.0-final$ gcc/xgcc -v
Using built-in specs.
Target: sh4-linux-uclibc
Configured with: /there.sh/toolchain_build_sh4/gcc-4.3.0/configure --prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=sh4-linux-uclibc --enable-languages=c,fortran --with-sysroot=/there.sh/build_sh4/staging_dir --with-build-time-tools=/there.sh/build_sh4/staging_dir/usr/sh4-linux-uclibc/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/there.sh/toolchain_build_sh4/gmp --with-mpfr=/there.sh/toolchain_build_sh4/mpfr --disable-nls --enable-threads --disable-multilib --disable-libgomp --disable-libmudflap --disable-libssp
Thread model: posix
gcc version 4.3.0 20080118 (experimental) (GCC) 


Given that i don't build c++, should fix-headers be installed in the first place (for use a different compiler, perhaps)?
Comment 3 Bernhard Reutner-Fischer 2008-01-18 18:38:31 UTC
fix-proto is never run, it seems:
$ grep "stmp-" out.log
echo timestamp > stmp-fixinc
echo timestamp > stmp-int-hdrs
echo timestamp > stmp-install-fixproto
        if [ xstmp-install-fixproto != x ] ; then \

after fixincludes is run, it seems to update the stamps it feels responsible for:
cp /there.sh/toolchain_build_sh4/gcc-4.3.0/gcc/../fixincludes/README-fixinc incl
ude-fixed/README
chmod a+r include-fixed/README
echo timestamp > stmp-int-hdrs
echo timestamp > stmp-install-fixproto


I'm doing a simple configure;make all; make install
Comment 4 Bernhard Reutner-Fischer 2008-01-19 12:37:32 UTC
Bruce,

Can you please have a look. How is that ment to work?
Comment 5 Bernhard Reutner-Fischer 2008-01-19 14:14:41 UTC
Assuming build=i386-linux-*, host==target==sh4-linux-*, i.e. cross-compiling a native compiler for SuperH:

-) sh*-* forces use_fixproto in config.gcc (why?)
   See config.gcc: line 2308

-) stmp-install-fixproto: fixproto
   - The comment above this rule is wrong, fixproto is a shell-script.
   - this rule doesn't depend on any fix-header, but the stamp is used
     to unconditionally install fix-header.

-) build/fix-header${build_exeext}
   Tries to compile a binary with mixed build- and host- objects, like
   (abbreviated):
$HOSTCC -DGENERATOR_FILE  -o build/fix-header \
build/fix-header.o c-incpath.o cppdefault.o build/scan-decls.o prefix.o \
build/scan.o build/errors.o ../libcpp/libcpp.a   ../libiberty/libiberty etc.

where build/* is of course incompatible with the other object files.
This suggests that use_fixproto resp. stmp-install-fixproto makes only sense for
host == build *or* (assuming this is not correct) that we need fix-header for both build and for host (which is currently not implemented AFAICS).

Please advise.
Comment 6 Bruce Korb 2008-01-19 17:23:18 UTC
fixincludes has nothing to do with fixproto, other than both working
with fixing up headers and having names that start with "fix".  So,
I know little about it and even less about canadian crosses.  "fix-header"
also starts with "fix", but has a different purpose:
gcc/fix-header.c:/* fix-header.c - Make C header file suitable for C++.
Comment 7 Bernhard Reutner-Fischer 2008-01-23 10:43:46 UTC
I've "fixed" superH locally via

\\\\
\\ gcc PR33200
Index: gcc-4.3.0/gcc/config.gcc
===================================================================
--- gcc-4.3.0/gcc/config.gcc	(revision 131628)
+++ gcc-4.3.0/gcc/config.gcc	(working copy)
@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
 	if test x${enable_incomplete_targets} = xyes ; then
 		tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
 	fi
-	use_fixproto=yes
+	# XXX: why? use_fixproto=yes
 	;;
 sh-*-rtemscoff*)
 	tmake_file="sh/t-sh t-rtems sh/t-rtems"


until somebody knowledgeable explains how this should be fixed for good.
Comment 8 Mike Frysinger 2009-03-15 05:27:56 UTC
this has been fixed for gcc-4.4 ... time to close the bug ?

http://gcc.gnu.org/viewcvs?view=rev&revision=136783
Comment 9 Joseph S. Myers 2009-03-30 15:28:34 UTC
fix-header has been removed for 4.5, so all bugs relating to it are gone.
Most targets no longer use it, a few that used it were removed.