AIX Open Source

 View Only
  • 1.  AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 10:00 AM

    I am attempting to use Mr.Griffiths nextractplus python app to gather perf data from our HMCs and upload it into influx.
    This requires using pip to install the influxdb python package so it can communicate.
    I am using AIX 7.3.
    At first I made the mistake of using the native AIX python3, but that version assumes an install of xlc_r. I do not have this software and thus can not compile the msgpack that is needed.
    I switched to open source Python 3.9 from the Toolbox. Pip3 now uses gcc for the compiler.
    It appears I need to specify some additional config environmental variables because now the compile process fails with:

    ld_so_aix: Compiler 'g++' not found; exiting.
    I have installed all the packages I can find that I think I need for gcc and python.
    I have searched the whole server for g++ and have not turned it up and it is not an RPM or LPP package.

    I need help on this as all the nextractplus documentation and README files mention installing this influxdb package but no mention of this issue.

    # LDFLAGS="/opt/freeware/lib64/python3.9/config-3.9 " python3 -m pip install influxdb
    Collecting influxdb
      Using cached influxdb-5.3.2-py2.py3-none-any.whl.metadata (6.9 kB)
    Collecting python-dateutil>=2.6.0 (from influxdb)
      Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
    Collecting pytz (from influxdb)
      Using cached pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)
    Collecting requests>=2.17.0 (from influxdb)
      Using cached requests-2.32.2-py3-none-any.whl.metadata (4.6 kB)
    Collecting six>=1.10.0 (from influxdb)
      Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
    Collecting msgpack (from influxdb)
      Using cached msgpack-1.0.8.tar.gz (167 kB)
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Installing backend dependencies ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting charset-normalizer<4,>=2 (from requests>=2.17.0->influxdb)
      Using cached charset_normalizer-3.3.2-py3-none-any.whl.metadata (33 kB)
    Collecting idna<4,>=2.5 (from requests>=2.17.0->influxdb)
      Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
    Collecting urllib3<3,>=1.21.1 (from requests>=2.17.0->influxdb)
      Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
    Collecting certifi>=2017.4.17 (from requests>=2.17.0->influxdb)
      Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
    Using cached influxdb-5.3.2-py2.py3-none-any.whl (79 kB)
    Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
    Using cached requests-2.32.2-py3-none-any.whl (63 kB)
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
    Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
    Using cached charset_normalizer-3.3.2-py3-none-any.whl (48 kB)
    Using cached idna-3.7-py3-none-any.whl (66 kB)
    Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
    Building wheels for collected packages: msgpack
      Building wheel for msgpack (pyproject.toml) ... error
      error: subprocess-exited-with-error

      × Building wheel for msgpack (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [23 lines of output]
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build/lib.aix-7302-9988-64-cpython-39
          creating build/lib.aix-7302-9988-64-cpython-39/msgpack
          copying msgpack/__init__.py -> build/lib.aix-7302-9988-64-cpython-39/msgpack
          copying msgpack/exceptions.py -> build/lib.aix-7302-9988-64-cpython-39/msgpack
          copying msgpack/ext.py -> build/lib.aix-7302-9988-64-cpython-39/msgpack
          copying msgpack/fallback.py -> build/lib.aix-7302-9988-64-cpython-39/msgpack
          running build_ext
          building 'msgpack._cmsgpack' extension
          creating build/temp.aix-7302-9988-64-cpython-39
          creating build/temp.aix-7302-9988-64-cpython-39/msgpack
          gcc -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 -I. -I/opt/freeware/include/python3.9 -c msgpack/_cmsgpack.cpp -o build/temp.aix-7302-9988-64-cpython-39/msgpack/_cmsgpack.o
          msgpack/_cmsgpack.cpp: In function 'int __pyx_f_7msgpack_9_cmsgpack_6Packer__pack(__pyx_obj_7msgpack_9_cmsgpack_Packer*, PyObject*, __pyx_opt_args_7msgpack_9_cmsgpack_6Packer__pack*)':
          msgpack/_cmsgpack.cpp:9250:10: warning: '__pyx_r' may be used uninitialized in this function [-Wmaybe-uninitialized]
           9250 |   return __pyx_r;
                |          ^~~~~~~
          /opt/freeware/lib64/python3.9/config-3.9/ld_so_aix g++ -maix64 -fPIC -pthread -O2 -bI:/opt/freeware/lib64/python3.9/config-3.9/python.exp -L/opt/freeware/lib/pthread -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib -L/opt/freeware/lib/pthread -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib -Wl,-blibpath:/opt/freeware/lib/pthread:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib /opt/freeware/lib64/python3.9/config-3.9 build/temp.aix-7302-9988-64-cpython-39/msgpack/_cmsgpack.o -L/opt/freeware/lib64 -o build/lib.aix-7302-9988-64-cpython-39/msgpack/_cmsgpack.cpython-39.so
          no g++ in /tmp/pip-build-env-yn6zc824/overlay/bin /tmp/pip-build-env-yn6zc824/normal/bin /opt/freeware/bin /opt/freeware/bin /usr/bin /etc /usr/sbin /usr/ucb /usr/bin/X11 /sbin /usr/java8_64/jre/bin /usr/java8_64/bin
          ld_so_aix: Compiler 'g++' not found; exiting.
          error: command '/opt/freeware/lib64/python3.9/config-3.9/ld_so_aix' failed with exit code 2
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for msgpack
    Failed to build msgpack
    ERROR: Could not build wheels for msgpack, which is required to install pyproject.toml-based projects



    ------------------------------
    Demian Phillips
    ------------------------------


  • 2.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 10:36 AM

    why don't you try another way,

    download "influxdb-5.3.2-py2.py3-none-any.whl" from "influxdb · PyPI"

    unzip it and by using "pip install some-package.whl" command install it.



    ------------------------------
    Priyesh Manwatkar
    ------------------------------



  • 3.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 10:48 AM

    Didn't know there was another way.
    I'll give that a shot.



    ------------------------------
    Demian Phillips
    ------------------------------



  • 4.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 10:52 AM

    The wheels fall off when it gets to the building msgpack portion (basically the error is the same).



    ------------------------------
    Demian Phillips
    ------------------------------



  • 5.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 10:58 AM

    Oh, got it, unzipped. Doh.



    ------------------------------
    Demian Phillips
    ------------------------------



  • 6.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 11:20 AM

    And the final part of the puzzle falls into place. 
    For anyone hitting a weird problem like this, somehow when installing gcc and various devel packags needed in this whole process, gcc-c++ was missed.
    After installing gcc-c++ package and placing /opt/freeware/bin in the start of the path temporarily the pip3 install worked.



    ------------------------------
    Demian Phillips
    ------------------------------



  • 7.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted Tue May 28, 2024 11:06 AM

    For creating build env you must have below packages on your system,

    check for all, install if missing and then try to install influxdb,

    autoconf
    findutils
    less
    textinfo
    automake
    gcc
    libgcc
    unzip
    bash
    gcc-c
    m4
    wget
    bison
    gcc-cpp
    make
    coreutils
    gdbm
    patch
    db
    gdbm-devel
    pkg-config
    db-devel
    gettext
    readline
    dejagnu
    gettext-devel
    readline-devel
    diffutils
    grep
    rsync
    expat
    info
    sed
    expat-devel
    intltool
    tar

    source: Building open source RPM packages on IBM AIX - IBM Developer



    ------------------------------
    Priyesh Manwatkar (Senior Manager)
    Sr. Tech Analyst-EA Design Solutioning
    HDFC BANK
    Mumbai, India.
    ------------------------------



  • 8.  RE: AIX 7.3 issue with gcc and python/pip install. Need help with what environmental item I am missing.

    Posted 22 days ago

    Ok, thank you sir.



    ------------------------------
    Isaac Kelly
    ------------------------------