[Scons-users] scons 3.0.1: 'ascii' codec can't decode
mpac1234 at will-hier-weg.de
mpac1234 at will-hier-weg.de
Wed Nov 29 03:19:05 EST 2017
Hi Bill,
thanks for your reply, this is the content of the 'main.cpp' as printed by 'cat -v'
-------------------------------
cat -v main.cpp
#include <iostream>
int main() {
::std::cout << "Hello, world!" << ::std::endl;
}
--------------------------------
This is the stacktrace you requested:
--------------------------------
scons run --debug=stacktrace
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [test] UnicodeDecodeError : 'ascii' codec can't decode byte 0x90 in position 2: ordinal not in range(128)
scons: internal stack trace:
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Job.py", line 387, in start
task.prepare()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Script\Main.py", line 175, in prepare
return SCons.Taskmaster.OutOfDateTask.prepare(self)
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Taskmaster.py", line 179, in prepare
self.exception_raise()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Taskmaster.py", line 550, in _exception_raise
exec("raise exc_type, exc_value, exc_traceback")
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Taskmaster.py", line 973, in next_task
task.make_ready()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Script\Main.py", line 309, in make_ready
SCons.Taskmaster.OutOfDateTask.make_ready(self)
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Taskmaster.py", line 409, in make_ready_current
t.disambiguate().make_ready()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Node\Python.py", line 102, in make_ready
self.get_csig()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Node\Python.py", line 163, in get_csig
contents = self.get_contents()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Node\Python.py", line 140, in get_contents
text_contents = self.get_text_contents()
File "C:\seu\xe54\Chocolatey\lib\scons\script\..\engine\SCons\Node\Python.py", line 136, in get_text_contents
contents = contents + kid.get_contents().decode()
scons: building terminated because of errors.
-------------------------------
These are the 'kids' ("engine\SCons\Node\Python.py", line 136, in get_text_contents)
['main.exe', 'C:\\Windows\\system32\\main.CPL']
with 'main.exe'.get_content() being the bytes from the executable.
This is the tail from the hexdump of the exe
000bf70 f p r i n t f \0 _ _ i m p _ _ E
000bf80 n t e r C r i t i c a l S e c t
000bf90 i o n @ 4 \0 _ _ i m p _ _ f w r
000bfa0 i t e \0
000bfa4
and this is the tail from get_content() of main.exe
'fprintf\x00__imp__EnterCriticalSection at 4\x00__imp__fwrite\x00'
Regards
mpac
Gesendet: Dienstag, 28. November 2017 um 20:30 Uhr
Von: "Bill Deegan" <bill at baddogconsulting.com>
An: "SCons users mailing list" <scons-users at scons.org>
Betreff: Re: [Scons-users] scons 3.0.1: 'ascii' codec can't decode
Can you rerun with --debug=stacktrace and paste the full stacktrace here?
Does your main.cpp have some non ascii characters in it?
-Bill
On Tue, Nov 28, 2017 at 12:52 AM, <mpac1234 at will-hier-weg.de[mailto:mpac1234 at will-hier-weg.de]> wrote:Hello,
when trying to move from scons 2.5.1 to scons 3.0.1 on Windows with Python 2.7.13 the following stopped working for me (does not work with python 3.6.3 either), with main.cpp being a hello world program:
--------------------------
import os
env = Environment(tools = ["mingw"], ENV=os.environ)
prog = env.Program("main", ["main.cpp"])
run = env.Command(Value("testrun"), prog, "$SOURCE")
env.Alias("run", run)
AlwaysBuild(run)
--------------------------
With scons 2.5.1 this works, with scons 3.0.1 it does not:
scons: *** [testrun] UnicodeDecodeError : 'ascii' codec can't decode byte 0x90 in position 2: ordinal not in range(128)
This one works
--------------------------
import os
env = Environment(tools = ["mingw"], ENV=os.environ)
prog = env.Program("main", ["main.cpp"])
run = env.Alias("run", prog, prog[0].abspath)
AlwaysBuild(run)
--------------------------
But I wondered if the first *should* work.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org[mailto:Scons-users at scons.org]
https://pairlist4.pair.net/mailman/listinfo/scons-users_______________________________________________ Scons-users mailing list Scons-users at scons.org https://pairlist4.pair.net/mailman/listinfo/scons-users[https://pairlist4.pair.net/mailman/listinfo/scons-users]
More information about the Scons-users
mailing list