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