This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Problem with 'sh' while archiving libc_pic.a
- To: "Koundinya.K" <kk at ddeorg dot soft dot net>
- Subject: Re: Problem with 'sh' while archiving libc_pic.a
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Tue, 13 Jun 2000 22:51:40 -0700 (PDT)
- cc: libc-alpha at sourceware dot cygnus dot com
On Wed, 14 Jun 2000, Koundinya.K wrote:
[snip]
> /bin/sh: /opt/devtools/mips-dde-sysv4.2MP/bin/ar: Arg list too long
[snip]
> I suspected that this problem could be with 'sh'. On my system 'sh' is 'bash'
> like linux systems. using the native 'sh' also did not solve the problem. I
> tried to look into sources of ar. But got no hints in that too. I am able to
> selectively archive the files.
>
> Have anyone faced any such problem ?. Is thre any other workaround ??
You seem to be running into an *operating system kernel* limitation on the
amount of argument and environment information that can be passed from a parent
to a child. In Linux, this limit is generous; more so that on many other
operating systems, something like 128 kilobytes. On some systems it is
as low as a few kilobytes, from what I recall. Thus a build procedure
that works fine on Linux might break elsewhere.
The xargs utility can assist in breaking up large command lines.
A large archive construction job can be broken down into smaller jobs, because
you can add files to an archive; some reasonable hack using xargs to construct
the individual ar commands should do the trick.