Can't install with 64-bit Python3 on AIX 7.1
See original GitHub issueWith Python3 from IBM’s AIX Toolbox site, I can’t install psutil. It fails to build the C code:
psutil/arch/aix/net_connections.c:63:15: error: 'struct mbuf' has no member named 'm_len'
if (mb.m_len > sizeof(struct sockaddr_un))
^
psutil/arch/aix/net_connections.c:64:15: error: 'struct mbuf' has no member named 'm_len'
mb.m_len = sizeof(struct sockaddr_un);
^
psutil/arch/aix/net_connections.c:65:26: error: 'struct mbuf' has no member named 'm_len'
*((char *)ua + mb.m_len - 1) = '\0';
^
This build of Python is 64-bit:
$ python3 -c 'import struct; print(struct.calcsize("P"))'
8
I can get it to build by editing psutil/arch/aix/net_kernel_structs.h
to move the last #define
outside of the conditional.
$ git diff | cat
diff --git a/psutil/arch/aix/net_kernel_structs.h b/psutil/arch/aix/net_kernel_structs.h
index 09f320ff..11e343d8 100644
--- a/psutil/arch/aix/net_kernel_structs.h
+++ b/psutil/arch/aix/net_kernel_structs.h
@@ -105,6 +105,6 @@ struct mbuf64
struct m_hdr64 m_hdr;
};
-#define m_len m_hdr.mh_len
+#endif
-#endif
\ No newline at end of file
+#define m_len m_hdr.mh_len
But, I assume this was inside the conditional for a reason, most likely that it will break on other AIX versions which I don’t have access to test on.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Install Python3 (AIX 7.1) | AIX Open Source - IBM Community
9. Re: Install Python3 (AIX 7.1) As i mentioned earlier, remove the openssl rpm & get the openssl installp package from AIX web...
Read more >Not able to install Python3 on AIX server - Stack Overflow
Show activity on this post. I am trying to install Python 3 on a AIX server. I got the Python 3 RPM file...
Read more >How to Install Python 3.11.0 on Windows 7, 10 or ... - YouTube
python # python3 #programming hey guys in this tutorial I'll show you how to download and install Python 3.11.0 on your Windows OS....
Read more >4. Using Python on Windows — Python 3.11.1 documentation
This document aims to give an overview of Windows-specific behaviour you should know about when using Python on Microsoft Windows. Unlike most Unix...
Read more >How to install Python the smart way - InfoWorld
Windows users can run 32-bit editions of Python on 64-bit Windows, ... directory (e.g. C:\Python3.7 ) to make it easier to find.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tbrownaw can you please try this fix instead?
Thanks Arnon.