[Top][All Lists]

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

Re: arg list too long (so, split it into two?)

From: Robert Boehne
Subject: Re: arg list too long (so, split it into two?)
Date: Fri, 06 Oct 2000 12:44:38 -0500

Morten Eriksen wrote:
> Robert Boehne <address@hidden> writes:
> > I have a large library that IRIX CC w/ multi-language libtool is not
> > happy creating.  It seems that the link line is too much for CC to
> > handle.
> Sounds familiar.. :^(
> > Is the only solution to split this library into convience
> > libs, then link those toghether?
> I don't think this will help, as any convenience .a-libs will get
> extracted into their object-files before the final linking -- IIRC.

Morten, you were right about that.  I split the library into a noinst_
and the original (with half the source files each) but that did not
help at all.  This method also attempts to link in a shared version
of the noinst_ library, which isn't what I wanted or expected.

> Two strategies that have worked for us are:
>         * change the IRIX-setting for the maximum size of the argument
>           list. To do this, log in as root, run ``systune -i'' and set
>           the ``ncargs'' variable large enough (I think the default is
>           20kB -- trying doubling until you don't get the problem).
>           This fix will only work on the machines where you go through
>           this routine, of course. And only for the current boot. (To
>           make the change permanent for an IRIX-installation, execute
>           ``mv /unix.install /unix'' (but don't blame me if something
>           goes wrong).)
>         * make larger and fewer object-files, by using some small
>           number of sourcefiles to include the "real" sourcefiles by
>           "#include" statements, and compile and link these instead.

In this project I'm attempting to add Automake and Libtool use to
an existing package, I don't want to re-arrange the source, and I don't
want to split any libraries.  The way this package was currently
compiled was via csh scripts with explicit commands for creating each
and every one of 14,000 object files.  Linking was done on some
by using a linker input file, a common way for vendors to get around
the limitations in their own shell.  These files vary in format and in
the arguments that use them, so I think it would be quite some work
to get libtool to use this method.  Has anyone tried this before?

Unfortunately, changing the kernel parameters with systune obviously
won't help the users who are attempting to build this project, and
as you pointed out, won't fix those platforms that can't adjust, and
AIX can't use a linker input file either. (Ouch!)

Another solution is to generate archive files.  Objects can be added
one at a time to an archive file, then a shared library can be made
from a single archive file in a very short command line.
I imagine I can hack my to do this, but can anyone think
of a cleaner solution, one that could be supported inside Libtool?
I'd be willing to write it...

Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden

reply via email to

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