[Scons-users] [Solved] (+comments) Re: Mingw , long lines in link.
    Jos De Laender 
    jos at de-laender.be
       
    Tue Feb 12 11:18:05 EST 2013
    
    
  
Dear all,
I could take also this hurdle, but it leaves me with some mixed feelings ...
1. To get the MAXLINELENGTH effective and having the link done via a 
response file, one actually has to add :
|env['LINKCOM'] = '${TEMPFILE("%s")}' % (env['LINKCOM'])|
Not a big deal if you know it, but I don't understand why this isn't 
there per default anyway.
It would act according to the documentation then ;)
Also, it turns out that if the MAXLINELENGTH is not reached, the detour 
via the response file isn't done, so having it always there doesn't 
hurt, does it ?
Or maybe there are performance reasons behind ?
In any case, this should be more clearly documented in my opinion.
2. Even when doing so, I still got issues, but that's due to my MSYS 
(Bill called it cross/cross :)).
In the TempFileMungeClass (luckily the scons design allows me to do this 
with a local copy and redefining env['TEMPFILE']) following commented 
with JDLA needs to be added (for msys, not sure if it would hurt in 
other cases) :
    prefix = env.subst('$TEMPFILEPREFIX')
     if not prefix:
       prefix = '@'
     # JDLA , Another round of escapes for win32, which is in msys in 
our case.
     if sys.platform in ['win32'] :
       for i,ptCmd in enumerate(cmd) :
         cmd[i] = ptCmd.replace('\\','\\\\')
     args = list(map(SCons.Subst.quote_spaces, cmd[1:]))
     os.write(fd, " ".join(args) + "\n")
     os.close(fd)
Jos
Op 11-02-13 17:11, Jos De Laender schreef:
> Gents,
>
> Again I must be missing something utterly simple , but stuck ...
>
> My link command under mingw is too long.
> (well, at least that's what I guess, it fails without any further 
> output of the linking step, and replicating the command in a command 
> window shows that it is too long)
> The manual says me that MAXLINELENGTH is the one that determines the 
> max length before a temp file is used.
> But I see no use of a temp file ..
> Also, based on grepping, I would think that 
> 'scons-local-2.2.0/SCons/Platform/__init__.py' is the place where this 
> happens, but the code there seems never called.
> Somewhere I must be terribly wrong ... someone can shed some light ?
>
-- 
Jos De Laender
www.jodela.be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130212/136acc1f/attachment.html>
    
    
More information about the Scons-users
mailing list