Bug 20155 - [4.0 Regression] libgcj build fails with "execvp: /bin/sh: Argument list too long"
Summary: [4.0 Regression] libgcj build fails with "execvp: /bin/sh: Argument list too ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.2
Assignee: Paolo Bonzini
URL:
Keywords: build
Depends on:
Blocks: 17574 21944
  Show dependency treegraph
 
Reported: 2005-02-22 21:57 UTC by Gerald Pfeifer
Modified: 2005-08-18 09:09 UTC (History)
7 users (show)

See Also:
Host: i386-unknown-freebsd4.10
Target:
Build:
Known to work: 4.0.2 4.1.0
Known to fail:
Last reconfirmed: 2005-03-02 18:25:09


Attachments
Proposed fix to bug (1.23 KB, patch)
2005-03-02 21:41 UTC, Kelley Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2005-02-22 21:57:36 UTC
A full bootstrap including the java frontend (which implies libgcj) fails with
the following error message.

This is a regression from 3.4.x and relatively recent mainline.

...gnu/xml/transform/StreamSerializer.lo gnu/xml/transform/XSLURIResolver.lo
gnu/xml/transform/AttributeNode.lo gnu/xml/transform/CommentNode.lo
gnu/xml/transform/ForEachNode.lo gnu/xml/transform/KeyFunction.lo
gnu/xml/transform/TransformerImpl.lo gnu/xml/transform/WhenNode.lo
gnu/xml/transform/NodeNumberNode.lo gnu/xml/transform/OtherwiseNode.lo
gnu/xml/transform/AbstractNumberNode.lo gnu/xml/transform/TemplateNode.lo
gnu/xml/transform/TransformerOutputProperties.lo
gnu/xml/transform/DOMSourceLocator.lo java/lang/ConcreteProcess.
lo gnu/classpath/Configuration.lo boehm.lo   posix.lo    posix-threads.lo
gmake[3]: execvp: /bin/sh: Argument list too long
gmake[3]: *** [libgcj0_convenience.la] Error 127
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory `/files/pfeifer/OBJ-0222-2045/i386-unknown-freebsd4.
10/libjava'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory
/files/pfeifer/OBJ-0222-2045/i386-unknown-freebsd4.10/libjava'
gmake[1]: *** [all-target-libjava] Error 2
Comment 1 Andrew Pinski 2005-02-22 22:04:37 UTC
Hmm, I would read:
http://gcc.gnu.org/ml/gcc/2004-09/msg01520.html

and make sure that this is still there.
Comment 2 Andrew Pinski 2005-02-22 22:06:09 UTC
I think this was caused by:
2005-02-15  Richard Henderson  <rth@redhat.com>

        * Makefile.am (libgcj_la_SOURCES): Move all sources ...
        (libgcj0_convenience_la_SOURCES): ... here.
        (libgcj_la_LIBADD): Add libgcj0_convenience.la.
        (libgcj_la_DEPENDENCIES): Include libgcj_la_LIBADD.
        * Makefile.in: Regenerate.
Comment 3 Kelley Cook 2005-03-02 21:41:30 UTC
Created attachment 8314 [details]
Proposed fix to bug

This is the proposed patch based on the fix for PR 17222 that rth's patch later
effectively bipassed.  It is still undergoing testing.	I would appreciate some
other testers also as libjava takes many hours to build under cygwin.
Comment 4 CVS Commits 2005-03-05 16:33:31 UTC
Subject: Bug 20155

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2005-03-05 16:33:15

Modified files:
	libjava        : ChangeLog Makefile.am Makefile.in 

Log message:
	2005-03-05  Roger Sayle  <roger@eyesopen.com>
	Alexandre Oliva  <aoliva@redhat.com>
	Kelley Cook  <kcook@gcc.gnu.org>
	
	PR libgcj/20155
	* Makefile.am (libgcj0_convenience.la): New rule to create a file
	of the object files to link to avoid exceeding the command line
	length limits on some platforms.
	(clean-local): Clean up objectlist files.
	* Makefile.in: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3395&r2=1.3396
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.am.diff?cvsroot=gcc&r1=1.455&r2=1.456
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&r1=1.486&r2=1.487

Comment 5 Andrew Pinski 2005-03-05 16:44:23 UTC
Fixed on the mainline at least.
Comment 6 CVS Commits 2005-03-05 17:33:08 UTC
Subject: Bug 20155

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	sayle@gcc.gnu.org	2005-03-05 17:33:00

Modified files:
	libjava        : ChangeLog Makefile.am Makefile.in 

Log message:
	2005-03-05  Roger Sayle  <roger@eyesopen.com>
	Alexandre Oliva  <aoliva@redhat.com>
	Kelley Cook  <kcook@gcc.gnu.org>
	
	PR libgcj/20155
	* Makefile.am (libgcj0_convenience.la): New rule to create a file
	of the object files to link to avoid exceeding the command line
	length limits on some platforms.
	(clean-local): Clean up objectlist files.
	* Makefile.in: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3391.2.1&r2=1.3391.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.am.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.455&r2=1.455.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.485&r2=1.485.2.1

Comment 7 Andrew Pinski 2005-03-05 18:04:41 UTC
Fixed also on the 4.0 branch.  Thanks Roger for picking this one.
Comment 8 CVS Commits 2005-03-06 19:48:25 UTC
Subject: Bug 20155

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2005-03-06 19:48:18

Modified files:
	libjava        : ChangeLog Makefile.am Makefile.in 

Log message:
	PR libgcj/20155
	* Makefile.am (libgcj0_convenience.la): Revert last change.
	* Makefile.in: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3397&r2=1.3398
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.am.diff?cvsroot=gcc&r1=1.456&r2=1.457
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&r1=1.487&r2=1.488

Comment 9 Andrew Pinski 2005-03-06 19:50:53 UTC
The patch had to be reverted.
Comment 10 CVS Commits 2005-03-06 20:15:30 UTC
Subject: Bug 20155

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	sayle@gcc.gnu.org	2005-03-06 20:15:23

Modified files:
	libjava        : ChangeLog Makefile.am Makefile.in 

Log message:
	PR libgcj/20155
	* Makefile.am (libgcj0_convenience.la): Revert last change.
	* Makefile.in: Regenerate.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3391.2.2&r2=1.3391.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.am.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.455.2.1&r2=1.455.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.485.2.1&r2=1.485.2.2

Comment 11 Mark Mitchell 2005-04-05 21:41:46 UTC
Switched component to bootstrap.
Comment 12 Hin-Tak Leung 2005-04-26 02:43:15 UTC
had the same problem with alphaev68-dec-osf5.1 as well.
Comment 13 Hin-Tak Leung 2005-04-26 03:18:13 UTC
on alphaev68-dec-osf5.1, the 

make[3]: execvp: /bin/sh: Arg list too long
make[3]: *** [libgcj0_convenience.la] Error 127
make[3]: Leaving directory
`/home/htl10/gcc-4.x-build-dir/alphaev68-dec-osf5.1a/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/htl10/gcc-4.x-build-dir/alphaev68-dec-osf5.1a/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/htl10/gcc-4.x-build-dir'
make: *** [bootstrap4-lean] Error 2

happens when
/bin/sh ./libtool --tag=GCJ --mode=link ... -o libgcj0_convenience.la ... 
Comment 14 Paolo Bonzini 2005-05-17 14:44:42 UTC
It can be fixed using the per-directory build infrastructure, but .java files
cannot be reliably compiled to the binary-compatibility abi.
Comment 15 Rainer Orth 2005-06-06 23:21:13 UTC
At least on Tru64 UNIX (which is affected as mentioned in Comment #12), this is
fixed on mainline by this patch:

  http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01552.html

So it should probably be backported to the 4.0 branch.
Comment 16 Gerald Pfeifer 2005-06-07 00:37:09 UTC
Confirmed.  Also on FreeBSD this has been fixed on mainline, so I'm removing
the 4.1 tag from the summary.

Having a backport to 4.0 would be great.
Comment 17 Paolo Bonzini 2005-07-14 08:55:41 UTC
Adding Mark so that he can judge the opportunity of a backport.

Removing bug 21624 dependency, because it is indeed fixed on mainline.  If bug
21624 were fixed the command line could be even shorter, but the current
situation on mainline is enough.
Comment 18 Mark Mitchell 2005-07-15 00:30:48 UTC
Subject: Re:  [4.0 Regression] libgcj build fails with
 "execvp: /bin/sh: Argument list too long"

bonzini at gcc dot gnu dot org wrote:
> ------- Additional Comments From bonzini at gcc dot gnu dot org  2005-07-14 08:55 -------
> Adding Mark so that he can judge the opportunity of a backport.
> 
> Removing bug 21624 dependency, because it is indeed fixed on mainline.  If bug
> 21624 were fixed the command line could be even shorter, but the current
> situation on mainline is enough.

I think it would be good to backport this patch, as bootstrap breakage 
is obviously severe.  However, I wouldn't want to force the Java people 
to do something they don't think is safe.  As long as the Java people 
are comfortable with the backport, it's fine by me.

Comment 19 Paolo Bonzini 2005-08-08 17:00:48 UTC
Andrew, is a backport fine with you?
Comment 20 Andrew Haley 2005-08-08 17:03:01 UTC
Subject: Re:  [4.0 Regression] libgcj build fails with "execvp: /bin/sh: Argument list too long"

bonzini at gcc dot gnu dot org writes:
 > 
 > Andrew, is a backport fine with you?

Yes.  Go for it.

Andrew.
Comment 21 Paolo Bonzini 2005-08-17 12:56:53 UTC
Committing to 4.0 branch.
Comment 22 Andrew Pinski 2005-08-17 14:56:37 UTC
Fixed.