libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Increase "Safety factor" when ARG_MAX is less than 40KB.


From: Ralf Wildenhues
Subject: Re: [PATCH] Increase "Safety factor" when ARG_MAX is less than 40KB.
Date: Wed, 3 Sep 2008 07:01:33 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* Peter O'Gorman wrote on Tue, Sep 02, 2008 at 08:00:31PM CEST:
> 
> It hit the error with ARG_MAX at 20K, max_cmd_len at 15K, and
> confusingly, it hit it doing the ld -r (so no driver overhead). The same
> ld -r command worked fine outside of libtool, but failed consistently
> when libtool attempted it.

This is a bit what I feared.  It means we would do well to analyze
better, in case we have an environment hog somewhere.  What's the
command line length of the ld -r in question?  There's no link-time
optimization involved (which could call the compiler), right?  Still,
ld could be calling some other process, even if it seems unlikely.
What's `env | wc' on this system for you?
Does the package in question use Automake?

> I did not think to look at the environment,
> and we have since rebuilt the kernel with large_ncargs_enabled (so new
> ARG_MAX is 200K), so can not reproduce.

Well you /could/ use an ld wrapper just to find out environment size
discrepancies.

#! /bin/sh
real_ld=/usr/ccs/bin/ld
echo env: `env | wc -c`
echo cmd: `echo "$real_ld $*" | wc -c`
exec $real_ld "$@"
exit 1

Thanks,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]