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.  pygit2 or libgit2 for AIX

    Posted Fri August 21, 2020 05:12 AM

    Hello Team,

    we are trying to connect our salt-master on AIX to the git server. To do so we would need pygit2 or libgit2 for AIX.

    Is it planned from your side to make it available on the AIX Toolbox???

    We already tried to compile it our self but faced some major problems with gcc...

    Many thanks in advance for your support.
    best regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------


  • 2.  RE: pygit2 or libgit2 for AIX

    Posted Mon August 24, 2020 03:35 AM
    Hi Joerg,

    Right now there is no plan for libgit2 and pygit2 from AIX toolbox. We can consider for future depends on the interest from others.
    Could you please let us know what problem/error you have faced while compiling. 
    Hope we or someone can help you.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: pygit2 or libgit2 for AIX

    Posted Wed August 26, 2020 09:07 AM
    Hello 

    I am Sylvain a colleague of Joerg.

    I have compiled with GCC the sources of the libgit2 library on AIX 7.2 TL4 (7200-04-02-2016).
    The libgit2_clar test executable could be started.

    There is a problem with the AIX linker (ld) when compiling pygit2 sources.
    A message indicates undefined symbols, but the functions are defined in the libgit2.a library. The library is in /usr/local/lib

    ../..
    (ld): lib /usr/local/lib/libgit2.a
    (ld): i /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/pthread/ppc64/libgcc.a
    (ld): i /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/pthread/ppc64/libgcc_eh.a
    (ld): lib /usr/lib/libpthreads.a
    (ld): lib /usr/lib/libc.a
    (ld): lib /usr/lib/librtl.a
    LIBRARY: Shared object libpthreads.a[shr_xpg5_64.o]: 352 symbols imported.
    LIBRARY: Shared object libc.a[shr_64.o]: 3148 symbols imported.
    LIBRARY: Shared object libc.a[posix_aio_64.o]: 20 symbols imported.
    LIBRARY: Shared object libc.a[aio_64.o]: 18 symbols imported.
    LIBRARY: Shared object libc.a[pse_64.o]: 8 symbols imported.
    LIBRARY: Shared object libc.a[dl_64.o]: 4 symbols imported.
    LIBRARY: Shared object libc.a[pty_64.o]: 1 symbols imported.
    LIBRARY: Shared object libc.a[cthread_64.o]: 25 symbols imported.
    LIBRARY: Shared object libc.a[uchar_64.o]: 4 symbols imported.
    LIBRARY: Shared object librtl.a[lazy42_64.o]: 3 symbols imported.
    FILELIST: Number of previously inserted files processed: 37
    (ld): imports /opt/freeware/lib/python3.7/config-3.7m/python.exp
    IMPORTS: Symbols imported from import file /opt/freeware/lib/python3.7/config-3.7m/python.exp: 1882
    (ld): exports _pygit2.exp
    EXPORTS: Symbols exported: 412
    (ld): resolve
    RESOLVE: 1242 of 10522 symbols were kept.
    (ld): addgl /usr/lib/glink64.o
    ADDGL: Glink code added for 337 symbols.
    (ld): er full
    ld: 0711-318 ERROR: Undefined symbols were found.
    The following symbols are in error:
    Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
    RLD: Address Section Rld-type Referencing Symbol
    ----------------------------------------------------------------------------------------------
    .git_repository_discover [14] ER PR src/pygit2.c(build/temp.aix-7.2-3.7/src/pygit2.o)
    000000ac .text R_RBR [1313] .discover_repository
    .git_buf_dispose [20] ER PR src/pygit2.c(build/temp.aix-7.2-3.7/src/pygit2.o)
    00000144 .text R_RBR [1313] .discover_repository
    .git_buf_dispose [22] ER PR src/patch.c(build/temp.aix-7.2-3.7/src/patch.o)

    ../..

    Thanks & best regards
    Sylvain

    ------------------------------
    Sylvain Munsch
    ------------------------------



  • 4.  RE: pygit2 or libgit2 for AIX

    Posted Thu August 27, 2020 06:11 AM
    Hi Sylvain, 

    Can you please provide more information.
    What python version you are using and how are you compiling pygit2? 
    Are you using setup.py ? 
    In your output I am not able to find exactly what symbols are reported missing.
    If you are using setup.py using python then it will search library in some specific paths and /usr/local/lib is not one of them.
    Probably for installing of libgit2 you should provide prefix directory as /opt/freeware then try pygit2.

    # cmake .. -DCMAKE_INSTALL_PREFIX=/opt/freeware
    # cmake --build . --target install

    ​​

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 5.  RE: pygit2 or libgit2 for AIX

    Posted Fri August 28, 2020 07:36 AM

    Hi Sanket,

     

    I reinstalled the libgit2 in /opt/freeware:

     

     

     

    I compile pygit2 with: python setup.py build_ext --inplace -g

    And the version of python is 3.7.6

     

     

    The compilation indicates for example that the git_repository_discover symbol is not defined.

     

     

    but I feel that the function exists in the library /opt/freeware/lib/libgit2.a.

     

     

    Have I forgotten something ?

    I made a mistake ?

     

    Thanks

    Sylvain






  • 6.  RE: pygit2 or libgit2 for AIX

    Posted Fri August 28, 2020 08:03 AM
    Did you make libgit2 64 bit ? python3 by default is 64 bit, it builds 64bit modules and needs 64bit libraries.
    If libgit2 is not compiled for 64bit then please build libgit2 64bit and install and they try pygit2.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 7.  RE: pygit2 or libgit2 for AIX

    Posted Thu September 10, 2020 07:05 AM

    I compiled the libgit2 in 64 bit.

     

    I tried to compile pygit2 but it failed with the following error:

     

    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXI_libgit2_so

    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXD_libgit2_so

    collect2: error: ld returned 8 exit status

    error: command '/opt/freeware/lib/python3.7/config-3.7m/ld_so_aix' failed with exit status 1

     






  • 8.  RE: pygit2 or libgit2 for AIX

    Posted Thu September 10, 2020 09:47 AM
    Looks like there is some issue with this flag "-fvisibility=hidden" being used in libgit2 build. 
    Try removing the below line from  CMakeLists.txt in libgit2 and rebuild libgit2.

    " ADD_C_FLAG_IF_SUPPORTED(-fvisibility=hidden) "

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



  • 9.  RE: pygit2 or libgit2 for AIX

    Posted Mon September 14, 2020 05:22 AM

    I removed the parameter " ADD_C_FLAG_IF_SUPPORTED(-fvisibility=hidden) " from CMakeLists.txt,

    and the compilation from pygit2 is working.

    Thanks for your help.