[Scons-users] TryRun() problem with python3 scons-3.0.1

Dave Plater dplater.list at gmail.com
Mon Mar 12 02:45:14 EDT 2018



On 12/03/18 03:35, Bill Deegan wrote:
> O.k. in SConf.py.
> 
> line 589:
> 
> add
> except TypeError as e:
>     import pdb; pdb.set_trace()
> 
> and run with --cache. See if it drops you in the debugger.
> 
> I think the issue is this: (using Visual Studio code so apologies for 
> colorized code below)
> sourcetext =self.env.Value(text)
> 
> 
> 
> Then change:
> def_stringSource( target, source, env):
> return(str(target[0]) +' <-\n|'+
> source[0].get_contents().decode().replace( '\n', "\n|") )
> 
> 
> 
> to use get_text_contents() ?

Ok I did this and we seem to be making progress.
I now fail on this:
[   43s] Checking for a working C-compiler TryLink
[   43s]
[   43s] nodes =  ['cache/conftest_0']
[   43s]
[   43s] result =  0
[   43s]
[   43s] _ac_build_counter =  1
[   43s]
[   43s] result.end  0
[   43s] no
[   43s]
[   43s] It seems as if your system isn't even able to compile any 
C-/C++-programs. Probably you don't have gcc and g++ installed. 
Compiling a package from source without a working compiler is very hard 
to do, please install the needed packages.
[   43s] Hint: on *ubuntu you need both gcc- and g++-packages installed, 
easiest solution is to install build-essential which depends on gcc and g++.

I've disabled the TryRun instance in ffado's SConstruct and the 
CheckLibWithHeader instances now pass so as far as the TypeError: is 
concerned you've hit the nail on the head.
I now get a build fail during the actual build :
[   85s] g++ -o src/dice/presonus/firestudio_tube.os -c -std=gnu++11 
-fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
-fstack-clash-protection -fno-strict-aliasing -ggdb 
-Wno-deprecated-declarations -fpermissive --std=gnu++11 
-Werror=date-time -mmmx -mfpmath=sse -msse -msse2 -mssse3 -msse4.1 
-msse4.2 -fomit-frame-pointer -ffast-math -funroll-loops -fPIC 
-D_FORTIFY_SOURCE=2 -DDEBUG_MESSAGES -DENABLE_BEBOB -DENABLE_FIREWORKS 
-DENABLE_OXFORD -DENABLE_MOTU -DENABLE_DICE -DENABLE_RME 
-DENABLE_GENERICAVC -I. -Isrc -I/usr/include/libxml++-2.6 
-I/usr/lib64/libxml++-2.6/include -I/usr/include/libxml2 
-I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include 
src/dice/presonus/firestudio_tube.cpp
[   86s] building 'libffado/ffado.h' from 'libffado/ffado.h.in'
[   86s] scons: *** [version.h] TypeError : sequence item 1: expected 
str instance, bytes found
[   86s] scons: internal stack trace:
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Job.py", line 201, in start
[   86s]     task.execute()
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 190, 
in execute
[   86s]     SCons.Taskmaster.OutOfDateTask.execute(self)
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Taskmaster.py", line 270, in 
execute
[   86s]     raise buildError
[   86s] Traceback (most recent call last):
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Action.py", line 689, in 
__call__
[   86s]     cmd = self.strfunction(target, source, env, executor)
[   86s] TypeError: CacheRetrieveString() takes 3 positional arguments 
but 4 were given
[   86s]
[   86s] During handling of the above exception, another exception occurred:
[   86s]
[   86s] Traceback (most recent call last):
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Taskmaster.py", line 241, in 
execute
[   86s]     if not t.retrieve_from_cache():
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Node/FS.py", line 2925, in 
retrieve_from_cache
[   86s]     return self.get_build_env().get_CacheDir().retrieve(self)
[   86s]   File "/usr/lib/scons-3.0.1/SCons/CacheDir.py", line 263, in 
retrieve
[   86s]     if CacheRetrieve(node, [], env, execute=1) == 0:
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Action.py", line 691, in 
__call__
[   86s]     cmd = self.strfunction(target, source, env)
[   86s]   File "/usr/lib/scons-3.0.1/SCons/CacheDir.py", line 66, in 
CacheRetrieveString
[   86s]     cachedir, cachefile = cd.cachepath(t)
[   86s]   File "/usr/lib/scons-3.0.1/SCons/CacheDir.py", line 224, in 
cachepath
[   86s]     sig = node.get_cachedir_bsig()
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Node/FS.py", line 3391, in 
get_cachedir_bsig
[   86s]     result = self.cachesig = SCons.Util.MD5collect(sigs)
[   86s]   File "/usr/lib/scons-3.0.1/SCons/Util.py", line 1550, in 
MD5collect
[   86s]     return MD5signature(', '.join(signatures))
[   86s] TypeError: sequence item 1: expected str instance, bytes found
[   86s] scons: building terminated because of errors.

This is all for the openSUSE distribution where I maintain ffado, I have 
build with python3 scons and python2 scons-3.0.1.
The build logs are at :
  https://build.opensuse.org/package/show/home:plater/ffado
and
https://build.opensuse.org/package/show/home:plater/scons
If you click on the "succeeded" or "failed" links it takes you to the 
short build log then clicking "downloadlog file" takes you to the full 
build logs including packages installed for the build.
The openSUSE_Tumbleweed, openSUSE_Factory and Leap_15.0 builds are all 
with python-3.6.4, the Leap_42.3 build is with python-2.7 scons 3 and 
succeeds.

Thanks
Dave


More information about the Scons-users mailing list