[mercury-users] too long argument lists constructed by mmc --make

Ben Schmidt b.schmidt at ugrad.unimelb.edu.au
Fri Jan 12 14:24:43 AEDT 2007


A couple of possible workarounds...

1. Don't build using the 'Mercury' subdirectory. All the paths will be 
shorter then, though your workspace will be messier.

2. Isolate part of your application to build as a library (or a number 
of libraries) then link the libraries together to form the executable. 
Each individual link or archive command would be shorter, but more 
objects can end up in the final output.

3. Don't use Windows...

I'm not sure a more robust solution would be possible unless gcc or ld 
support an -objectlist option which could read a list of objects from a 
file (and if gcc supports it, it would also need to pass the list of 
objects to the linker the same way in order for it to work). I think 
cygwin libtool supports such an option, but not sure that ld or gcc do, 
and without having a PC with cygwin installed, I can't investigate 
further now.

Cheers,

Ben.



Peter Ross wrote:
> One of my fellow mc'ians had the following problem, is there any easy
> work around?
> 
> Our problem is that we make heavy use of nested modules and hence have
> very long file names.
> 
> I have just added a few instances to the navigation, which had the
> effect of adding a few new mercury file.
> 
> When linking, I got this:
> 
> ** Error making 
> `Mercury/asm_fast.gc.decldebug/i686-pc-cygwin/Mercury/exes/loans
> _tcp_server.exe'.
> gcc: installation problem, cannot exec 
> '/usr/lib/gcc/i686-pc-cygwin/3.4.4/collec
> t2.exe': Argument list too long
> make: *** [loans_tcp_server] Error 1
> 
> The problem is the list of .o's that is getting way too big!
> 
> I just changed grade to have a shorter grade name (then path to .o's
> is shorter) and that worked!
> 
> 
> We need to find a way around that problem!



--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list