I see from version 2.0.30-2 onwards it links to Toolbox libiconv library ( ie., libiconv.a(libiconv.so.2) ) rather than the AIX base libiconv.a( shr4_64.o) library.
Also the library search path for gnupg is also fine.
# ldd /opt/freeware/bin/gpg2
/opt/freeware/bin/gpg2 needs:
 /usr/lib/libc.a(shr_64.o)
 /usr/lib/libpthread.a(shr_xpg5_64.o)
 /opt/freeware/lib/libintl.a(libintl.so.8)
 /opt/freeware/lib64/libreadline.a(libreadline.so.8)
 /opt/freeware/lib64/libgcrypt.a(libgcrypt.so.20)
 /opt/freeware/lib/libiconv.a(libiconv.so.2)
 /opt/freeware/lib64/libgpg-error.a(libgpg-error.so.0)
 /opt/freeware/lib64/libassuan.a(libassuan.so.0)
 /opt/freeware/lib/libz.a(libz.so.1)
 /opt/freeware/lib64/libbz2.a(libbz2.so.1)
 /unix
 /usr/lib/libcrypt.a(shr_64.o)
 /usr/lib/libpthreads.a(shr_xpg5_64.o)
 /usr/lib/libcurses.a(shr42_64.o)
 /opt/freeware/lib64/libgcc_s.a(shr.o)
 /opt/freeware/lib64/libintl.a(libintl.so.8)
So i think the scripts might be manipulating the LIBPATH somehow.
------------------------------
Ayappan P
------------------------------
                                                
					
                                                    
        
                                                
				
                                                
                                                Original Message:
Sent: Wed July 08, 2020 09:20 AM
From: Lori Bernier
Subject: gnupg2 - libiconv.a issue
Looking for some insight on an issue with gnupg2 and libiconv.a. 
gnupg2.ppc 2.0.30-1   was installed, the application and scripts using it were working fine.   I updated to gnupg2.ppc 2.0.30-2 and now the scripts are throwing the following error:
ValueError: Error invoking gpg: 255: Could not load program gpg2:
                Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
                Member libiconv.so.2 is not found in archive
If I revert back to the 2.0.30-1 version, the scripts work again.  If I replace /usr/lib/libiconv.a with /opt/freeware/lib/libiconv.a, the scripts work.    I realize the issue here is the LIBPATH, but I am not understanding why version 2.0.30-1 is ok and 2.0.30-2 is not ok.  My application support team is trying to figure out where/how the LIBPATH is getting set to /usr/lib but so far has been unsuccessful.  This is preventing me from updating to a more current version of gnupg2 so appreciate any insight.
------------------------------
Lori Bernier
------------------------------
#AIXOpenSource