I don't see any reason why 32bit python is trying to load the 64bit libcomps module. Do you have PYTHONPATH set ? If so, unset it and try again
Original Message:
Sent: Thu November 30, 2023 11:42 AM
From: Mi Wang
Subject: DNF Issue
Hi Ayappan,
Please find the command output:
$ file /opt/freeware/libexec/python3.9_32
/opt/freeware/libexec/python3.9_32: executable (RISC System/6000) or object module not stripped
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Thu November 30, 2023 01:28 AM
From: Ayappan P
Subject: DNF Issue
/opt/freeware/libexec/python3.9_32 is a 32bit python which will not search in /opt/freeware/lib64/python3.9/site-packages. Can you verify that it is indeed 32bit binary ?
# file /opt/freeware/libexec/python3.9_32
/opt/freeware/libexec/python3.9_32: executable (RISC System/6000 V3.1) or obj module not stripped
------------------------------
Ayappan P
Original Message:
Sent: Wed November 29, 2023 03:42 PM
From: Mi Wang
Subject: DNF Issue
Hello Ayappan,
Can you please provide steps to fix this? By the way, this is FYI - we have this issue only with our DEV servers which have Python 3.9.17. Meantime, our PAT servers have the exact same Python installation (just different version: Python 3.9.18) and they don't have this type issue.
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Tue November 28, 2023 02:48 PM
From: Mi Wang
Subject: DNF Issue
Hi Ayappan,
Please find the command run result:
$ head -1 $(which dnf)
#!/opt/freeware/libexec/python3.9_32
Thanks
Mi
------------------------------
Mi Wang
Original Message:
Sent: Tue November 28, 2023 04:54 AM
From: Ayappan P
Subject: DNF Issue
AIX 7.2 dnf should be invoking 32bit python3. Can you verify that ?
what is the output of "head -1 $(which dnf)" ?
------------------------------
Ayappan P
Original Message:
Sent: Mon November 27, 2023 09:27 AM
From: Mi Wang
Subject: DNF Issue
Hi SANGAMESH / Ayappan,
We have AIX 7.2 installed. But even I set LIBPATH to have only one folder /opt/freeware/lib, running dnf still gave the same error (it tried to access the library under /opt/freeware/lib64). Some setup issue?
Thanks
Mi
$: export LIBPATH=/opt/freeware/lib
$: dnf
Traceback (most recent call last):
File "/opt/freeware/bin/dnf", line 57, in <module>
from dnf.cli import main
File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 32, in <module>
import dnf.base
File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 31, in <module>
from dnf.comps import CompsQuery
File "/opt/freeware/lib/python3.9/site-packages/dnf/comps.py", line 36, in <module>
import libcomps
File "/opt/freeware/lib64/python3.9/site-packages/libcomps/__init__.py", line 1, in <module>
from ._libpycomps import *
ImportError: Could not load module /opt/freeware/lib64/python3.9/site-packages/libcomps/_libpycomps.so.
System error: Exec format error
------------------------------
Mi Wang
Original Message:
Sent: Fri November 24, 2023 09:21 AM
From: SANGAMESH MALLAYYA
Subject: DNF Issue
Hi Stefan,
libintl.a ship both 32 & 64-bit libintl.so.8 and rpm is 64-bit by default
# file /usr/opt/rpm/bin/rpm
/usr/opt/rpm/bin/rpm: 64-bit XCOFF executable or object module not stripped
# ar -X32_64 -tv /usr/opt/rpm/lib/libintl.a
rwxr-xr-x 0/0 93228 Jun 19 12:55 2023 libintl.so.8
rwxr-xr-x 0/0 101713 Jun 19 13:02 2023 libintl.so.8
rw-r----- 0/0 114582 Jun 19 13:02 2023 libintl.so.1
rw-r----- 0/0 130986 Jun 19 13:02 2023 libintl.so.1
Do you have any LIBPATH set still ?
------------------------------
SANGAMESH
Original Message:
Sent: Fri November 24, 2023 06:08 AM
From: Stefan Lehmann
Subject: DNF Issue
Hi Ayappan and Mi Wang,
same issue here:
root@sap1nim:/opt/freeware/packages: dnf list installed
Traceback (most recent call last):
File "/opt/freeware/bin/dnf", line 58, in <module>
from dnf.cli import main
File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 30, in <module>
import dnf.base
File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 29, in <module>
import libdnf.transaction
File "/opt/freeware/lib64/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
from . import common_types
File "/opt/freeware/lib64/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
from . import _common_types
ImportError: Symbol resolution failed for /opt/freeware/lib64/libkrb5support.so because:
Symbol _GLOBAL__AIXI_libintl_so (number 57) is not exported from dependent
module /usr/opt/rpm/lib/libintl.a[libintl.so.8].
Symbol _GLOBAL__AIXD_libintl_so (number 58) is not exported from dependent
module /usr/opt/rpm/lib/libintl.a[libintl.so.8].
Could not load module /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so.
System error: Exec format error
Examine .loader section symbols with the 'dump -Tv' command.
root@sap1nim:/opt/freeware/packages:
I checked the libint wether its 32 or 64bit:
/opt/freeware/packages: dump -ov /usr/opt/rpm/lib/libintl.a | grep -i agic
Magic = 0x1df (32-bit XCOFF)
maxSTACK maxDATA SNbss magic modtype
Magic = 0x1df (32-bit XCOFF)
maxSTACK maxDATA SNbss magic modtype
so we have a 32-bit libintl.a - probably explains failing ImportError: Symbol resolution failed for /opt/freeware/lib64/libkrb5support.so
Now try to find out where libintl.a comes from:
root@sap1nim:/opt/freeware/packages: lslpp -w /usr/opt/rpm/lib/libintl.a
File Fileset Type
----------------------------------------------------------------------------
/usr/opt/rpm/lib/libintl.a rpm.rte File
seems I need a 64-bit rpm - any suggestions how to deal with that?
Regards Stefan
------------------------------
Stefan Lehmann
Original Message:
Sent: Fri November 24, 2023 01:40 AM
From: Ayappan P
Subject: DNF Issue
Generally "System error: Exec format error" comes when a 32bit application is trying to load a 64bit shared lib or the vice versa. There looks to be some mix up of 32bit & 64bit here which is causing the issue.
What is the AIX level here? 7.3 or 7.2/7.1 ?
In AIX 7.3, the whole dnf ecosystem is 64bit based as rpm itself( coming from rpm.rte) is 64bit. In AIX 7.1/7.2, it is 32bit as rpm itself is 32bit.
------------------------------
Ayappan P
Original Message:
Sent: Thu November 23, 2023 05:09 PM
From: Mi Wang
Subject: DNF Issue
Hi Ayappan,
I got following error when trying to launch DNF. It was fine after Python 3.9 upgrade. The file /opt/freeware/lib64/python3.9/site-packages/libcomps/_libpycomps.so was there. Should I reinstall libcomps? But giving the situation dnf itself doesn't work, how can I reinstall it?
Thanks
Mi
root: dnf
Traceback (most recent call last):
File "/opt/freeware/bin/dnf", line 57, in <module>
from dnf.cli import main
File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 32, in <module>
import dnf.base
File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 31, in <module>
from dnf.comps import CompsQuery
File "/opt/freeware/lib/python3.9/site-packages/dnf/comps.py", line 36, in <module>
import libcomps
File "/opt/freeware/lib64/python3.9/site-packages/libcomps/__init__.py", line 1, in <module>
from ._libpycomps import *
ImportError: Could not load module /opt/freeware/lib64/python3.9/site-packages/libcomps/_libpycomps.so.
System error: Exec format error
------------------------------
Mi Wang
------------------------------