Bug 869

Summary: CVS glibc fails to install if build root PWD too long
Product: glibc Reporter: Martin Schlemmer <azarah>
Component: libcAssignee: GOTO Masanori <gotom>
Status: VERIFIED FIXED    
Severity: normal CC: glibc-bugs
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: 5090_all_stubs-rule-fix.patch

Description Martin Schlemmer 2005-04-24 14:08:21 UTC
When you install recent cvs snapshots, and the `pwd` of your build directory is
fairly long, you get something similar to:

----
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/branred.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/doasin.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/dosincos.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/halfulp.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mpa.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mpatan2.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mpatan.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mpexp.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mplog.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mpsqrt.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/mptan.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/sincos32.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/slowexp.os
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/slowpow.os
| \
gawk '/\.gnu\.glibc-stub\./ { \
          sub(/\.gnu\.glibc-stub\./, "", $2); \
          stubs[$2] = 1; } \
        END { for (s in stubs) print "#define __stub_" s }' >
/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/stubsT
make[2]: execvp: /bin/sh: Argument list too long
make[2]: ***
[/var/tmp/portage/glibc-2.3.5.20050418/work/build-x86-x86_64-pc-linux-gnu-nptl/math/stubs]
Error 127
make[2]: Leaving directory
`/var/tmp/portage/glibc-2.3.5.20050418/work/glibc-20050418/math'
make[1]: *** [math/subdir_install] Error 2
make[1]: Leaving directory
`/var/tmp/portage/glibc-2.3.5.20050418/work/glibc-20050418'
make: *** [install] Error 2 
----
Comment 1 Martin Schlemmer 2005-04-24 14:11:28 UTC
Created attachment 462 [details]
5090_all_stubs-rule-fix.patch

I did mail this to glibc-alpha, but no response.  The echo is just for status
as
it takes a while in math/ for instance, but can be removed.  I am not sure what

the policy on echoing all commands are, so made some of the rm's silent to not
clutter things too much.  Comments/flames welcome.
Comment 2 Sourceware Commits 2005-07-19 03:54:59 UTC
Subject: Bug 869

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2005-07-19 03:54:55

Modified files:
	.              : Makerules 

Log message:
	2005-07-18  Roland McGrath  <roland@redhat.com>
	
	[BZ #869]
	* Makerules ($(objpfx)stubs): Do cd into $(objdir) to reduce size of
	objdump command line.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/Makerules.diff?cvsroot=glibc&r1=1.430&r2=1.431

Comment 3 Roland McGrath 2005-07-19 03:55:42 UTC
I put in a different change.
Comment 4 Sourceware Commits 2005-07-22 07:10:22 UTC
Subject: Bug 869

CVSROOT:	/cvs/glibc
Module name:	libc
Changes by:	roland@sources.redhat.com	2005-07-22 07:09:59

Modified files:
	.              : Makerules 

Log message:
	2005-07-22  Roland McGrath  <roland@redhat.com>
	
	[BZ #869]
	* Makerules ($(objpfx)stubs): Fix last change.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/Makerules.diff?cvsroot=glibc&r1=1.431&r2=1.432

Comment 5 Martin Schlemmer 2005-08-02 19:28:41 UTC
Tested and works fine, thanks.