View Single Post

   
  #9 (permalink)  
Old 01-04-2008, 08:50 PM
yim
 
Posts: n/a
Default Re: /usr/vacpp/bin/xlC: Arg list too long

First of all, I would like to thank you for you all to help me to resolve
this difficult problem.

Please see my reponse below.
Sakun



"Gary R. Hook" <nospam@nospammers.net> wrote in message
news:ZWNrb.2940$L17.1163199503@newssvr30.news.prod igy.com...
> Mike wrote:
> > In article <3faf6558$0$27586$626a54ce@news.free.fr>, yim wrote:
> >
> > The old way to solve cyclic dependencies(?) is with lorder and tsort.
> > Seems we would do something like:
> >
> > ar -c libPROJ.a `lorder *.o | tsort`

>
> AIX does not require the use of lorder. The linker reads
> every symbol in every named object file (including archive
> members) and makes them all available during the link
> operation. Perhaps the term "cyclic dependencies" implies
> some other problem?


Well, my work is part of a very big project. We have around 1000 C/C++
files. Among these files
there are 317 generated C files. When I tried to link all files, I got "Arg
list too long".
I decided so to create an archive including the 317 generated files but got
an error due to "pmaker"
(it is imposed to use pmaker. I cannot even control how it is called as it
is part of a big project --
I need just to list the files to compile). I don't know exactly why this
error happened.
After searching unsuccesfully for the info related to AIX, I decided to
create 4 archives for
the generated files (the first 3, let's say lib1.a, lib2.a and lib3.a,
contains 100 files each and the
last one, lib4.a, 17). But at link, it said that function F1 used in lib2.a
is not found. F1 is in
lib1.a and it can used a function in the other archives (that's why I said
"cyclic dependencies").

Now I try to put every archive twice as the following and I am able to
link.

LINK_LINE = \
..... \
lib1.a \
lib2.a \
lib3.a \
lib4.a \
lib1.a \
lib2.a \
lib3.a \
lib4.a \
.....


> Did you try the ld -r approach?


No, I will try !


> All
> this does is combine .o files into a summary .o, which can
> then be used in the final link. If the issue is C++
> static constructors, you may need to add -qtwolink to your
> final command line.
>
> In any event, I think more detail would be useful.
>
> --
> Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE
> __________________________________________________ ______________________
>



Reply With Quote