[Scons-users] AIX crashes with python3

Rob Boehne robb at datalogics.com
Tue Jul 7 12:37:21 EDT 2020


I’m seeing a Unicode conversion problem with subprocess output very early in an SConss 4.0.0 run on AIX (also in git master and 3.1.2).



10:39:15 + python3 build.py STAGE=release BUILD_64_BIT=true APDFL=/raid/proj/procyon/checkouts-procyon/devauto/Jenkins/builds/AIX64/APDFL15.0.4

10:39:15 starting build: STAGE=release BUILD_64_BIT=true APDFL=/raid/proj/procyon/checkouts-procyon/devauto/Jenkins/builds/AIX64/APDFL15.0.4

10:39:15 scons: Reading SConscript files ...

10:39:16 TypeError: a bytes-like object is required, not 'str':

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/DLE/SConstruct", line 33:

10:39:16     SConsignFile(os.path.abspath('.sconsign.dblite'))

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Script/SConscript.py", line 659:

10:39:16     env = self.factory()

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Script/SConscript.py", line 639:

10:39:16     default_env = SCons.Defaults.DefaultEnvironment()

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Defaults.py", line 86:

10:39:16     _default_env = SCons.Environment.Environment(*args, **kw)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Environment.py", line 999:

10:39:16     apply_tools(self, tools, toolpath)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Environment.py", line 102:

10:39:16     env.Tool(tool)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Environment.py", line 1844:

10:39:16     tool(self)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/__init__.py", line 269:

10:39:16     self.generate(env, *args, **kw)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/default.py", line 40:

10:39:16     for t in SCons.Tool.tool_list(env['PLATFORM'], env):

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/__init__.py", line 1237:

10:39:16     c_compiler = FindTool(c_compilers, env) or c_compilers[0]

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/__init__.py", line 1140:

10:39:16     if t.exists(env):

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/aixcc.py", line 63:

10:39:16     path, _cc, version = get_xlc(env)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Tool/aixcc.py", line 45:

10:39:16     return SCons.Platform.aix.get_xlc(env, xlc, packages)

10:39:16   File "/devlocal/devauto/Jenkins/workspace/CI_Builds/DLE15_special/64-Bit/dle-sandbox/python-env-mongol/lib/python3.7/site-packages/SCons/Platform/aix.py", line 66:

10:39:16     fileset, filename = line.split(':')[1:3]

10:39:16 Build completed with status 2

10:39:16 Build step 'Conditional step (single)' marked build as failure

10:39:16 Archiving artifacts

10:39:16 [BFA] Scanning build for known causes...

10:39:16 [BFA] No failure causes found

10:39:16 [BFA] Done. 0s

10:39:16 Setting status of b8de021338ef01ac6540f3478e6882e7cede1380 to FAILURE with url http://jenkins1.dlogics.com:8080/Enterprise_PDF/job/DLE_15_AIX64_CIBuilder_python3/7/ and message: 'Build #7 - Complete: FAIL

10:39:16  '

10:39:16 Using context: AIX 32

10:39:17 Finished: FAILURE
Page generated: Jul 7, 2020 10:42:55 AM CDTREST API<http://jenkins1.dlogics.com:8080/Enterprise_PDF/job/DLE_15_AIX64_CIBuilder_python3/7/api/>Jenkins<https://jenkins.io/>

I can fix it by adding this patch – this should work with any python 3.4 or later (as opposed to some of the other fixes that would not).
I was about to create an issue but read I should post here first.

robb at rhel7:/raid/checkouts-raid/robb/AIX-scons/scons (master)$ git diff
diff --git a/SCons/Platform/aix.py b/SCons/Platform/aix.py
index c91679f..247437a 100644
--- a/SCons/Platform/aix.py
+++ b/SCons/Platform/aix.py
@@ -55,6 +55,7 @@ def get_xlc(env, xlc=None, packages=[]):
         pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package],
                 stdin = 'devnull',
                 stderr = 'devnull',
+                universal_newlines=True,
                 stdout = subprocess.PIPE)
         # output of lslpp is something like this:
         #     #Path:Fileset:File




[cid:image001.png at 01D65452.F9B330D0]
Rob Boehne
Senior Software Architect | Datalogics, Inc.
+1.312.853.8351<tel:(312)%20853-8351> | robb at datalogics.com<mailto:robb at datalogics.com>
datalogics.com<http://www.datalogics.com/> | blogs.datalogics.com<http://blogs.datalogics.com/>
Connect with us: Facebook<https://www.facebook.com/DatalogicsInc> | Twitter<https://twitter.com/DatalogicsInc> | LinkedIn<https://www.linkedin.com/company/datalogics?actionToken=p=p%3Dbiz-company-login%26c%3D3217e65a-bdc2-4b38-8f9c-13c982e8c529%26m%3Dcompany_feed%26n%3D0&t=a%3DisFolloweeOfPoster%253Dfalse%2526distanceFromActor%253D-1%2526actorType%253D%2526likedByUser%253Dfalse%2526targetId%253D%2526recentCommentUrns%253D%2526targetType%253D%2526sponsoredFlag%253DORGANIC%2526verbType%253Dlinkedin%25253Ashare%2526objectType%253Dlinkedin%25253Aarticle%2526totalShares%253D0%2526activityId%253Durn%25253Ali%25253Aactivity%25253A6263731876121362433%2526recentLikerUrns%253D%2526actorId%253Durn%25253Ali%25253Acompany%25253A14000%2526totalComments%253D0%2526relevanceScore%253D0.0%2526recentCommenterUrns%253D%2526isPublic%253Dtrue%2526time%253D-1%2526totalLikes%253D0%2526objectId%253Durn%25253Ali%25253Aarticle%25253A7793179909183391510%2526distanceFromNestedActor%253D-1%26s%3DORG> | YouTube<https://www.youtube.com/user/Datalogics>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200707/2ed01cdd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 124449 bytes
Desc: image001.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200707/2ed01cdd/attachment-0001.png>


More information about the Scons-users mailing list