AIX Open Source

 View Only
  • 1.  Bash library clash with syncsort

    Posted Tue February 16, 2021 06:46 AM
    Hi,

    I recently updated bash from bash-4.2-3.ppc to bash-5.0.18-1.ppc on our systems and found a clash with a library from our application which uses syncsort.

    exec(): 0509-036 Cannot load program /bin/bash because of the following errors:

            0509-130 Symbol resolution failed for /opt/freeware/lib/libiconv.a[libiconv.so.2] because:

            0509-136   Symbol _GLOBAL__AIXI_shr_o (number 2) is not exported from

                       dependent module /usr/dmexpress/lib/libgcc_s.a[shr.o].

            0509-136   Symbol _GLOBAL__AIXD_shr_o (number 3) is not exported from

                       dependent module /usr/dmexpress/lib/libgcc_s.a[shr.o].

            0509-192 Examine .loader section symbols with the

                     'dump -Tv' command.

    We have quite a few application scripts written in bash which need to perform application operations.  Removing /usr/dmexpress/lib from LIBPATH causes problems for the application as it cannot use the /opt/freeware/lib version of the library.

    bash-4.2-3.ppc doesn't have the dependancy on libgcc_s.a:-

    # rpm -qa |grep bash
    bash-4.2-3.ppc
    bash-doc-4.2-2.ppc
    # ldd /usr/bin/bash
    /usr/bin/bash needs:
    /usr/lib/libc.a(shr_64.o)
    /usr/lib/libpthreads.a(shr_xpg5_64.o)
    /opt/freeware/lib/libintl.a(libintl.so.1)
    /usr/lib/libcurses.a(shr42_64.o)
    /opt/freeware/lib/libiconv.a(shr4_64.o)
    /usr/lib/libdl.a(shr_64.o)
    /unix
    /usr/lib/libcrypt.a(shr_64.o)

    While bash-5.0.18-1.ppc does:-

    # rpm -qa |grep bash
    bash-5.0.18-1.ppc
    # ldd /usr/bin/bash
    /usr/bin/bash needs:
    /usr/lib/libc.a(shr_64.o)
    /opt/freeware/lib/libiconv.a(libiconv.so.2)
    /usr/lib/libcurses.a(shr42_64.o)
    /usr/lib/libdl.a(shr_64.o)
    /unix
    /usr/lib/libcrypt.a(shr_64.o)
    /opt/freeware/lib64/libgcc_s.a(shr.o)

    Is it possible to provide a newer version of bash that doesn't have the dependancy on libgcc_s.a via /opt/freeware/lib/libiconv.a?  For now I've version locked bash but I'm sure at some stage we will need to update to a newer version due to the requirements to address any security bugs etc.

    Thanks,
    Phill.

    ​​

    ------------------------------
    Phill Rowbottom
    ------------------------------


  • 2.  RE: Bash library clash with syncsort

    Posted Thu February 18, 2021 01:34 AM
    Hi Phil,

    All most all of our toolbox packages are now building using gcc.

    What version of gcc is /usr/dmexpress/lib/libgcc_s.a based upon and your application really needs to have libgcc_s.a ?
    I guess it would be better to use the newer libgcc.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 3.  RE: Bash library clash with syncsort

    Posted Thu February 18, 2021 06:38 AM
    Hi Sangamesh,

    That is a good quesiton, syncsort/DMExpress is COTS so I don't have any information on which compiler etc is used to build it.  We have 2 different versions of the DMExpress/syncsort software installed for our two different application that utilise it (both apps utilise the same DB and application programing environment though).  It is actually the newer version of syncsort that has this issue, the older version is fine.

         [DMExpress 7.5 AIX 5.3 Power 64-bit Copyright (c) 2012 Syncsort Inc.]

        [For license use by company name removed ]   

           [DMExpress 9.9 AIX 6.1 Power 64-bit Copyright (c) 2019 Syncsort Inc.]

         [For license use by company name removed ]

    DMExpress 7.5 doesn't experience the issue, but 9.9 does.  DMExpress 9.9 creates a clash wtih libstdc++ for the latest python, but we can work with that by clearing /usr/dmexpress/lib out of LIBPATH in our few scripts that call python as they are things like yum and calling some backups (cohesity via restapi), but we can't do that for scripts that interface with the application like the bash scripts do.

    We are running on AIX 7.2, so that could affect the GCC library versions in the builds.

    With the LIBPATH set to this so that the DMexpress libgcc_s.a is first (/usr/dmexpress/lib) gives the following result for bash:-

    exec(): 0509-036 Cannot load program /bin/bash because of the following errors:

            0509-130 Symbol resolution failed for /opt/freeware/lib/libiconv.a[libiconv.so.2] because:

            0509-136   Symbol _GLOBAL__AIXI_shr_o (number 2) is not exported from

                       dependent module /usr/dmexpress/lib/libgcc_s.a[shr.o].

            0509-136   Symbol _GLOBAL__AIXD_shr_o (number 3) is not exported from

                       dependent module /usr/dmexpress/lib/libgcc_s.a[shr.o].

            0509-192 Examine .loader section symbols with the

                     'dump -Tv' command.

    So the obvious thing here is that the two different versions of libgcc_s.a aren't really interchangeable.

    While if /opt/freeware/lib is first in LIBPATH syncsort 9.9 has the problem with libstdcc++

    exec(): 0509-036 Cannot load program natural because of the following errors:

            0509-130 Symbol resolution failed for /usr/dmexpress/lib/libsyncsort.a[libsyncsort.so] because:

            0509-136   Symbol _ZNKSt9type_infoeqERKS_ (number 60) is not exported from

                       dependent module /opt/freeware/lib/libstdc++.a[libstdc++.so.6].

            0509-192 Examine .loader section symbols with the

                     'dump -Tv' command.


    Hence staying with the older version of bash works for us with DMExpress 9.9, at least for now.

    Phill.





    ------------------------------
    Phill Rowbottom
    ------------------------------