Re: AIX crashes with python3
Rob Boehne <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
Will do – I need to track down a similar problem in Tools/suncxx.py also, but I’ll put up PRs for both asap. From: Scons-users <[email protected]> on behalf of Bill Deegan <[email protected]> Reply-To: SCons users mailing list <[email protected]> Date: Tuesday, July 7, 2020 at 11:54 AM To: SCons users mailing list <[email protected]> Subject: Re: [Scons-users] AIX crashes with python3 Rob, Can you send a pull request for your change. That should be an easy one. Please don't forget to add a snippet to CHANGES.txt Thanks, Bill On Tue, Jul 7, 2020 at 9:51 AM Mats Wichmann <[email protected]<mailto:[email protected]>> wrote: On 7/7/20 10:37 AM, Rob Boehne wrote: > 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@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 yes, scons is having problems with this topic. we haven't had feedback on AIX for a while. in *MY* opinion, and I'm just one person, not sure all agree, all of the cases where scons talks to a commandline utility via subprocess should do so in text mode (which most versions of Python have called universal_newlines, it finally has been renamed though the old name continues to work). It's not like reading from files, which are ultimately binary: the utilities speak text, and I'm not really clear why Python chooses to default subprocess to binary. If we talk to utilities in binary, then we have to convert to text, and decoding risks running into problems depending on character sets - we had a spate of problems with non-US locales. I had a patch making this change more gobally, but there's been a lot going on... _______________________________________________ Scons-users mailing list [email protected]<mailto:[email protected]> https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7Crobb%40datalogics.com%7C88bdd970f21c4b2ccd2608d82296746a%7Cfc3d8cdfd6994f23ae232659c3da4749%7C0%7C0%7C637297376883681368&sdata=PpRnpkTS0SaM3Gp6V84MlJBMgLqX%2BOdpVCLKuXhWsn8%3D&reserved=0> _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users