scons does not run

  • Done
  • quality assurance status badge
Details
2 participants
  • Luther Thompson
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Luther Thompson
Severity
normal
L
L
Luther Thompson wrote on 28 Jan 2019 19:42
(address . bug-guix@gnu.org)
20190128134210.002ead1f@gmail.com
scons refuses to run on my system. When I run it with or without a
SConscript file, I get this error message:

---BEGIN---
Traceback (most recent call last):
File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/bin/.scons-real", line 192, in <module>
import SCons.Script
File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/__init__.py", line 43, in <module>
import SCons.compat
File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/compat/__init__.py", line 105, in <module>
rename_module('profile', 'cProfile')
File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/compat/__init__.py", line 84, in rename_module
sys.modules[new] = imp.load_module(old, *imp.find_module(old))
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 838, in get_code
TypeError: a bytes-like object is required, not 'str'
---END---

I have a hunch that this is caused by a missing environment variable,
but I don't know where to go from there.

Luther
R
R
Ricardo Wurmus wrote on 28 Jan 2019 20:11
(name . Luther Thompson)(address . lutheroto@gmail.com)(address . 34236-done@debbugs.gnu.org)
87ef8wr40m.fsf@elephly.net
Luther Thompson <lutheroto@gmail.com> writes:

Toggle quote (3 lines)
> scons refuses to run on my system. When I run it with or without a
> SConscript file, I get this error message:[…]

This should now be fixed with commit ad34338d1.

--
Ricardo
Closed
L
L
Luther Thompson wrote on 29 Jan 2019 01:03
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 34236-done@debbugs.gnu.org)
20190128190322.672305da@gmail.com
On Mon, 28 Jan 2019 20:11:37 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:

Toggle quote (7 lines)
> Luther Thompson <lutheroto@gmail.com> writes:
>
> > scons refuses to run on my system. When I run it with or without a
> > SConscript file, I get this error message:[…]
>
> This should now be fixed with commit ad34338d1.

I'm still getting errors similar to before. When I use an empty
SConscript, I get this output:

---BEGIN---
scons: Reading SConscript files ...
scons: done reading SConscript files.
TypeError: a bytes-like object is required, not 'str':
File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
line 1374: _exec_main(parser, values) File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
line 1337: _main(parser) File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
line 1103: platform = SCons.Platform.platform_module() File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
line 107: mod = imp.load_module(full_name, file, path, desc) File
"/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
line 235: return load_source(name, filename, file) File
"/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
line 172: module = _load(spec) File "<frozen importlib._bootstrap>",
line 696:
File "<frozen importlib._bootstrap>", line 677:
File "<frozen importlib._bootstrap_external>", line 724:
File "<frozen importlib._bootstrap_external>", line 838:
---END---

If I add only the statement `Environment()` to the SConscript, I get
this output:

---BEGIN---
scons: Reading SConscript files ...
TypeError: a bytes-like object is required, not 'str':
File "/home/luther/test/SConstruct", line 1:
Environment()
File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Environment.py",
line 939: platform = SCons.Platform.Platform() File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
line 263: module = platform_module(name) File
"/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
line 107: mod = imp.load_module(full_name, file, path, desc) File
"/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
line 235: return load_source(name, filename, file) File
"/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
line 172: module = _load(spec) File "<frozen importlib._bootstrap>",
line 696:
File "<frozen importlib._bootstrap>", line 677:
File "<frozen importlib._bootstrap_external>", line 724:
File "<frozen importlib._bootstrap_external>", line 838:
---END---

When I run scons without a SConscript, I get the normal "No SConstruct
file found" message.

I've already tried rebooting.

Luther
Closed
R
R
Ricardo Wurmus wrote on 28 Jan 2019 20:06
(name . Luther Thompson)(address . lutheroto@gmail.com)(address . 34236@debbugs.gnu.org)
87fttcr48u.fsf@elephly.net
Hi Luther,

Toggle quote (27 lines)
> scons refuses to run on my system. When I run it with or without a
> SConscript file, I get this error message:
>
> ---BEGIN---
> Traceback (most recent call last):
> File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/bin/.scons-real", line 192, in <module>
> import SCons.Script
> File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/__init__.py", line 43, in <module>
> import SCons.compat
> File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/compat/__init__.py", line 105, in <module>
> rename_module('profile', 'cProfile')
> File "/gnu/store/r7nxidk4r12wa3y7gipqx58gc3dx3vp2-scons-3.0.1/lib/scons-3.0.1/SCons/compat/__init__.py", line 84, in rename_module
> sys.modules[new] = imp.load_module(old, *imp.find_module(old))
> File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 235, in load_module
> return load_source(name, filename, file)
> File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 172, in load_source
> module = _load(spec)
> File "<frozen importlib._bootstrap>", line 696, in _load
> File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 724, in exec_module
> File "<frozen importlib._bootstrap_external>", line 838, in get_code
> TypeError: a bytes-like object is required, not 'str'
> ---END---
>
> I have a hunch that this is caused by a missing environment variable,
> but I don't know where to go from there.

I’m currently working on upgrading Scons. I patched Scons to avoid this
error.

--
Ricardo
R
R
Ricardo Wurmus wrote on 29 Jan 2019 09:35
(name . Luther Thompson)(address . lutheroto@gmail.com)(address . 34236-done@debbugs.gnu.org)
87a7jjrhdk.fsf@elephly.net
Hi Luther,

Toggle quote (70 lines)
> On Mon, 28 Jan 2019 20:11:37 +0100
> Ricardo Wurmus <rekado@elephly.net> wrote:
>
>> Luther Thompson <lutheroto@gmail.com> writes:
>>
>> > scons refuses to run on my system. When I run it with or without a
>> > SConscript file, I get this error message:[…]
>>
>> This should now be fixed with commit ad34338d1.
>
> I'm still getting errors similar to before. When I use an empty
> SConscript, I get this output:
>
> ---BEGIN---
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> TypeError: a bytes-like object is required, not 'str':
> File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
> line 1374: _exec_main(parser, values) File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
> line 1337: _main(parser) File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py",
> line 1103: platform = SCons.Platform.platform_module() File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
> line 107: mod = imp.load_module(full_name, file, path, desc) File
> "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
> line 235: return load_source(name, filename, file) File
> "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
> line 172: module = _load(spec) File "<frozen importlib._bootstrap>",
> line 696:
> File "<frozen importlib._bootstrap>", line 677:
>
> File "<frozen importlib._bootstrap_external>", line 724:
>
> File "<frozen importlib._bootstrap_external>", line 838:
> ---END---
>
> If I add only the statement `Environment()` to the SConscript, I get
> this output:
>
> ---BEGIN---
> scons: Reading SConscript files ...
> TypeError: a bytes-like object is required, not 'str':
> File "/home/luther/test/SConstruct", line 1:
> Environment()
> File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Environment.py",
> line 939: platform = SCons.Platform.Platform() File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
> line 263: module = platform_module(name) File
> "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py",
> line 107: mod = imp.load_module(full_name, file, path, desc) File
> "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
> line 235: return load_source(name, filename, file) File
> "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py",
> line 172: module = _load(spec) File "<frozen importlib._bootstrap>",
> line 696:
> File "<frozen importlib._bootstrap>", line 677:
>
> File "<frozen importlib._bootstrap_external>", line 724:
>
> File "<frozen importlib._bootstrap_external>", line 838:
> ---END---
>
> When I run scons without a SConscript, I get the normal "No SConstruct
> file found" message.
>
> I've already tried rebooting.

I guess we’ll also need to patch “lib/scons/SCons/Platform/__init__.py”
in the same manner then.

Could you tell me how I should run scons to reproduce this issue? (I
don’t know anything about scons.)

--
Ricardo
Closed
L
L
Luther Thompson wrote on 29 Jan 2019 19:02
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 34236-done@debbugs.gnu.org)
20190129130256.6b335652@gmail.com
On Tue, 29 Jan 2019 09:35:19 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:
Toggle quote (6 lines)
> I guess we’ll also need to patch
> “lib/scons/SCons/Platform/__init__.py” in the same manner then.
>
> Could you tell me how I should run scons to reproduce this issue? (I
> don’t know anything about scons.)

Sure. I'll post the commands along with the output I posted before.
Note that `Environment` is a fundamental function that gets called in
just about every SConstruct file.

---BEGIN---
$ mkdir emptydirectory
mkdir: created directory 'emptydirectory'
$ cd emptydirectory/
$ touch SConstruct
$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
TypeError: a bytes-like object is required, not 'str':
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py", line 1374:
_exec_main(parser, values)
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py", line 1337:
_main(parser)
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Script/Main.py", line 1103:
platform = SCons.Platform.platform_module()
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py", line 107:
mod = imp.load_module(full_name, file, path, desc)
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 235:
return load_source(name, filename, file)
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 172:
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696:
File "<frozen importlib._bootstrap>", line 677:
File "<frozen importlib._bootstrap_external>", line 724:
File "<frozen importlib._bootstrap_external>", line 838:
$ echo 'Environment()' > SConstruct
$ scons
scons: Reading SConscript files ...
TypeError: a bytes-like object is required, not 'str':
File "/home/luther/emptydirectory/SConstruct", line 1:
Environment()
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Environment.py", line 939:
platform = SCons.Platform.Platform()
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py", line 263:
module = platform_module(name)
File "/gnu/store/z5r8ka0g4iib73pr2zvkhglclzh4azp0-scons-3.0.3/lib/scons/SCons/Platform/__init__.py", line 107:
mod = imp.load_module(full_name, file, path, desc)
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 235:
return load_source(name, filename, file)
File "/gnu/store/ibxxisi81v1v3y5xc3axl4x4rx6jpzw8-python-3.7.0/lib/python3.7/imp.py", line 172:
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696:
File "<frozen importlib._bootstrap>", line 677:
File "<frozen importlib._bootstrap_external>", line 724:
File "<frozen importlib._bootstrap_external>", line 838:
---END---

Luther
Closed
?