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

llogrotate-3.14.0 dependencies

  • 1.  llogrotate-3.14.0 dependencies

    Posted Wed December 19, 2018 10:11 AM

    Originally posted by: MarkvanGelder


    L.S.

     

    We are a happy user of AIX Toolbox logrotate provided by IBM from here:

     

    http://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/logrotate/

     

    We have been using logrotate-3.8.5 for quite some time without any issues.

     

    We noticed that recently (since 09-Dec-2018) logrote-3.14.0 has been made available.

     

    We tried to move to that newer version but we run into a(some) dependency(ies).

     

    At installation:

     

    On 7.1

     

    # rpm -qa

    AIX-rpm-7.1.4.30-1

    sudo-1.8.8-1

    # rpm -Uhv logrotate-3.14.0-1.aix6.1.ppc.rpm

    error: failed dependencies:

            coreutils >= 8.29-2 is needed by logrotate-3.14.0-1

            libpopt.a(libpopt.so.0) is needed by logrotate-3.14.0-1

     

    On 7.2

     

    # rpm -qa

    sudo-1.8.8-1.ppc

    AIX-rpm-7.2.2.0-1.ppc

    # rpm -Uhv logrotate-3.14.0-1.aix6.1.ppc.rpm

    error: Failed dependencies:

            coreutils >= 8.29-2 is needed by logrotate-3.14.0-1.ppc

     

    At runtime:

     

    On 7.1

     

    # rpm -Uhv --nodeps logrotate-3.14.0-1.aix6.1.ppc.rpm

    logrotate                   ##################################################

    # logrotate

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

            0509-150   Dependent module libpopt.a(libpopt.so.0) could not be loaded.

            0509-022 Cannot load module libpopt.a(libpopt.so.0).

            0509-026 System error: A file or directory in the path name does not exist.

     

    On 7.2

     

    # rpm -Uhv --nodeps logrotate-3.14.0-1.aix6.1.ppc.rpm

    Preparing...                          ################################# [100%]

    Updating / installing...

       1:logrotate-3.14.0-1               ################################# [ 50%]

    Cleaning up / removing...

       2:logrotate-3.8.5-1                ################################# [100%]

    # logrotate

    logrotate 64bit - Copyright (C) 1995-2001 Red Hat, Inc.

    This may be freely redistributed under the terms of the GNU Public License

     

    Usage: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command] [-s|--state=statefile] [-v|--verbose]

            [-l|--log=logfile] [--version] [-?|--help] [--usage] [OPTION...] <configfile>

     

    These dependencies did not exist on both 7.1 and 7.2 with logrotate-3.8.5

     

    # rpm -Uhv logrotate-3.8.5-1.aix6.1.ppc.rpm

    logrotate                   ##################################################

    # logrotate

    logrotate 3.8.5 - Copyright (C) 1995-2001 Red Hat, Inc.

    This may be freely redistributed under the terms of the GNU Public License

     

    Usage: logrotate [-m command] [-s statefile] [--version] [--usage] [OPTION...] <configfile>

     

    Our question now is:

     

    Is it possible to recompile (and make available) logrotate-3.14.0 so that it is not complaining on any dependency (during installation and/or runtime)

    and/or that it can run on both platforms with a -nodeps installation?

     

    It would certainly alleviate the "dependency hell"

     

    PS: You might even consider providing the same for earlier versions of AIX i.e. AIX6.1…



  • 2.  Re: llogrotate-3.14.0 dependencies

    Posted Wed December 19, 2018 10:59 AM

    Originally posted by: AyappanP


    Lets clarify few things

    The earlier logrotate version 3.8.5 also has dependency on libpopt.

    # rpm -qR logrotate
    /bin/sh
    libc.a(shr.o)
    libpopt.so
    libpthreads.a(shr_xpg5.o)
    librtl.a(shr.o)

     

    And this library is coming from rpm.rte base fileset.

    # lslpp -f rpm.rte | grep libpopt
                            /usr/opt/freeware/lib/libpopt.a
                            /usr/opt/freeware/lib/libpopt.so -> /usr/opt/freeware/lib/libpopt.so.0
                            /usr/opt/freeware/lib/libpopt.so.0.0.0 -> /usr/opt/freeware/lib/libpopt.so.0
                            /usr/opt/freeware/lib/libpopt.so.0

     

     

    # rpm -q --provides AIX-rpm | grep popt
    libpopt.a(libpopt.so.0)
    libpopt.so
    libpopt.so.0
    libpopt.so.0.0.0

     

     

    And about the newer logrotate version 3.14.0 , it is linking to libpopt.a(libpopt.so.0) which again will be provided by rpm.rte fileset as shown above. 

    So something is wrong with the rpm.rte fileset in your 7.1 AIX machine. Run the below three commands in the 7.1 AIX machine and paste the output here.

    oslevel -s 

    lslpp -f rpm.rte | grep libpopt

    rpm -q --provides AIX-rpm | grep popt

     

    And i don't see any reason for having coreutils dependency. Will check on this. 

     



  • 3.  Re: llogrotate-3.14.0 dependencies

    Posted Thu December 20, 2018 05:58 AM

    Originally posted by: MarkvanGelder


    Hi AyappanP,

     

    First off, thanks for the quick reply.

     

    You are correct in that the older version (3.8.5) also has a dependency to libpopt.so which is provided by AIX-rpm (7.1.4.30 on AIX7.1).

    But somehow the newer version (3.14.0)  is not finding this library.

     

    Regarding the information you requested:

     

    # oslevel -s

    7100-04-05-1720

     

    # lslpp -f rpm.rte | grep libpopt

                            /usr/opt/freeware/lib/libpopt.so -> libpopt.so.0.0.0

                            /usr/opt/freeware/lib/libpopt.so.0.0.0

                            /usr/opt/freeware/lib/libpopt.so.0 -> libpopt.so.0.0.0

     

    # rpm -q --provides AIX-rpm | grep popt

    libpopt.so 

    libpopt.so.0 

    libpopt.so.0.0.0 

     

     

    I did some investigation on my own.

     

    # rpm -q logrotate

    logrotate-3.14.0-1

     

    # logrotate

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

            0509-150   Dependent module libpopt.a(libpopt.so.0) could not be loaded.

            0509-022 Cannot load module libpopt.a(libpopt.so.0).

            0509-026 System error: A file or directory in the path name does not exist.

     

    # truss ldd $(whence logrotate) 2>&1| grep popt

    statx("/libpopt.a", 0x20009E70, 176, 020)       Err#2  ENOENT

    statx("/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/ppc64/libpopt.a", 0x20009E70, 176, 020) Err#2  ENOENT

    statx("/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/libpopt.a", 0x20009E70, 176, 020) Err#2  ENOENT

    statx("/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/../../../libpopt.a", 0x20009E70, 176, 020) Err#2  ENOENT

    statx("/usr/lib/libpopt.a", 0x20009E70, 176, 020) Err#2  ENOENT

    statx("/lib/libpopt.a", 0x20009E70, 176, 020)   Err#2  ENOENT

    statx(" /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/ppc64 /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0 /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/../../.. /usr/lib /lib/libpopt.a", 0x20009E70, 176, 020) Err#2  ENOENT

    Cannot find libpopt.a(libpopt.so.0)

     

    For some reason it is looking for a .a file instead of a .so file (with the .a file within it).

     

    There is no libpopt.a file on 7.1

     

    # ls -l /usr/lib/libpopt* /usr/opt/freeware/lib/libpopt*

    lrwxrwxrwx    1 root     system           38 Feb 19 2018  /usr/lib/libpopt.so -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           38 Feb 19 2018  /usr/lib/libpopt.so.0 -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           38 Feb 19 2018  /usr/lib/libpopt.so.0.0.0 -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           16 Feb 19 2018  /usr/opt/freeware/lib/libpopt.so -> libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           16 Feb 19 2018  /usr/opt/freeware/lib/libpopt.so.0 -> libpopt.so.0.0.0

    -rwxr-xr-x    1 root     system        46789 Dec 20 2010  /usr/opt/freeware/lib/libpopt.so.0.0.0

     

    But there is on 7.2

     

    # ls -l /usr/lib/libpopt* /usr/opt/freeware/lib/libpopt*

    lrwxrwxrwx    1 root     system           31 Aug 08 10:59 /usr/lib/libpopt.a -> /usr/opt/freeware/lib/libpopt.a

    lrwxrwxrwx    1 root     system           38 Aug 08 10:59 /usr/lib/libpopt.so -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           38 Aug 08 10:59 /usr/lib/libpopt.so.0 -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    lrwxrwxrwx    1 root     system           38 Aug 08 10:59 /usr/lib/libpopt.so.0.0.0 -> /usr/opt/freeware/lib/libpopt.so.0.0.0

    -rwxr-xr-x    1 root     system       257571 Jul 08 2017  /usr/opt/freeware/lib/libpopt.a

    lrwxrwxrwx    1 root     system           34 Aug 08 10:59 /usr/opt/freeware/lib/libpopt.so -> /usr/opt/freeware/lib/libpopt.so.0

    -rwxr-xr-x    1 root     system       157515 Jul 08 2017  /usr/opt/freeware/lib/libpopt.so.0

    lrwxrwxrwx    1 root     system           34 Aug 08 10:59 /usr/opt/freeware/lib/libpopt.so.0.0.0 -> /usr/opt/freeware/lib/libpopt.so.0

     

    which is provided by AIX-rpm (7.2.2.0)

     

    # rpm -q --provides AIX-rpm | grep popt

    libpopt.a(libpopt.so.0)

    libpopt.so

    libpopt.so.0

    libpopt.so.0.0.0

     

    When I manually create one on the 7.1 system

     

    # ar -q /usr/lib/libpopt.a /usr/lib/libpopt.so.0

    # chmod 755 /usr/lib/libpopt.a

     

    I can use logrotate_32

     

    # logrotate_32                                                               

    logrotate 3.14.0 - Copyright (C) 1995-2001 Red Hat, Inc.

    This may be freely redistributed under the terms of the GNU Public License

     

    Usage: logrotate_32 [-m command] [-s statefile] [-l logfile] [--version]

            [--usage] [OPTION...] <configfile>

     

    But not logrotate_64

     

    # logrotate_64

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

            0509-150   Dependent module /usr/lib/libpopt.a(libpopt.so.0) could not be loaded.

            0509-103   The module has an invalid magic number.

    root@svbwas01o:/usr/lib# rm /usr/lib/libpopt.a

     

    Which is obvious as the .a file I created only contains the 32 bit version of libpopt.so.0

    I am unable to include the 64bit version as it is not provided by the AIX-rpm.

     

    I do hope you can understand that although I am able to make logrotate_32 work, this is not a/the solution I am looking for.

     

    Greetings,

    Mark



  • 4.  Re: llogrotate-3.14.0 dependencies

    Posted Thu December 20, 2018 06:52 AM

    Originally posted by: AyappanP


    I suggest you to install popt rpm from AIX Toolbox to fix this issue. 

    We are going to release a new rpm for logrotate which will have dependency on popt rpm (and no coreutils dependency).



  • 5.  Re: llogrotate-3.14.0 dependencies

    Posted Thu December 20, 2018 09:21 AM

    Originally posted by: MarkvanGelder


    Hmm.

     

    Instead of installing the popt rpm I updated the installed rpm.rte (3.0.5.52) to the first higher level that included a/the libpopt.a, 4.9.1.3.

    # oslevel -s
    7100-04-05-1720

    # lslpp -L rpm.rte
      Fileset                      Level  State  Type  Description (Uninstaller)
      ----------------------------------------------------------------------------
      rpm.rte                    4.9.1.3    C     F    RPM Package Manager

    # rpm -qa        
    AIX-rpm-7.1.4.31-2.ppc
    sudo-1.8.8-1.ppc
    logrotate-3.14.0-1.ppc

    # logrotate
    logrotate 64bit - Copyright (C) 1995-2001 Red Hat, Inc.
    This may be freely redistributed under the terms of the GNU Public License

    Usage: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command] [-s|--state=statefile] [-v|--verbose] [-l|--log=logfile]
            [--version] [-?|--help] [--usage] [OPTION...] <configfile>

     

    I still needed to install logrotate with --nodeps as I got this without it

    # rpm -Uhv logrotate-3.14.0-1.aix6.1.ppc.rpm
    error: Failed dependencies:
            coreutils >= 8.29-2 is needed by logrotate-3.14.0-1.ppc

     

    I don't know if I broke something with this.

    As far as the installed rpm's are concerned both sudo and logrotate work perfectly.

    And so do some commands that "depend" on it like oslevel.

     

    I'll discuss it here with my colleagues which method we will gonna use.

     

    BIG THANKS for the support!

     

    I'll await your/the next release of logrotate...

     

    Mark

     

     



  • 6.  Re: llogrotate-3.14.0 dependencies

    Posted Thu December 20, 2018 09:33 AM

    Originally posted by: AyappanP


    Historically some of the AIX Toolbox packages depends on the libraries provided by rpm.rte.

    And recently, we are moving away from this approach so that there won't be any dependency on the rpm.rte provided libraries.

    The next release of logrotate will have only popt rpm dependency.