OK. I expect it will be something specific with the PyInstaller package, and/or an issue with the way Lib/ctypes is used.
I'll have to try a manual build - as I guess you did - to understand the issue.
For record keeping - a summary of actions.
p.s. this is the 32bit version.
+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+
installp: APPLYING software for:
aixtools.python3.rte 3.6.5.0
aixtools.python3.man.en_US 3.6.5.0
aixtools.python3.adt 3.6.5.0
...
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
aixtools.python3.rte 3.6.5.0 USR APPLY SUCCESS
aixtools.python3.man.en_US 3.6.5.0 USR APPLY SUCCESS
aixtools.python3.adt 3.6.5.0 USR APPLY SUCCESS
root@x067:[/tmp]pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the section) to disable this warning.
pip (9.0.3)
setuptools (39.0.1)
You are using pip version 9.0.3, however version 19.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@x067:[/tmp]pip3 install --upgrade pip
Collecting pip
Downloading
https://files.pythonhosted.org/packages/f9/fb/863012b13912709c13cf5cfdbfb304fa6c727659d6290438e1a88df9d848/pip-19.1-py2.py3-none-any.whl (1.4MB)
100% |################################| 1.4MB 80kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Successfully installed pip-19.1
I generally start with the download command, and see what else comes.
root@x067:[/tmp]pip download pyinstaller
Collecting pyinstaller
Downloading
https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz (3.5MB)
|################################| 3.5MB 225kB/s
Saved ./PyInstaller-3.4.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting setuptools (from pyinstaller)
Using cached
https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl Saved ./setuptools-41.0.1-py2.py3-none-any.whl
Collecting pefile>=2017.8.1 (from pyinstaller)
Downloading
https://files.pythonhosted.org/packages/36/58/acf7f35859d541985f0a6ea3c34baaefbfaee23642cf11e85fe36453ae77/pefile-2019.4.18.tar.gz (62kB)
|################################| 71kB 196kB/s
Saved ./pefile-2019.4.18.tar.gz
Collecting macholib>=1.8 (from pyinstaller)
Downloading
https://files.pythonhosted.org/packages/41/f1/6d23e1c79d68e41eb592338d90a33af813f98f2b04458aaf0b86908da2d8/macholib-1.11-py2.py3-none-any.whl Saved ./macholib-1.11-py2.py3-none-any.whl
Collecting altgraph (from pyinstaller)
Downloading
https://files.pythonhosted.org/packages/0a/cc/646187eac4b797069e2e6b736f14cdef85dbe405c9bfc7803ef36e4f62ef/altgraph-0.16.1-py2.py3-none-any.whl Saved ./altgraph-0.16.1-py2.py3-none-any.whl
Collecting future (from pefile>=2017.8.1->pyinstaller)
Downloading
https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz (829kB)
|################################| 829kB 81kB/s
Saved ./future-0.17.1.tar.gz
Successfully downloaded pyinstaller setuptools pefile macholib altgraph future
I am going to guess a bit, as to what is most 'root' to all, and install them one-by-one.
root@x067:[/tmp]pip list
Package Version
---------- -------
pip 19.1
setuptools 39.0.1
-rw-r--r-- 1 root system 3487849 May 01 12:34 PyInstaller-3.4.tar.gz
-rw-r--r-- 1 root system 575966 May 01 12:35 setuptools-41.0.1-py2.py3-none-any.whl
-rw-r--r-- 1 root system 62374 May 01 12:35 pefile-2019.4.18.tar.gz
-rw-r--r-- 1 root system 36562 May 01 12:35 macholib-1.11-py2.py3-none-any.whl
-rw-r--r-- 1 root system 20311 May 01 12:35 altgraph-0.16.1-py2.py3-none-any.whl
-rw-r--r-- 1 root system 829119 May 01 12:35 future-0.17.1.tar.gz
root@x067:[/tmp]pip install setuptools
Requirement already satisfied: setuptools in /opt/lib/python3.6/site-packages (39.0.1)
hmm
root@x067:[/tmp]pip install future
Collecting future
Using cached
https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gzInstalling collected packages: future
Running setup.py install for future ... done
Successfully installed future-0.17.1
root@x067:[/tmp]pip install altgraph
Collecting altgraph
Using cached
https://files.pythonhosted.org/packages/0a/cc/646187eac4b797069e2e6b736f14cdef85dbe405c9bfc7803ef36e4f62ef/altgraph-0.16.1-py2.py3-none-any.whlInstalling collected packages: altgraph
Successfully installed altgraph-0.16.1
root@x067:[/tmp]pip install macholib
Collecting macholib
Using cached
https://files.pythonhosted.org/packages/41/f1/6d23e1c79d68e41eb592338d90a33af813f98f2b04458aaf0b86908da2d8/macholib-1.11-py2.py3-none-any.whlRequirement already satisfied: altgraph>=0.15 in /opt/lib/python3.6/site-packages (from macholib) (0.16.1)
Installing collected packages: macholib
Successfully installed macholib-1.11
root@x067:[/tmp]pip install macholib
Collecting macholib
Using cached
https://files.pythonhosted.org/packages/41/f1/6d23e1c79d68e41eb592338d90a33af813f98f2b04458aaf0b86908da2d8/macholib-1.11-py2.py3-none-any.whlRequirement already satisfied: altgraph>=0.15 in /opt/lib/python3.6/site-packages (from macholib) (0.16.1)
Installing collected packages: macholib
Successfully installed macholib-1.11
root@x067:[/tmp]pip install pefile
Collecting pefile
Using cached
https://files.pythonhosted.org/packages/36/58/acf7f35859d541985f0a6ea3c34baaefbfaee23642cf11e85fe36453ae77/pefile-2019.4.18.tar.gzRequirement already satisfied: future in /opt/lib/python3.6/site-packages (from pefile) (0.17.1)
Installing collected packages: pefile
Running setup.py install for pefile ... done
Successfully installed pefile-2019.4.18
So, even though there is a newer version of setuptools - at this point it is not needed.
+++++++
root@x067:[/tmp]pip install pyinstaller
Collecting pyinstaller
Using cached
https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: altgraph in /opt/lib/python3.6/site-packages (from pyinstaller) (0.16.1)
Requirement already satisfied: pefile>=2017.8.1 in /opt/lib/python3.6/site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: macholib>=1.8 in /opt/lib/python3.6/site-packages (from pyinstaller) (1.11)
Requirement already satisfied: setuptools in /opt/lib/python3.6/site-packages (from pyinstaller) (39.0.1)
Requirement already satisfied: future in /opt/lib/python3.6/site-packages (from pefile>=2017.8.1->pyinstaller) (0.17.1)
Building wheels for collected packages: pyinstaller
Building wheel for pyinstaller (PEP 517) ... error
ERROR: Complete output from command /opt/bin/python3.6 /opt/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp4rjg0pdd:
ERROR: running bdist_wheel
running build
running build_bootloader
Setting top to : /tmp/pip-install-3adnqnud/pyinstaller/bootloader
Setting out to : /tmp/pip-install-3adnqnud/pyinstaller/bootloader/build
Python Version : 3.6.5 (default, May 9 2018, 18:35:41) [C]
Checking for 'xlc' (C compiler) : /usr/vacpp/bin/xlc_r
Checking size of pointer : 4
Platform : AIX-32bit detected based on compiler
Checking for flags -q32 : yes
Checking for program '/usr/vacpp/bin/xlc_r' : /usr/vacpp/bin/xlc_r
Checking for program 'strip' : /usr/vacpp/bin/xlc_r
Checking for library dl : yes
Checking for library m : yes
Checking for library z : yes
Checking for function unsetenv : yes
Checking for function mkdtemp : yes
'configure' finished successfully (11.109s)
'all' finished successfully (0.000s)
'distclean' finished successfully (0.084s)
Setting top to : /tmp/pip-install-3adnqnud/pyinstaller/bootloader
Setting out to : /tmp/pip-install-3adnqnud/pyinstaller/bootloader/build
Python Version : 3.6.5 (default, May 9 2018, 18:35:41) [C]
Checking for 'xlc' (C compiler) : /usr/vacpp/bin/xlc_r
Checking size of pointer : 4
Platform : AIX-32bit detected based on compiler
Checking for flags -q32 : yes
Checking for program '/usr/vacpp/bin/xlc_r' : /usr/vacpp/bin/xlc_r
Checking for program 'strip' : /usr/vacpp/bin/xlc_r
Checking for library dl : yes
Checking for library m : yes
Checking for library z : yes
Checking for function unsetenv : yes
Checking for function mkdtemp : yes
'configure' finished successfully (3.684s)
'make_all' finished successfully (0.012s)
Waf: Entering directory `/tmp/pip-install-3adnqnud/pyinstaller/bootloader/build/debug'
[ 1/13] Compiling src/pyi_python.c
[ 2/13] Compiling src/main.c
[ 3/13] Compiling src/pyi_path.c
[ 4/13] Compiling src/pyi_pythonlib.c
[ 5/13] Compiling src/pyi_win32_utils.c
"../../src/pyi_win32_utils.c", line 574.21: 1506-356 (W) Compilation unit is empty.
[ 6/13] Compiling src/pyi_main.c
[ 7/13] Compiling src/pyi_launch.c
[ 8/13] Compiling src/pyi_python27_compat.c
[ 9/13] Compiling src/pyi_utils.c
[10/13] Compiling src/pyi_global.c
[11/13] Compiling src/pyi_archive.c
[12/13] Linking build/debug/run_d
ld: 0706-006 Cannot find or open library file: -l Z
ld:open(): A file or directory in the path name does not exist.
Waf: Leaving directory `/tmp/pip-install-3adnqnud/pyinstaller/bootloader/build/debug'
Build failed
-> task in 'run_d' failed with exit status 255 (run with -v to display more information)
No precompiled bootloader found. Trying to compile it for you ...
ERROR: Failed compiling the bootloader. Please compile manually and rerun setup.py
----------------------------------------
ERROR: Failed building wheel for pyinstaller
Running setup.py clean for pyinstaller
Failed to build pyinstaller
ERROR: Could not build wheels for pyinstaller which use PEP 517 and cannot be installed directly
[/tt][/list]