AIX Dependent Module could not be loaded

I am encountering the above error , even after setting the environment variables correctly AFAIK. I've found sources that say LIBPATH is the shared library variable , and others that say LIB_PATH, so I set both:

=========================
root@lipossrp01ga: # echo $gtm_dist 
/SCA/gtm_dist-V5.4-002A/
root@lipossrp01ga: # echo $LIBPATH 
/usr/local:/usr/local/lib:/SCA/gtm_dist-V5.4-002A/:/SCA/gtm_dist-V5.4-002A//plugin:/SCA/gtm_dist-V5.4-002A/plugin/gtmcrypt/:/usr/lib
root@lipossrp01ga: # echo $LIB_PATH 
/usr/local:/usr/local/lib:/SCA/gtm_dist-V5.4-002A/:/SCA/gtm_dist-V5.4-002A//plugin:/SCA/gtm_dist-V5.4-002A/plugin/gtmcrypt/:/usr/lib
root@lipossrp01ga: # find /usr/local -name libgpgme.* -ls 
4116 1 -rwxr-xr-x 1 root system 865 Dec 19 09:40 /usr/local/lib/libgpgme.la
4117 878 -rwxr-xr-x 1 root system 898930 Dec 19 09:40 /usr/local/lib/libgpgme.so
4118 878 -rwxr-xr-x 1 root system 898930 Dec 19 09:40 /usr/local/lib/libgpgme.so.11
4119 878 -rwxr-xr-x 1 root system 898930 Dec 19 09:40 /usr/local/lib/libgpgme.so.11.6.3
root@lipossrp01ga: # find $gtm_dist -name libgtmcrypt.* -ls 
49238 52 -rwxrwxr-x 1 root system 52228 Apr 29 2011 /SCA/gtm_dist-V5.4-002A/plugin/gtmcrypt/libgtmcrypt.so
49237 100 -rwxrwxr-x 1 root system 101457 Apr 29 2011 /SCA/gtm_dist-V5.4-002A/plugin/gtmcrypt/libgtmcrypt.so.map
49186 52 -rwxrwxr-x 1 root system 52228 Apr 29 2011 /SCA/gtm_dist-V5.4-002A/plugin/libgtmcrypt.so
=========================

Yet, I still get a load error:

=========================
root@lipossrp01ga: # $gtm_dist/mupip journal -extract=testlog -fences=none -noverify -forward xref.mjl_2011356230009
%GTM-I-MUJNLSTAT, Initial processing started at Fri Dec 23 09:24:19 2011
%GTM-I-MUJNLSTAT, Backward processing started at Fri Dec 23 09:24:19 2011
%GTM-I-MUJNLSTAT, Forward processing started at Fri Dec 23 09:24:19 2011
%GTM-I-FILERENAME, File testlog is renamed to testlog_2011357092203
%GTM-I-FILECREATE, Journal extract file testlog created
%GTM-E-CRYPTDLNOOPEN, Error loading encryption library. 0509-022 Cannot load module /SCA/gtm_dist-V5.4-002A//plugin/libgtmcrypt.so.
0509-150 Dependent module libgpgme.a(libgpgme.so.11) could not be loaded.
0509-022 Cannot load module libgpgme.a(libgpgme.so.11).
0509-026 System error: A file or directory in the path name does not exist.
0509-022 Cannot load module /SCA/gtm_dist-V5.4-002A//plugin/libgtmcrypt.so.
0509-150 Dependent module /SCA/gtm_dist-V5.4-002A//plugin/libgtmcrypt.so could not be loaded.
%GTM-E-MUNOACTION, MUPIP unable to perform requested action
%GTM-I-MUJNLSTAT, End processing at Fri Dec 23 09:24:19 2011
root@lipossrp01ga: # 
=========================
 

I do not have the libgpgme.a file, just the shared libraries. Could that be the issue? Any help would be appreciated.

Clovis,
we face similar issues many times on AIX box. Many times restart of the system solves our problem. You can try for that if you know the thing was working sometime back.

Did you change any library meantime? Is it possible that the library you changed is built using higher/lower version of compiler than the other libraries?

-Ashish

1 Like

Hello Ashish,
Thanks for your reply. I have not yet tried rebooting this system. I'm a consultant at this firm, and while I've been given root access to this machine I probably need to notify people who will get monitoring alerts & such before I do a reboot. I do need to try that, though.

 Yes, it is entirely possible that I'm running into some kind of version incompatibility issue. I'm just being given the compiled software and libraries, the server I'm using doesn't have a development system on it. The people who supplied the software are due back from the holidays tomorrow, I hope to hear from then soon.

---------- Post updated at 12:54 PM ---------- Previous update was at 12:44 PM ----------

Hi Mr Moderator,
I did not include any code, just lines from a terminal session, but sure, whatever. I think I see how to do that. The link you supplied gives me an error, BTW.

The fellow moderator's link is usable now.

I went hunting for AIX RPM's that might have libgpgme.a in them. I found and retrieved one, it turned out to be for a different CPU but I was able to examine the libgpgme.a that came with it. It turned out the only module inside the libgpgme.a archive was --- libgpgme.so.11 !

This seems kind of silly to me. I'm not a Unix developer but I always thought that "libxxxxx.a" files held static object files, and "libxxxx.so" files held shared object files. I never noticed a shared library being stored as a module in a static library before.

Well, I have the libgpgme.so.11 file for my system, it's right there in /usr/local/lib, so I ran 'ar' and made a libgpgme.a library whose only module was the shared library. It works!! (Or at least, it gets me to the point of needing a cipher to decrypt the files I want to access.):

++++++++++++++++++++
lipossrp01ga:/data/7700 $ /SCA/gtm_dist-V5.4-002A/mupip journal -extract=test.log -fences=none -noverify -forward acn.mjl_2012002010300 
%GTM-I-MUJNLSTAT, Initial processing started at Wed Jan  4 09:55:11 2012
%GTM-I-MUJNLSTAT, Backward processing started at Wed Jan  4 09:55:11 2012
%GTM-I-MUJNLSTAT, Forward processing started at Wed Jan  4 09:55:11 2012
%GTM-I-FILERENAME, File test.log is renamed to test.log_2012004095453
%GTM-I-FILECREATE, Journal extract file test.log created
%GTM-E-CRYPTINIT, Error initializing encryption library. Environment variable gtm_passwd not set
%GTM-E-MUNOACTION, MUPIP unable to perform requested action
%GTM-I-MUJNLSTAT, End processing at Wed Jan  4 09:55:11 2012
lipossrp01ga:/data/7700 $
++++++++++++++++++++

I have to idea why my program (mupip) cannot simply find and use the shared library, but instead must open a static library and read the shared library from it. Has anybody ever encountered something like this?

Not that I'm complaining, I'm glad it works. But it seems silly.

Hi Clovis
Nice to see you made it worked..
Looking at your work I think if you create a soft link libgpgme.a for libgpgme.so.11 it should work for you.

I have seen similar things with libjvm.a and libjvm.so. Not sure why they are so.

In case of aix, .a and .so are not same as on other unix systems.

thanks,
Ashish

> Looking at your work I think if you create a soft link libgpgme.a for libgpgme.so.11 > it should work for you.

Hi Ashish,
I tried this, and the application program was not at all happy with the result. It spat errors like:

==========
0509-150 Dependent module /usr/local/lib/libgpgme.a(libgpgme.so.11) could not be loaded.
0509-153 File /usr/local/lib/libgpgme.a is not an archive or
the file could not be read properly.
0509-026 System error: Cannot run a file that does not have a valid format.

It really does seems to insist on having a ".a" archive file fom which to extract the shared library. The two are different:

==========
root@lipossrp01ga: # ls -l libgpgme.*
-rwxr-xr-x 1 root system 922675 Jan 04 09:13 libgpgme.a
-rwxr-xr-x 1 root system 865 Dec 19 09:40 libgpgme.la
-rwxr-xr-x 1 root system 898930 Dec 19 09:40 libgpgme.so
-rwxr-xr-x 1 root system 898930 Dec 19 09:40 libgpgme.so.11
-rwxr-xr-x 1 root system 898930 Dec 19 09:40 libgpgme.so.11.6.3

> I have seen similar things with libjvm.a and libjvm.so. Not sure why they are so.
> In case of aix, .a and .so are not same as on other unix systems.

Yes, I was trying to make sense of these differences at:

Help - IBM AIX Compilers

but it did not make a great deal of sense to me. Oh well, at least it works. I was finally able to get it to decrypt properly.

Yours,
Clovis