Bug 24946 - [4.1/4.2 Regression] make[7]: rc: Command not found
Summary: [4.1/4.2 Regression] make[7]: rc: Command not found
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-11-19 22:32 UTC by John David Anglin
Modified: 2005-11-23 09:02 UTC (History)
1 user (show)

See Also:
Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
Build: hppa-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-11-19 22:32:52 UTC
make[8]: Leaving directory `/home/dave/gcc-4.1/objdir/gcc/ada/rts'
rm -f rts/libgnat.a rts/libgnarl.a
rc rts/libgnat.a \
   rts/a-caldel.o rts/a-calend.o rts/a-cdlili.o rts/a-cgaaso.o rts/a-cgarso.o rt
...

It seems AR_FOR_TARGET didn't expand to ar.

2005-11-14  Arnaud Charlet  <charlet@adacore.com>

        * Makefile.in: Add or update g-soccon LIBGNAT pairs for Linux/PPC and
        64-bit Solaris
        Split the Linux version of g-soccon into separate variants for 32 and 64
        bit platforms.
        (gnatlib): Use $(AR_FOR_TARGET) and $(RANLIB_FOR_TARGET)
        vice $(AR) and $(RANLIB). Remove use of host variable $(RANLIB_FLAGS).
        install-gnatlib: Use $(RANLIB_FOR_TARGET) vice $(RANLIB). Remove use
        of host variable $(RANLIB_FLAGS).
Comment 1 Arnaud Charlet 2005-11-21 09:43:34 UTC
I got a bugzilla internal error when trying to attach a proposed
patch, so here it is inline (be careful with tabs and spaces,
I'd suggest applying the patch manually):

<<
--- libada/Makefile.in.orig     2005-11-21 04:34:39.422364000 -0500
+++ libada/Makefile.in  2005-11-21 04:34:17.812698000 -0500
@@ -75,6 +75,9 @@
         "prefix=$(prefix)" \
         "STAGE_PREFIX=$(STAGE_PREFIX)" \
        "CC=$(host_cc_for_libada)" \
+       "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
+       "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+       "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
         "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"

 # Rules to build gnatlib.
>>

Apparently the libada Makefile is not passing some variables to ada/Makefile
properly, so this patch might address the problem you are seeing.
Not clear why we are not seeing this problem on other platforms so far
though.

Arno
Comment 2 dave 2005-11-21 14:36:26 UTC
Subject: Re:  [4.1/4.2 Regression] make[7]: rc: Command not found

> Apparently the libada Makefile is not passing some variables to ada/Makefile
> properly, so this patch might address the problem you are seeing.
> Not clear why we are not seeing this problem on other platforms so far
> though.

I'm not sure either.  I did notice that the build that had a problem
was using an old version of make (3.79.1).  I removed this and now this
system appears to be behaving similarly to the other hppa-linux system
that I build on.  On the otherhand, I've been building with this version
of make for years.

Dave
Comment 3 charlet@adacore.com 2005-11-21 14:59:34 UTC
Subject: Re:  [4.1/4.2 Regression] make[7]: rc: Command not found

> I'm not sure either.  I did notice that the build that had a problem
> was using an old version of make (3.79.1).  I removed this and now this
> system appears to be behaving similarly to the other hppa-linux system
> that I build on.  On the otherhand, I've been building with this version
> of make for years.

Interesting. This might be a bug in the handling of the
"export" directive then, latent up to now, but showing explicitely
now that more variables are used by the Ada Makefile.

Arno
Comment 4 dave 2005-11-23 03:07:58 UTC
Subject: Re:  [4.1/4.2 Regression] make[7]: rc: Command not found

> > I'm not sure either.  I did notice that the build that had a problem
> > was using an old version of make (3.79.1).  I removed this and now this
> > system appears to be behaving similarly to the other hppa-linux system
> > that I build on.  On the otherhand, I've been building with this version
> > of make for years.
> 
> Interesting. This might be a bug in the handling of the
> "export" directive then, latent up to now, but showing explicitely
> now that more variables are used by the Ada Makefile.

I hit the same problem on hppa1.1-hp-hpux10.20 again with make 3.79.1.

rm -f rts/libgnat.a rts/libgnarl.a
rc rts/libgnat.a \
   rts/a-caldel.o rts/a-calend.o rts/a-cdlili.o rts/a-cgaaso.o rts/a-cgarso.o rt
...
-io.o rts/init.o rts/initialize.o rts/seh_init.o rts/cal.o rts/final.o rts/trace
bak.o rts/expect.o rts/mkdir.o rts/socket.o rts/raise-gcc.o
mv: /etc/auto_parms.log.old: rename: Permission denied

/sbin/auto_parms, checking network for DHCP server (see /etc/auto_parms.log)

/sbin/auto_parms[8]: /etc/auto_parms.log: Cannot create the specified file.
/sbin/rc[113]: rts/a-caldel.o: The specified number is not valid for this comman
d.
/sbin/rc[133]: rts/a-caldel.o: The specified number is not valid for this comman
d.
ttytype: couldn't open /dev/tty for reading

Transition to run-level rts/a-caldel.o is complete.
rc rts/libgccprefix.a \
          ../prefix.o ../../libiberty/concat.o ../../libiberty/xmalloc.o ../../libiberty/xstrdup.o ../../libiberty/xexit.o;
mv: /etc/auto_parms.log.old: rename: Permission denied

/sbin/auto_parms, checking network for DHCP server (see /etc/auto_parms.log)

/sbin/auto_parms[8]: /etc/auto_parms.log: Cannot create the specified file.
/sbin/rc[113]: ../prefix.o: The specified number is not valid for this command.
/sbin/rc[133]: ../prefix.o: The specified number is not valid for this command.
ttytype: couldn't open /dev/tty for reading

Transition to run-level ../prefix.o is complete.
rts/libgccprefix.a
/usr/local/bin/bash: rts/libgccprefix.a: No such file or directory
make[5]: *** [gnatlib] Error 127

I've no idea what's happening (buffer overflow?) but it's not good.
I updated to make 3.80 and this problem didn't occur.

Dave
Comment 5 Arnaud Charlet 2005-11-23 09:02:13 UTC
So closing as not a GCC bug (likely a GNU make bug).

Arno