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.  Python question

    Posted Wed July 19, 2023 08:29 AM

    Hello,

     

      Trying to install pyodbc on a 7.2 server. We have it installed on aix 7.3 server. On that one, it still needs some kind of odbc manager, so if that rings a bell as well, that would be great, also. But when I do the install, I get this message.

     

    Defaulting to user installation because normal site-packages is not writeable

    Collecting pyodbc

      Using cached pyodbc-4.0.39.tar.gz (282 kB)

      Installing build dependencies ... done

      Getting requirements to build wheel ... done

      Installing backend dependencies ... done

      Preparing metadata (pyproject.toml) ... done

    Building wheels for collected packages: pyodbc

      Building wheel for pyodbc (pyproject.toml) ... error

      error: subprocess-exited-with-error

     

      × Building wheel for pyodbc (pyproject.toml) did not run successfully.

      │ exit code: 1

      ─> [18 lines of output]

          WARNING: '' not a valid package name; please use only .-separated package names in setup.py

          running bdist_wheel

          running build

          running build_py

          creating build

          creating build/lib.aix-7.2-cpython-37

          copying src/pyodbc.pyi -> build/lib.aix-7.2-cpython-37

          running build_ext

          building 'pyodbc' extension

          creating build/temp.aix-7.2-cpython-37

          creating build/temp.aix-7.2-cpython-37/src

          gcc -maix64 -fPIC -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -DPYODBC_VERSION=4.0.39 -I/opt/freeware/include/python3.7m -c src/buffer.cpp -o build/temp.aix-7.2-cpython-37/src/buffer.o -Wno-write-strings

          In file included from src/buffer.cpp:12:

          src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory

           #include <sql.h>

                    ^~~~~~~

          compilation terminated.

          error: command '/usr/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 pyodbc

    Failed to build pyodbc

    ERROR: Could not build wheels for pyodbc, which is required to install pyproject.toml-based projects

     

     

     

     

     

    Thanks

     

    Steve Hansell

    Digital & IT Technical Specialist

    Infrastructure Engineer

    Parker Hannifin Corporation

    Midrange Team

    stevenhansell@parker.com

     



  • 2.  RE: Python question

    Posted Wed July 19, 2023 09:49 AM

    I think you are missing unixODBC-devel package that provides sql.h file.

    Please install this RPM package from AIX toolbox and try again.

     

    Thanks,

     

    Sanket Rathi

     






  • 3.  RE: Python question

    Posted Mon July 24, 2023 09:43 AM

    THanks, that is installed now, but the error changed to this.

     In file included from /usr/include/sys/resource.h:57,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/sys/wait.h:56,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/stdlib.h:391,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include/c++/cstdlib:75,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include/c++/stdlib.h:36,
                           from /opt/freeware/include/python3.7m/Python.h:34,
                           from src/pyodbc.h:45,
                           from src/buffer.cpp:12:
          /usr/include/sys/time.h:110:16: error: redefinition of 'struct sigset_t'
           typedef struct sigset_t {
                          ^~~~~~~~
          In file included from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/stdio.h:503,
                           from /opt/freeware/include/python3.7m/Python.h:25,
                           from src/pyodbc.h:45,
                           from src/buffer.cpp:12:
          /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/sys/types.h:345:16: note: previous definition of 'struct sigset_t'
           typedef struct sigset_t {
                          ^~~~~~~~
          In file included from /usr/include/sys/resource.h:57,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/sys/wait.h:56,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/stdlib.h:391,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include/c++/cstdlib:75,
                           from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include/c++/stdlib.h:36,
                           from /opt/freeware/include/python3.7m/Python.h:34,
                           from src/pyodbc.h:45,
                           from src/buffer.cpp:12:
          /usr/include/sys/time.h:126:3: error: conflicting declaration 'typedef int sigset_t'
           } sigset_t;
             ^~~~~~~~
          In file included from /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/stdio.h:503,
                           from /opt/freeware/include/python3.7m/Python.h:25,
                           from src/pyodbc.h:45,
                           from src/buffer.cpp:12:
          /usr/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/include-fixed/sys/types.h:361:3: note: previous declaration as 'typedef struct sigset_t sigset_t'
           } sigset_t;

       error: command '/usr/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 pyodbc
    Failed to build pyodbc
    ERROR: Could not build wheels for pyodbc, which is required to install pyproject.toml-based projects
    $ oslevel -s
    7200-05-03-2148

    Any idea on that on?

    thanks



    ------------------------------
    Steven Hansell
    ------------------------------



  • 4.  RE: Python question

    Posted Tue July 25, 2023 12:26 AM

    The machine is AIX 7.2 but the gcc installed seems to be for AIX 7.1 one. Probably this machine is migrated from 7.1 to 7.2. 
    Please make sure dnf.conf/yum.conf is now pointing to ppc-7.2 repo and then reinstall the gcc rpms. 
    Look into this blog for more info --> https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/01/10/aix-migration-with-dnf?CommunityKey=10c1d831-47ee-4d92-a138-b03f7896f7c9



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