|
Home > Archive > Unix Programming > November 2005 > AIX shared libraries again
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
AIX shared libraries again
|
|
| Dan Stromberg 2005-11-01, 8:52 pm |
|
I'm revisiting the loader domain thing again. :-S
This time, I'm working on building a -usable- version of OPeNDAP, but the
application itself isn't that relevant to the difficulty.
Specifically, when I try to run one of the programs, after a
seemingly-successful compile, I get:
esmf04m-root> /usr/local/OPeNDAP-3.5.3/bin/dap_asciival
exec(): 0509-036 Cannot load program /usr/local/OPeNDAP-3.5.3/bin/dap_asciival because of the following errors:
0509-022 Cannot load module /usr/local/lib/libxml2.a(libxml2.so.2).
0509-150 Dependent module /usr/local/lib/libiconv.a(shr4_64.o) could not be loaded.
0509-152 Member shr4_64.o is not found in archive
Tue Nov 01 15:20:46
I'm thinking this is probably because the program is linked against
/usr/local/lib/libiconv.a, but the global loader domain has
/usr/lib/libiconv.a already in it, so things go kerflooey.
However, I've made every reasonable effort to get this program into
-its-own- loader domain, but it's not taking. That is, I've compiled it
with -L/loader/domain/OPeNDAP, and verified that this is indeed the first
item on the LIBPATH, with:
esmf04m-root> dump -n /usr/local/OPeNDAP-3.5.3/bin/dap_asciival | head -40
/usr/local/OPeNDAP-3.5.3/bin/dap_asciival:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x0000016a 0x0000067b 0x000001ca
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000006 0x000089d8 0x000027a4 0x00008ba2
***Import File Strings***
INDEX PATH BASE MEMBER
0 /loader/domain/OPeNDAP:/usr/local/OPeNDAP-3.5.3/lib:/usr/local/lib:/usr/local/gcc-4.0.1/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.1/ppc64:/usr/local/gcc-4.0.1/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.1:/usr/local/gcc-4.0.1/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.1/.
./../../ppc64:/usr/local/gcc-4.0.1/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.1/../../..:/usr/lib:/lib
1 libc.a shr_64.o
2 libpthread.a shr_xpg5_64.o
3 libstdc++.a libstdc++.so.6
4 libdap.a libdap.so.3
5 libgcc_s.a shr.o
***Loader Symbol Table Information***
[Index] Value Scn IMEX Sclass Type IMPid Name
[0] 0x20008010 0x0002 0x00 0x05 0x1 0x0000 __rtinit
[1] 0x00000000 0x0000 0x08 0x05 0x0 0x0001 errno
[2] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 __mod_init
[3] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 exit
[4] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 atexit
[5] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 strlen
[6] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 memcmp
[7] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 pclose
[8] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 popen
[9] 0x00000000 0x0000 0x08 0x0a 0x0 0x0001 putenv
[10] 0x00000000 0x0000 0x08 0x05 0x0 0x0001 __malloc_user_defined_name
[11] 0x00000000 0x0000 0x08 0x05 0x0 0x0001 __crt0v
[12] 0x00000000 0x0000 0x08 0x05 0x0 0x0002 __n_pthreads
[13] 0x00000000 0x0000 0x08 0x05 0x0 0x0002 __pthread_trace
[14] 0x00000000 0x0000 0x08 0x0a 0x0 0x0002 pthread_init
[15] 0x00000000 0x0000 0x09 0x05 0x0 0x0003 _ZTVN10__cxxabiv120__si_class_type_infoE
Tue Nov 01 16:03:51
....but even though /loader/domain/OPeNDAP is world writable:
esmf04m-root> ls -l /loader/domain/OPeNDAP
-rw-rw-rw- 1 root system 0 Nov 1 15:53 /loader/domain/OPeNDAP
Tue Nov 01 16:09:23
....the program still seems to be getting library conflicts.
My questions are:
1) How do I get this program into its own, distinct loader domain?
2) What's the meaning of the 1st-5th "indexes" in the "import file
strings" section of the dump report above? Are they supposed to be there?
Thanks!
References:
http://www.unet.univie.ac.at/aix/ai...der_domains.htm
http://dcs.nac.uci.edu/~strombrg/AIX-shared-libs.html
| |
| Paul Pluzhnikov 2005-11-02, 2:48 am |
| Dan Stromberg <strombrg@dcs.nac.uci.edu> writes:
> esmf04m-root> /usr/local/OPeNDAP-3.5.3/bin/dap_asciival
> exec(): 0509-036 Cannot load program /usr/local/OPeNDAP-3.5.3/bin/dap_asciival because of the following errors:
> 0509-022 Cannot load module /usr/local/lib/libxml2.a(libxml2.so.2).
> 0509-150 Dependent module /usr/local/lib/libiconv.a(shr4_64.o) could not be loaded.
> 0509-152 Member shr4_64.o is not found in archive
Is there a shr4_64.o in /usr/local/lib/libiconv.a ?
My guess is there isn't. If so, this has nothing to do with loader
domains, or your app. When /usr/local/lib/libxml2.a was built, *it*
was built with /usr/local/lib/libiconv.a(shr4_64.o) dependency,
and you must now satisfy that dependency.
> I'm thinking this is probably because the program is linked against
> /usr/local/lib/libiconv.a, but the global loader domain has
> /usr/lib/libiconv.a already in it, so things go kerflooey.
What makes you think that?
> My questions are:
>
> 1) How do I get this program into its own, distinct loader domain?
I don't believe you *need* such a thing. You just need to provide
correct libiconv.a ... You also provided no evidence (that I can see)
that separate loader domain is not being used.
> 2) What's the meaning of the 1st-5th "indexes" in the "import file
> strings" section of the dump report above?
They list the library/shared module combinations that your executable
depends on (imports from).
> Are they supposed to be there?
Yes.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
|
|
|
|
|