[Scons-dev] unhashable type: 'Literal'' trying to evaluate

Jason Kenny dragon512 at live.com
Thu Oct 25 13:11:48 EDT 2018


Not yet... Let me look

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Scons-dev <scons-dev-bounces at scons.org> on behalf of Bill Deegan <bill at baddogconsulting.com>
Sent: Thursday, October 25, 2018 11:45:02 AM
To: SCons developer list
Subject: Re: [Scons-dev] unhashable type: 'Literal'' trying to evaluate

Have you tried the code on master?
There have been some py3 related issues similar to this resolved.
-Bill

On Thu, Oct 25, 2018 at 8:52 AM Jason Kenny <dragon512 at live.com<mailto:dragon512 at live.com>> wrote:
Hi,

I working on getting Parts to work on py3. I think I have most of it working at this point, however I had an error that concerned me:

scons: *** [_build/build_debug_posix-x86_64/hello/hello] TypeError `unhashable type: 'Literal'' trying to evaluate `${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'

This happens as I tweak the RPATH value with some code like this:

rlst.append(self.env.Literal('{0}$$ORIGIN/{1}{0}'.format(quote, self.env.Dir('$INSTALL_BIN').rel_path(
                self.env.Dir('$INSTALL_LIB')))))

should result in a value such as:
["'$$ORIGIN/../lib'"]

This works if I subst() directly at this point. However I am getting a stack ( below as it is long) like this which suggests some new behavior? This code should be fine and should not have broken. There is no funny stuff here in parts.. it a very basic value being set.

Do we know of an issues with Literal() in python 3?

meantime I going to start debugging this "fun" code

- Jason

The stack...

scons: internal stack trace:
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Job.py", line 199, in start
    task.prepare()
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Script/Main.py", line 175, in prepare
    return SCons.Taskmaster.OutOfDateTask.prepare(self)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Taskmaster.py", line 179, in prepare
    self.exception_raise()
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Taskmaster.py", line 554, in _exception_raise
    exec("raise exc_value.with_traceback(exc_traceback)")
  File "<string>", line 1, in <module>
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Taskmaster.py", line 973, in next_task
    task.make_ready()
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Script/Main.py", line 309, in make_ready
    SCons.Taskmaster.OutOfDateTask.make_ready(self)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Taskmaster.py", line 409, in make_ready_current
    t.disambiguate().make_ready()
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Node/FS.py", line 3055, in make_ready
    self.get_binfo()
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Node/__init__.py", line 1136, in get_binfo
    binfo.bactsig = SCons.Util.MD5signature(executor.get_contents())
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Executor.py", line 467, in get_contents
    for action in action_list])
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Executor.py", line 467, in <listcomp>
    for action in action_list])
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 535, in get_contents
    result = self.get_presig(target, source, env)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 1112, in get_presig
    return c.get_presig(self, target, source, env)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 1049, in get_presig
    return self._generate(target, source, env, 1, executor).get_presig(target, source, env)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 1271, in get_presig
    return b"".join([bytes(x.get_contents(target, source, env)) for x in self.list])
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 1271, in <listcomp>
    return b"".join([bytes(x.get_contents(target, source, env)) for x in self.list])
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 535, in get_contents
    result = self.get_presig(target, source, env)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Action.py", line 964, in get_presig
    return env.subst_target_source(cmd, SUBST_SIG, target, source)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Environment.py", line 514, in subst
    return SCons.Subst.scons_subst(string, self, raw, target, source, gvars, lvars, conv)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 569, in scons_subst
    result = ss.substitute(strSubst, lvars)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 523, in substitute
    result = _dollar_exps.sub(sub_match, args)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 522, in sub_match
    return self.conv(self.expand(match.group(1), lvars))
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 488, in expand
    return self.substitute(s, lv)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 523, in substitute
    result = _dollar_exps.sub(sub_match, args)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 522, in sub_match
    return self.conv(self.expand(match.group(1), lvars))
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 488, in expand
    return self.substitute(s, lv)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 523, in substitute
    result = _dollar_exps.sub(sub_match, args)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 522, in sub_match
    return self.conv(self.expand(match.group(1), lvars))
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 462, in expand
    raise_exception(e, lvars['TARGETS'], s)
  File "/home/jkenny/.local/share/virtualenvs/parts-aMB9Fa3Q/lib/python3.6/site-packages/scons-3.0.1/SCons/Subst.py", line 55, in raise_exception
    raise SCons.Errors.BuildError(target[0], msg)

_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org<mailto:Scons-dev at scons.org>
https://pairlist2.pair.net/mailman/listinfo/scons-dev<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist2.pair.net%2Fmailman%2Flistinfo%2Fscons-dev&data=02%7C01%7C%7C77b803c9ec8a455309e308d63a9a6a21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636760832206286044&sdata=SbGIW53klZlZQZNRlf7%2FBJp2lVaMoD9KukCYZFLegjg%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20181025/d95db37c/attachment.html>


More information about the Scons-dev mailing list