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
Expand all | Collapse all

libxml Problem under AIX

  • 1.  libxml Problem under AIX

    Posted Thu October 20, 2022 09:03 AM
    Hi
    using PowerHA Tool pgm clrest producting an error message:

    root@rb3zf15cl(Fe):/ $ ldd /usr/es/sbin/cluster/utilities/clrest
    /usr/es/sbin/cluster/utilities/clrest needs:
    /usr/lib/libc.a(shr.o)
    /usr/lib/libpthreads.a(shr_xpg5.o)
    /usr/lib/libodm.a(shr.o)
    /usr/es/lib/libclstr.a(shr.o)
    /usr/lib/libcluster.a(shr.o)
    /opt/freeware/lib/libcurl.a(libcurl.so.4)
    /opt/freeware/lib/libxml2.a(libxml2.shr.o)
    ar: 0707-109 Member name libxml2.shr.o does not exist.
    dump: /tmp/tmpdir15729778/extract/libxml2.shr.o: 0654-106 Cannot open the specified file.
    /unix
    /usr/lib/libcrypt.a(shr.o)
    /usr/lib/libpthreads.a(shr_comm.o)
    /usr/lib/libsrc.a(shr.o)
    /usr/lib/libpthreads_compat.a(shr.o)
    /usr/lib/libinstall.a(shr.o)
    /usr/lib/libstorfwork.a(shr.o)
    /usr/lib/libcfg.a(shr.o)
    /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.2)
    /opt/freeware/lib/libssl.a(libssl.so.1.0.2)
    /opt/freeware/lib/libz.a(libz.so.1)
    /opt/freeware/lib/libldap.a(libldap-2.4.so.2)
    /opt/freeware/lib/liblber.a(liblber-2.4.so.2)
    /usr/lib/libpthreads.a(shr.o)
    /opt/freeware/lib/libgcc_s.a(shr.o)
    /opt/freeware/lib/libsasl2.a
    /usr/lib/libs.a(shr.o)
    /usr/lib/libdl.a(shr.o)

    root@rb3zf15cl(Fe):/ $ rpm -qa|grep xml
    libxml2-2.9.10-1.ppc


    correcting the LIBPATH in AIX it is working :


    root@rb3zf15cl(Fe):/ $ export LIBPATH=/usr/lib

    root@rb3zf15cl(Fe):/ $ /usr/es/sbin/cluster/utilities/clrest

     

    /usr/es/sbin/cluster/utilities/clrest: Usage:

            clrest -o open {-H <Hmcname> -u <username> -x <password>}


    checking archive:


    root@rb3zf15cl(Fe):/ $ ar -t /opt/freeware/lib/libxml2.a

    libxml2.so.2


      0509-152   Member libxml2.shr.o is not found in archive  



    root@rb3zf15cl(Fe):/ $ ar -t  /usr/lib/libxml2.a

    libxml2.so.2

    libxml2.shr.o



    what is my problem here please ?
    thx
    vince









    ------------------------------
    Vincencio Michaelis
    ------------------------------


  • 2.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 09:55 AM
    Hi Vince,

    what is your default LIBPATH? Was it set up or not?

    AIX has its own libxml2.a in the package bos.rte.control (don't remember since which version). In this case you have a conflict between two libxml2.a libraries.


    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 10:07 AM
    Hi
    by default the LIBPATH on this Lpar is empty but if you check with dump the binary you see this:


    /usr/es/sbin/cluster/utilities/clrest:

    ***Loader Section***
    Loader Header Information
    VERSION# #SYMtableENT #RELOCent LENidSTR
    0x00000001 0x0000008e 0x0000017f 0x000000ce

    #IMPfilID OFFidSTR LENstrTBL OFFstrTBL
    0x00000008 0x00001f64 0x0000050d 0x00002032


    ***Import File Strings***
    INDEX PATH BASE MEMBER
    0 /opt/freeware/lib:/usr/es/lib:/usr/lib:/lib:/usr/lpp/xlC/lib



    so the Libpath in the binary itself is wrong....



    ------------------------------
    Vincencio Michaelis
    ------------------------------



  • 4.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 10:26 AM
    Yes, I checked it on one of my PowerHA clusters and can confirm the problem. But I think it is a problem of PowerHA development - clrest is part of cluster.es.server.utils package. Did you try to open a case?

    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 5.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 10:58 AM
    Hi
    yes there is case #TS010873877 open from our side​

    ------------------------------
    Vincencio Michaelis
    ------------------------------



  • 6.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 11:11 AM
    Hi Vince,

    Yes as you discussed this is issue with the binary. It has wrong library path for libxml2. 
    Looks like it was built with AIX base libxml2.a that has libxml2.shr.o shared object but in the binary search path
    it is looking the same library in /opt/freeware/lib. 
    We need to discuss this with PowerHA team.
    Is it happening in the latest PowerHA or this was always the case ? 


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



  • 7.  RE: libxml Problem under AIX

    Posted Mon October 24, 2022 11:17 PM
    Hello Sanket
    sorry for delay but i was out of office attending an IBM conference....the HA Version is 7.2.5
    We have opened a ticket at powerha i will provide to you...or you you had the chance to discuss with PowerHA Team ?
    In the directory i see this

    root@rb3zi15cl(Si):/usr/es/sbin/cluster/utilities $ ls -la /opt/freeware/lib/libxml*
    -rwxr-xr-x 1 root system 9600864 Nov 19 2020 /opt/freeware/lib/libxml2.a
    -rwxr-xr-x 1 root system 6062188 Nov 19 2020 /opt/freeware/lib/libxml2.so.2

    ------------------------------
    Vincencio Michaelis
    ------------------------------



  • 8.  RE: libxml Problem under AIX

    Posted Tue October 25, 2022 12:31 AM
    Update from the ticket TS010873877


    graber (IBM)

    1. Okt. 2022, 18:07

    Hi Sebastian,

    I am still discussing your question about lib path preference to the PowerHA Developers.
    I am taking the position that this is a code error and should be fixed.
    I am waiting the response from Developers.
    Best Regards,
    Loel Graber



    ------------------------------
    Vincencio Michaelis
    ------------------------------



  • 9.  RE: libxml Problem under AIX

    Posted Tue October 25, 2022 12:57 AM
    In HA 7.2.3 SP2 we dont see this problem:

    root@rb3pi53cl(Si):/ $  dump  -n /usr/es/sbin/cluster/utilities/clrest | head -n 30

     

    /usr/es/sbin/cluster/utilities/clrest:

     

                            ***Loader Section***

                          Loader Header Information

    VERSION#         #SYMtableENT     #RELOCent        LENidSTR

    0x00000001       0x0000008f       0x0000017e       0x000000bc

     

    #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL

    0x00000008       0x00001f70       0x0000050d       0x0000202c

     

     

                            ***Import File Strings***

    INDEX  PATH                          BASE                MEMBER

    0      /usr/es/lib:/usr/lib:/lib:/usr/lpp/xlC/lib

    1                                    libc.a              shr.o

    2                                    libpthreads.a       shr_xpg5.o

    3                                    libodm.a            shr.o

    4                                    libclstr.a          shr.o

    5                                    libcluster.a        shr.o

    6                                    libcurl.a           libcurl.so.4

    7                                    libxml2.a           libxml2.shr.o

     

                            ***Loader Symbol Table Information***

    [Index]      Value      Scn     IMEX Sclass   Type           IMPid Name

     

    [0]     0x0000e000   0x0000     0x08   0x07    0x0          0x0001 ___bzero

    [1]     0x0000e008   0x0000     0x08   0x07    0x0          0x0001 ___memset

    [2]     0x0000f000   0x0000     0x08   0x07    0x0          0x0001 ___memmove

    [3]     0x0000f800   0x0000     0x08   0x07    0x0          0x0001 ___fill

    root@rb3pi53cl(Si):/ $ halevel -s

    7.2.3 SP2

     

     



    ------------------------------
    Vincencio Michaelis
    ------------------------------



  • 10.  RE: libxml Problem under AIX

    Posted Tue October 25, 2022 02:38 PM
    Hi Vince, I have informed this to HA team and waiting for their response.

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



  • 11.  RE: libxml Problem under AIX

    Posted Thu October 20, 2022 11:31 AM
    As a workaround (until PowerHA problem is solved), you can extract libxml2.shr.o from AIX libxml2.a and add it to /opt/freeware/lib/libxml2.a:

    mkdir /tmp/1
    cd /tmp/1
    ar x /usr/ccs/lib/libxml2.a
    cp /opt/freeware/lib/libxml2.a .
    ar q libxml2.a libxml2.shr.o
    mv /opt/freeware/lib/libxml2.a /opt/freeware/lib/libxml2.a.orig
    mv libxml2.a /opt/freeware/lib/

    But you have to repeat the procedure every time, you update the RPM package.

    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------