AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Mon September 09, 2024 02:16 PM

    Hi,

    I'm trying to run this:

     /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    ...but it fails with the below and it appears that g++ is missing.  I have gcc installed but something must be out of joint.  Please see below for a package list.  What do I need to do to get this working?  Please advise.  Thanks.

    Mike

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

      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 -I./python -I./lib -I./deps/double-conversion/double-conversion -I/opt/freeware/include/python3.9 -c ./deps/double-conversion/double-conversion/bignum-dtoa.cc -o build/temp.aix-7302-2419-64-cpython-39/./deps/double-conversion/double-conversion/bignum-dtoa.o -D_GNU_SOURCE
      error: command 'g++' failed: No such file or directory
      [end of output]

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

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

    [root@crconim1 ~]# rpm -qa | grep gcc
    libgcc-10-2.ppc
    libgcc8-8.3.0-7.ppc
    libgcc10-10.3.0-6.ppc
    gcc10-10.3.0-6.ppc
    gcc10-cpp-10.3.0-6.ppc
    gcc-cpp-10-2.ppc
    gcc-10-2.ppc
    gcc10-c++-10.3.0-6.ppc

    ------------- end -------------



    ------------------------------
    Michael Metts
    ------------------------------


  • 2.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Mon September 09, 2024 03:51 PM

    Okay.  I fixed that with a symbolic link.  Now I'm getting this (below).  How do I fix it?

      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./python -I./lib -I./deps/double-conversion/double-conversion -I/opt/freeware/include/python3.9 -c ./python/JSONtoObj.c -o build/temp.aix-7302-2419-64-cpython-39/./python/JSONtoObj.o -D_GNU_SOURCE
      ./python/JSONtoObj.c:41:10: fatal error: Python.h: No such file or directory
         41 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/opt/freeware/bin/gcc' failed with exit code 1
      [end of output]

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



    ------------------------------
    Michael Metts
    ------------------------------



  • 3.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 12:59 AM

    Did you install python3-devel? "dnf install python3-devel"??

    You see this file then in /opt/freeware/include/python3.9/Python.h

    Also, it will be nice if you can pass these options "-I/opt/freeware/include/python3.9 -L/opt/freeware/lib64 -lpython3.9" via CFLAGS/LDFLAGS if the issue still persists.



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



  • 4.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 01:31 AM

    HI Aditya,

     

    I think I got it sorted.  I ended up creating a symbolic link for g++ and even gcc in /opt/freeware/bin because only the "-10" files or symbolic links were in there which struct me as odd.  Then, I installed python3.9-devel and it seemed to work then.  Thanks for getting back to me!

     

    Best,

    Mike

     

    Michael L. Metts (he/him/his)

    /ˈmaɪɫ ˈɛɫ ˈmɛts/

    Principal Data Engineer

    CORNERSTONE RESEARCH

    1302 El Camino Real, Suite 250

    Menlo Park, CA  94025-4327

    650.470.7171 direct

    650.740.8551 mobile

    www.cornerstone.com

     






  • 5.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 01:49 AM

    Somewhat the same topic.  Is there any way to fix this?:

     

    [root@crilnim1 ~]# aws help

    Could not find executable named "groff or mandoc"

     

    Michael L. Metts (he/him/his)

    /ˈmaɪɫ ˈɛɫ ˈmɛts/

    Principal Data Engineer

    CORNERSTONE RESEARCH

    1302 El Camino Real, Suite 250

    Menlo Park, CA  94025-4327

    650.470.7171 direct

    650.740.8551 mobile

    www.cornerstone.com

     






  • 6.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 02:05 AM

    i see there are other posts about this.  groff is a dependency of awscli. 



    ------------------------------
    Michael Metts
    ------------------------------



  • 7.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 02:13 AM

    just installed the thing from 2001.  i feel kind of stupid having to do that.  why can you're update groff?



    ------------------------------
    Michael Metts
    ------------------------------



  • 8.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 05:19 AM
    Edited by Aditya Kamath Tue September 10, 2024 06:39 AM

    We will try to update this for you. 
    ------------------------------
    Aditya Kamath
    ------------------------------



  • 9.  RE: g++ not found failure for /opt/freeware/bin/python3.9 -m pip install aws-s3-tools

    Posted Tue September 10, 2024 10:22 AM

    Great.  Thanks!

     

    Michael L. Metts (he/him/his)

    /ˈmaɪɫ ˈɛɫ ˈmɛts/

    Principal Data Engineer

    CORNERSTONE RESEARCH

    1302 El Camino Real, Suite 250

    Menlo Park, CA  94025-4327

    650.470.7171 direct

    650.740.8551 mobile

    www.cornerstone.com