Open Source Development

 View Only

 pip install oracledb failed on AIX 7.3

Phillip Guan's profile image
Phillip Guan posted Thu September 18, 2025 11:51 AM

Hi there,

See the updates at the bottom...

==================================

This is my first time here...

On our AIX 7.3 server; try to pip3 to install oracledb package but failed. Please help1

--------------------------------------------------------------------------

[root@mdmdbdev01] / >
# oslevel -s
7300-02-03-2446

[root@mdmdbdev01] / >
# lslpp -l|grep python3
python3.9.base 3.9.19.2 COMMITTED Python 3.9 64-bit binary
python3.9.base 3.9.19.2 COMMITTED Python 3.9 64-bit binary

[root@mdmdbdev01] / >
# python3 --version
Python 3.9.19

[root@mdmdbdev01] / >
# pip3 --version
pip 25.2 from /usr/opt/python3/lib/python3.9/site-packages/pip (python 3.9)

[root@mdmdbdev01] / >
# pip3 install oracledb==2.4.1
Collecting oracledb==2.4.1
Using cached oracledb-2.4.1.tar.gz (614 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting cryptography>=3.2.1 (from oracledb==2.4.1)
Using cached cryptography-46.0.1.tar.gz (749 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 1

[31 lines of output]
Ignoring cffi: markers 'platform_python_implementation != "PyPy" and python_version == "3.8"' don't match your environment
Collecting maturin<2,>=1.9.4
Using cached maturin-1.9.4.tar.gz (213 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1

[3 lines of output]
Python reports SOABI: cpython-39
Unsupported platform: 39
Rust not found, installing into a temporary directory
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 1

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

====== We tried a few thing but got error when installing cffi.

export CC=gcc export CXX=g++;
 
export LD=gcc; export CFLAGS="-maix64 -D_ALL_SOURCE -D_LARGE_FILES -DTHREAD_SAFE"; 
 
export LDFLAGS="-maix64 -Wl,-blibpath:/usr/lib:/lib:/usr/opt/python3/lib -L/usr/lib -L/opt/freeware/lib64 -lffi";
# pip3 install --no-build-isolation --global-option=build_ext --global-option="-compiler=unix" cffi
DEPRECATION: --build-option and --global-option are deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to use --config-settings. Discussion can be found at https://github.com/pypa/pip/issues/11859
WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option.
Collecting cffi
  Using cached cffi-2.0.0.tar.gz (523 kB)
  Preparing metadata (pyproject.toml) ... done
Collecting pycparser (from cffi)
  Using cached pycparser-2.23-py3-none-any.whl
Building wheels for collected packages: cffi
  WARNING: Ignoring --global-option when building cffi using PEP 517
  Building wheel for cffi (pyproject.toml) ... error
  error: subprocess-exited-with-error
 
  Building wheel for cffi (pyproject.toml) did not run successfully.
  exit code: 1
 
  [59 lines of output]
  ld: 0711-738 ERROR: Input file /lib/crt0.o:
          XCOFF32 object files are not allowed in 64-bit mode.
  collect2: error: ld returned 8 exit status
  Note: will not use '__sync_synchronize()' in the C code
  ***** The above error message can be safely ignored.
 
  running bdist_wheel
  running build
  running build_py
  creating build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/__init__.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/_imp_emulation.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/_shimmed_dist_utils.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/api.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/backend_ctypes.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/cffi_opcode.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/commontypes.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/cparser.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/error.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/ffiplatform.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/lock.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/model.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/pkgconfig.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/recompiler.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/setuptools_ext.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/vengine_cpy.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/vengine_gen.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/verifier.py -> build/lib.aix-7302-2445-64-cpython-39/cffi
  running egg_info
  writing src/cffi.egg-info/PKG-INFO
  writing dependency_links to src/cffi.egg-info/dependency_links.txt
  writing entry points to src/cffi.egg-info/entry_points.txt
  writing requirements to src/cffi.egg-info/requires.txt
  writing top-level names to src/cffi.egg-info/top_level.txt
  reading manifest file 'src/cffi.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  adding license file 'AUTHORS'
  writing manifest file 'src/cffi.egg-info/SOURCES.txt'
  copying src/cffi/_cffi_errors.h -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/_cffi_include.h -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/_embedding.h -> build/lib.aix-7302-2445-64-cpython-39/cffi
  copying src/cffi/parse_c_type.h -> build/lib.aix-7302-2445-64-cpython-39/cffi
  running build_ext
  building '_cffi_backend' extension
  creating build/temp.aix-7302-2445-64-cpython-39/src/c
  gcc -maix64 -D_ALL_SOURCE -D_LARGE_FILES -DTHREAD_SAFE -DFFI_BUILDING=1 -DUSE__THREAD -I/opt/freeware/include -I/usr/opt/python3/include/python3.9 -c src/c/_cffi_backend.c -o build/temp.aix-7302-2445-64-cpython-39/src/c/_cffi_backend.o
  In file included from src/c/cffi1_module.c:20,
                   from src/c/_cffi_backend.c:8173:
  src/c/call_python.c: In function 'cffi_call_python':
  src/c/call_python.c:203:28: warning: implicit declaration of function '__lwsync'; did you mean 'msync'? [-Wimplicit-function-declaration]
   #   define read_barrier()  __lwsync()
                              ^~~~~~~~
  src/c/call_python.c:252:5: note: in expansion of macro 'read_barrier'
       read_barrier();
       ^~~~~~~~~~~~
  /usr/opt/python3/lib/python3.9/config-3.9/ld_so_aix xlc_r -q64 -qPIC -bI:/usr/opt/python3/lib/python3.9/config-3.9/python.exp -L/usr/opt/python3/lib -L/usr/lib -Wl,-blibpath:/usr/opt/python3/lib:/usr/lib:/lib -L/usr/opt/python3/lib -L/usr/lib -Wl,-blibpath:/usr/opt/python3/lib:/usr/lib:/lib -maix64 -Wl,-blibpath:/usr/lib:/lib:/usr/opt/python3/lib -L/usr/lib -L/opt/freeware/lib64 -lffi -maix64 -D_ALL_SOURCE -D_LARGE_FILES -DTHREAD_SAFE build/temp.aix-7302-2445-64-cpython-39/src/c/_cffi_backend.o -L/opt/freeware/lib64 -L/usr/opt/python3/lib -lffi -o build/lib.aix-7302-2445-64-cpython-39/_cffi_backend.cpython-39.so
  xlc_r: 1501-287 (S) This compiler does not support AIX 7.3. Please check with IBM (http://www-01.ibm.com/support/docview.wss?rs=43&uid=swg21326972) to see if there is a PTF for this compiler that supports this AIX level.
  error: command '/usr/opt/python3/lib/python3.9/config-3.9/ld_so_aix' failed with exit code 41
  [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cffi
Failed to build cffi
error: failed-wheel-build-for-install
 
Failed to build installable wheels for some pyproject.toml based projects
 
cffi