[Scons-users] Unexpected messge with configure

Bill Deegan bill at baddogconsulting.com
Fri Sep 7 13:28:53 EDT 2018


Jason,

I'd say it's not a known issue, it's expected behavior.
See the docstring for the exception in question.

What do you think SCons should do in this case?
The dry run would likely be affected by the results of any configure checks
which might write a file or run a process (both things which scons is not
supposed to do with --dry-run), so it's likely not possible to do a dry-run
with configure checks which write to the filesystem?

-Bill

class ConfigureDryRunError(SConfError):
"""Raised when a file or directory needs to be updated during a Configure
process, but the user requested a dry-run"""
def __init__(self,target):
if not isinstance(target, SCons.Node.FS.File):
msg = 'Cannot create configure directory "%s" within a dry-run.' % str
(target)
else:
msg = 'Cannot update configure test "%s" within a dry-run.' % str(target)
SConfError.__init__(self,msg)


On Fri, Sep 7, 2018 at 1:20 PM Bill Deegan <bill at baddogconsulting.com>
wrote:

> Mats,
>
> How long does:
> scons --help non-existant-target
> Take?
>
> -Bill
>
> On Fri, Sep 7, 2018 at 12:26 PM Mats Wichmann <mats at wichmann.us> wrote:
>
>> On 09/07/2018 09:55 AM, Jason Kenny wrote:
>> > I was adding some configure logic to a build I am working on. When
>> doing a dry run i now get this error:
>> >
>> > scons: *** Cannot update configure test ".sconf_temp/conftest_0" within
>> a dry-run.
>> > File "./../scons-3.0.1/SCons/Script/SConscript.py", line 614, in
>> __call__
>> >
>> > Is this a known issue with using configure in scons?
>>
>> I've run into it (you'll find my name on such questions in the mailing
>> list archive, afair).
>>
>> When you stop and think about it, running a configure test which means
>> compiling code sort of doesn't fit the definition of "dry run", though.
>>
>> this is a gray area to my way of thinking.  steps like cleaning, getting
>> help, and doing a dry-run are places where you don't want external work
>> to happen, just have scons go through the rules.  but sometimes you
>> don't know what all the dependencies actually are before you've run some
>> of those steps.
>>
>> we'll wait for the actual experts to pipe up :)
>>
>> ======
>> Aside:
>> on the project I'm trying to gradually bend into shape (it had lived for
>> a couple of years before I came around), which uses a variant directory
>> build, starting with the variant directory completely absent, "scons
>> --help" takes seven seconds, and leaves a variant directory with 12
>> object files and four libraries built. I *KNOW* that's wrong, but I
>> haven't yet figured out how to fix it without either breaking
>> everything, or special-casing stuff all over the place like
>>
>> if not env.GetOption('help') and not env.GetOption('clean'):
>>
>> guess we could put GetOption('dry-run') in that list too (would we have
>> to include all of the variants of that name? -n, --no-exec,
>> --just-print, --dry-run, --recon)
>>
>> with 200+ sconscripts, adding those cases is not appealing.
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180907/1e0418fe/attachment.html>


More information about the Scons-users mailing list