Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  Python3.12 Cryptogrpahy error

    Posted Wed September 17, 2025 02:46 AM
    Edited by Avinesh Benjamin Wed September 17, 2025 04:54 AM

    Hi,

    The binary built via pyinstaller and python-cryptography 44.0.2 is having issues:

    File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
      File "cryptography/x509/__init__.py", line 7, in <module>
      File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
      File "cryptography/x509/certificate_transparency.py", line 8, in <module>
    ImportError: rtld: 0712-001 Symbol __xlcxx_personality_v0 was referenced
          from module /tmp/_MEI_iLqea/libunwind.a(libunwind.so.1), but a runtime definition
          of the symbol was not found.
    [PYI-13697324:ERROR] Failed to execute script 'main' due to unhandled exception

    bash-5.2# dump -Tov /usr/lib/libunwind.a |grep __xlcxx_personality_v0
    dump: /usr/lib/libunwind.a[libunwind.imp]: dump: 0654-105 The file is not in a recognized format.
            Specify an executable file, object file, or archive file.
    [51]    0x00000000    undef      IMP     DS EXTref              .. __xlcxx_personality_v0
    bash-5.2#

    Please advice we have IBM compiler version 16 latest patch installed


    #AIXOpenSource
    ------------------------------
    Avinesh Benjamin
    ------------------------------



  • 2.  RE: Python3.12 Cryptogrpahy error

    Posted Fri September 19, 2025 05:06 AM

    Os level 7300-02-02-2420

    (venv) bash-5.2# /opt/IBM/xlC/16.1.0/bin/xlclang --version
    IBM XL C/C++ for AIX, V16.1.0  (5725-C72, 5765-J12)
    Version: 16.01.0000.0021
    (venv) bash-5.2#

     bash-5.2# lslpp -L|grep libunwind
      libunwind.rte             17.1.1.4    C     F    IBM XL C++ Runtime for AIX 7.2

    Please advice on what the issue is or if we need to update any packages

    The error is still occurs Python-cryptography is version 44.0.2, Python3.12 install using dnf via AIX openSource Toolbox

    #AIX-Open-Source-Software

    #AIXOpenSource



    ------------------------------
    Avinesh Benjamin
    ------------------------------



  • 3.  RE: Python3.12 Cryptogrpahy error
    Best Answer

    Posted 29 days ago

    Hello.  Cryptography is built with the Rust compiler.  As a result, it needs libunwind.rte 17.1.3.0 or higher installed.  You can get the library from here:  https://www.ibm.com/support/pages/fix-list-xl-cc-runtime-aix .  The library is backwards compatible with programs built with the xlclang++ 16.1.0 compiler.



    ------------------------------
    Rafik Zurob
    ------------------------------



  • 4.  RE: Python3.12 Cryptogrpahy error

    Posted 29 days ago
    Edited by Avinesh Benjamin 29 days ago

    Hi @Rafik Zurob, @Ayyappan M

     bash-5.2# lslpp -L|grep libunwind
      libunwind.rte             17.1.1.4    C     F    IBM XL C++ Runtime for AIX 7.2

    The libunwind version installed is not the issue, but after pyinstaller creates the binary at runtime the binary is not able to find the symbols:

    ImportError: rtld: 0712-001 Symbol __xlcxx_personality_v0 was referenced
          from module /tmp/_MEI_iLqea/libunwind.a(libunwind.so.1), but a runtime definition
          of the symbol was not found.
    [PYI-13697324:ERROR] Failed to execute script 'main' due to unhandled exception

    The python-cryptography package 44.0.2 is already installed on the machine.

    venv --system-site-packages is used to ensure the cryptography package is picked from site_packages on the machine, issue is happening at runtime due to libunwind symbol not being found.

    Apologies I see I have 17.1.1.4 let me update and give it a try

    ------------------------------
    Avinesh Benjamin
    ------------------------------



  • 5.  RE: Python3.12 Cryptogrpahy error

    Posted 28 days ago

    @Rafik Zurob

    Curious if libunwind was not the required version why did dnf install python-cryptography succeed and not throw and error related to dependency during installation.



    ------------------------------
    Avinesh Benjamin
    ------------------------------



  • 6.  RE: Python3.12 Cryptogrpahy error

    Posted 28 days ago

    libunwind.rte is a lpp fileset and Python3.9-cryptography is a rpm fileset. So both are two different packaging formats. So one can't put a version check of libunwind.rte in Python3.9-cryptography



    ------------------------------
    Ayappan P
    ------------------------------



  • 7.  RE: Python3.12 Cryptogrpahy error

    Posted 28 days ago

    Yup makes sense.



    ------------------------------
    Avinesh Benjamin
    ------------------------------