[Scons-users] TryRun with CacheDir crashes on Python 3
Bill Deegan
bill at baddogconsulting.com
Tue Jun 26 11:37:00 EDT 2018
Can you rerun with --debug=stacktrace and post.
On Tue, Jun 26, 2018 at 4:36 AM, Hector Martin 'marcan' <marcan at marcan.st>
wrote:
> Minimal reproducer:
>
> =========================
> CacheDir('objects')
>
> env = Environment()
>
> def CompilerCheck(context):
> context.Message("Checking for a working C compiler ")
> ret = context.TryRun("int a;\n", '.c' )[0]
> context.Result(ret)
> if ret == 0:
> return False
>
> conf = Configure(Environment(),
> custom_tests = {"CompilerCheck" : CompilerCheck})
>
> conf.CompilerCheck()
> =========================
>
> Output:
> scons: Reading SConscript files ...
> Checking for a working C compiler TypeError : sequence item 0: expected
> str instance, bytes found
>
> I traced it down with a bunch of prints. The crash is in
> Node.FS.File.get_cachedir_bsig. sigs ends up looking like this:
>
> [b'int a;\n', '79ff7357d2d39b785bcdf4305604fa0c',
> '.sconf_temp/conftest_0.c']
>
> And Util.MD5collect cannot deal with the mixed bytes/str. Not sure what
> the right fix is here; either everything has to be str or bytes, or
> MD5collect needs to automatically convert when necessary.
>
> SCons by Steven Knight et al.:
> script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
> 2017/11/14 13:16:53, by bdbaddog on hpmicrodog
> engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
> 2017/11/14 13:16:53, by bdbaddog on hpmicrodog
> engine path: ['/usr/lib64/python3.5/site-packages/SCons']
> Copyright (c) 2001 - 2017 The SCons Foundation
>
> --
> Hector Martin "marcan" (marcan at marcan.st)
> Public Key: https://mrcn.st/pub
> _______________________________________________
> 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/20180626/7b9bc695/attachment.html>
More information about the Scons-users
mailing list