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.9 Unable to install module grpcio on AIX

    Posted 3 days ago
    Edited by Satish Krishnamurthy 3 days ago

    Hi Team,

    Im trying to install the python module grpcio on AIX. I have installed g++ and gcc.  receiving the below error. Can you suggest any workaround to install the module. 


    AIX Version: 7300-03-01-2520

    gcc: gcc (GCC) 10.3.0
    g++: g++ (GCC) 13.3.0


    # python3 -m pip install grpcio

    File "/tmp/pip-build-env-7xmiuniy/overlay/lib/python3.9/site-packages/setuptools/_distutils/spawn.py", line 87, in spawn
          subprocess.check_call(cmd, env=_inject_macos_ver(env))
        File "/opt/freeware/lib64/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/bin/g++', '-maix64', '-fPIC', '-pthread', '-O2', '-Wno-unused-result', '-Wsign-compare', '-DNDEBUG', '-g', '-O2', '-Wall', '-I/opt/freeware/include', '-I/usr/include', '-DAIX_GENUINE_CPLUSCPLUS', '-D_ALL_SOURCE', '-D_LINUX_SOURCE_COMPAT', '-I/opt/freeware/include', '-I/usr/include', '-DAIX_GENUINE_CPLUSCPLUS', '-D_ALL_SOURCE', '-D_LINUX_SOURCE_COMPAT', '-D_WIN32_WINNT=1536', '-DGRPC_XDS_USER_AGENT_NAME_SUFFIX="Python"', '-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="1.76.0"', '-DHAVE_CONFIG_H=1', '-DGRPC_ENABLE_FORK_SUPPORT=1', '-DGRPC_PYTHON_BUILD=1', '-D__STDC_FORMAT_MACROS', '-Isrc/python/grpcio', '-Iinclude', '-I.', '-Ithird_party/abseil-cpp', '-Ithird_party/address_sorting/include', '-Ithird_party/cares/cares/include', '-Ithird_party/cares', '-Ithird_party/cares/cares', '-Ithird_party/cares/cares/src/lib/include', '-Ithird_party/cares/cares/src/lib', '-Ithird_party/re2', '-Ithird_party/boringssl-with-bazel/src/include', '-Ithird_party/upb', '-Isrc/core/ext/upb-gen', '-Isrc/core/ext/upbdefs-gen', '-Ithird_party/utf8_range', '-Ithird_party/xxhash', '-Ithird_party/zlib', '-I/opt/freeware/include/python3.9', '-c', 'src/core/credentials/call/external/aws_request_signer.cc', '-o', 'pyb/temp.aix-7303-2520-64-cpython-39/src/core/credentials/call/external/aws_request_signer.o', '-pthread']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/tmp/pip-build-env-7xmiuniy/overlay/lib/python3.9/site-packages/setuptools/_distutils/compilers/C/unix.py", line 217, in _compile
          self.spawn(
        File "/tmp/pip-install-q_q5_9ug/grpcio_eba6e6e4ff6642c99d7f15bddaf5156d/src/python/grpcio/_spawn_patch.py", line 66, in _commandfile_spawn
          _classic_spawn(self, command, **kwargs)
        File "/tmp/pip-build-env-7xmiuniy/overlay/lib/python3.9/site-packages/setuptools/_distutils/compilers/C/base.py", line 1158, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "/tmp/pip-build-env-7xmiuniy/overlay/lib/python3.9/site-packages/setuptools/_distutils/spawn.py", line 93, in spawn
          raise DistutilsExecError(
      distutils.errors.DistutilsExecError: command '/usr/bin/g++' failed with exit code 1

      During handling of the above exception, another exception occurred:



    ------------------------------
    Satish Krishnamurthy
    ------------------------------



  • 2.  RE: Python3.9 Unable to install module grpcio on AIX

    Posted 2 days ago
    Edited by Aditya Kamath 2 days ago

    Hi Satish,

    This module will not install in AIX by using pip3 install grpcio

    The reason being, there will be code changes you need to do specific to the header file and config files available in AIX and then try.

    I would suggest you get the tarball from the PyPI website.
    wget https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz

    Then extract the tarball, cd to the source, and do it. pip3 install . -vv

    For every error you get, you will need to fix it to compile and then try.



    ------------------------------
    Aditya Kamath
    ------------------------------