classification
Title: Solaris 11.4 crle output not handled correctly
Type: Stage: patch review
Components: ctypes Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dmurphy18
Priority: normal Keywords: patch

Created on 2021-01-11 18:55 by dmurphy18, last changed 2021-01-19 17:52 by dmurphy18.

Files
File name Uploaded Description Edit
solaris11_crle.patch dmurphy18, 2021-01-11 18:55 patch file to be applied to Lib/ctypes/util.py
Pull Requests
URL Status Linked Edit
PR 24226 open dmurphy18, 2021-01-19 17:52
Messages (2)
msg384856 - (view) Author: David Murphy (dmurphy18) * Date: 2021-01-11 18:55
From porting Python 3.7.8 to Solaris 11.4 (base open version) found that the handling of crle output has changed between Solaris 11.3 and 11.4 and accommodation has not been made for the change.

For example:
Solaris 11.3
root@sol11:~/sol_build/proto_salt# uname -a
SunOS sol11 5.11 11.3 i86pc i386 i86pc
root@sol11:~/sol_build/proto_salt# crle

Default configuration file (/var/ld/ld.config) not found
  Platform:	32-bit LSB 80386
  Default Library Path (ELF):	/lib:/usr/lib  (system default)
  Trusted Directories (ELF):	/lib/secure:/usr/lib/secure  (system default)
root@sol11:~/sol_build/proto_salt# crle -64

Default configuration file (/var/ld/64/ld.config) not found
  Platform:	64-bit LSB AMD64
  Default Library Path (ELF):	/lib/64:/usr/lib/64  (system default)
  Trusted Directories (ELF):	/lib/secure/64:/usr/lib/secure/64  (system default)
root@sol11:~/sol_build/proto_salt#


Solaris 11.4
root@sol114:/export/home/david/dev/dist/run# uname -a
SunOS sol114 5.11 11.4.0.15.0 i86pc i386 i86pc Solaris
root@sol114:/export/home/david/dev/dist/run# crle

Configuration file [version 5]: /var/ld/ld.config
    Platform:	32-bit LSB 80386
    Default Library Path:	/usr/local/openssl/lib:/usr/local/lib:/lib:/usr/lib
    Trusted Directories:	/lib/secure:/usr/lib/secure  (system default)

Command line:
    crle -c /var/ld/ld.config -l /usr/local/openssl/lib:/usr/local/lib:/lib:/usr/lib

root@sol114:/export/home/david/dev/dist/run# crle -64

Configuration file [version 5]: /var/ld/64/ld.config
    Platform:	64-bit LSB AMD64
    Default Library Path:	/usr/local/openssl/lib:/usr/local/lib:/lib/64:/usr/lib/64
    Trusted Directories:	/lib/secure/64:/usr/lib/secure/64  (system default)

Command line:
    crle -64 -c /var/ld/64/ld.config -l /usr/local/openssl/lib:/usr/local/lib:/lib/64:/usr/lib/64

root@sol114:/export/home/david/dev/dist/run#

Note: the missing '(ELF)' from the 'Default Library Path'


Simple fix is the following patch:
david@sol114:~/dev$ cat solaris11_crle.patch
--- util.py         2021-01-08 17:01:58.417014094 +0000
+++ util.py.new 2021-01-08 17:03:21.843483945 +0000
@@ -238,6 +238,10 @@
                     line = line.strip()
                     if line.startswith(b'Default Library Path (ELF):'):
                         paths = os.fsdecode(line).split()[4]
+                    elif line.startswith(b'Default Library Path:'):
+                        ## allow for Solaris 11.4 output
+                        paths = os.fsdecode(line).split()[3]
+            
 
             if not paths:
                 return None
david@sol114:~/dev$
msg384857 - (view) Author: David Murphy (dmurphy18) * Date: 2021-01-11 18:56
Forgive any process/workflow errors first time, submitting to Python
History
Date User Action Args
2021-01-19 17:52:49dmurphy18setstage: patch review
pull_requests: + pull_request23080
2021-01-11 18:56:01dmurphy18setmessages: + msg384857
2021-01-11 18:55:17dmurphy18create