[Scons-dev] Supefluous tempfiles used for DLLs

Kenny, Jason L jason.l.kenny at intel.com
Thu Jul 5 18:16:18 EDT 2012


This is caused by a quirk in the how actions work internally in SCons. The quick answer to why two are created is because on file is created from the Scons doing the actions, and one is created in printing out the subst()ed actions value to the screen. This lead to a bug in which the a temp file was created but never used and left of the system, which would lead to in automated build millions of small temp files laying around in the user systems. I believe this was patched in SCons 2.1 so that only one temp file is created and used.

Jason

From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of Kyle J Strand
Sent: Thursday, July 05, 2012 5:05 PM
To: scons-dev at scons.org
Subject: [Scons-dev] Supefluous tempfiles used for DLLs

It appears to me that whenever SCons builds DLL using a link command that exceeds the length of $MAXLINELENGTH, it makes a tempfile and uses it to perform the link command as expected, but then makes a second tempfile with the exact same content that never gets used. Here's sample output:

Using tempfile c:\users\kjstrand\appdata\local\temp\tmpnrlhqp.lnk for command line:
cl /Fobuild\test.obj /c src\test.cpp /TP /nologo /DLIB_PACK_EXPORT
cl @c:\users\kjstrand\appdata\local\temp\tmpnrlhqp.lnk
Using tempfile c:\users\kjstrand\appdata\local\temp\tmpzj9cph.lnk for command line:
cl /Fobuild\test.obj /c src\test.cpp /TP /nologo /DLIB_PACK_EXPORT

The second tempfile, tmpzj9cph.lnk in this case, appears nowhere else in the output for this run. This is the behavior I observe for every DLL build using a tempfile. Oddly enough, though, I don't observe this when static libs are built. Is this actually a bug, or does SCons actually need that second tempfile for some reason? Of course, this doesn't seem like a hugely important bug, but I figured it would be worth asking about.

-----------------------------------------------------------------------
Kyle Strand, Software Intern
Beckman Coulter, Inc., Life Sciences Division
4862 Innovation Drive, Fort Collins, Colorado, 80525
(970) 204-7036

The server made the following annotations
---------------------------------------------------------------------------------

This message contains information that may be privileged or confidential and is the property of Beckman Coulter, Inc. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20120705/eb367eba/attachment.html>


More information about the Scons-dev mailing list