You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Robert F Nugent (JIRA)" <ji...@apache.org> on 2011/04/26 14:31:03 UTC
[jira] [Commented] (AXIS2C-1437) AIX: dynamic libraries are built
but not installed
[ https://issues.apache.org/jira/browse/AXIS2C-1437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025192#comment-13025192 ]
Robert F Nugent commented on AXIS2C-1437:
-----------------------------------------
I think I have some insight into this problem. This issue is *NOT* that the shared libraries are not being installed, but rather that 'old style' AIX
shared libraries are being created.
Here's what I did:
1) Download/untar the Axis2/C 1.6.0 source
2) As per the instructions:
./configure --prefix=${AXIS2C_HOME}
...
make
I'm using the IBM C compiler (rather than gcc), present on my machine in /usr/vacpp/bin
There are three minor problems with #includes that I worked around by commenting the offending lines out in files:
./util/src/platforms/unix/uuid_gen_unix.c: Line 36
./util/include/platforms/unix/axutil_unix.h: Line 119 and 125
Once the build has finished, run:
make install
the 'install' lib directory then contains:
$ ls -l
total 15184
-rwxr-xr-x 1 rn133959 bteng 1269323 Apr 26 04:39 libaxis2_axiom.a
-rwxr-xr-x 1 rn133959 bteng 1024 Apr 26 04:39 libaxis2_axiom.la
-rwxr-xr-x 1 rn133959 bteng 2653050 Apr 26 04:39 libaxis2_engine.a
-rwxr-xr-x 1 rn133959 bteng 1198 Apr 26 04:39 libaxis2_engine.la
-rwxr-xr-x 1 rn133959 bteng 518598 Apr 26 04:39 libaxis2_http_common.a
-rwxr-xr-x 1 rn133959 bteng 1110 Apr 26 04:39 libaxis2_http_common.la
-rwxr-xr-x 1 rn133959 bteng 73637 Apr 26 04:39 libaxis2_http_receiver.a
-rwxr-xr-x 1 rn133959 bteng 1290 Apr 26 04:39 libaxis2_http_receiver.la
-rwxr-xr-x 1 rn133959 bteng 451399 Apr 26 04:39 libaxis2_http_sender.a
-rwxr-xr-x 1 rn133959 bteng 1280 Apr 26 04:39 libaxis2_http_sender.la
-rwxr-xr-x 1 rn133959 bteng 178208 Apr 26 04:38 libaxis2_parser.a
-rwxr-xr-x 1 rn133959 bteng 972 Apr 26 04:38 libaxis2_parser.la
-rwxr-xr-x 1 rn133959 bteng 175788 Apr 26 04:38 libaxis2_xpath.a
-rwxr-xr-x 1 rn133959 bteng 862 Apr 26 04:38 libaxis2_xpath.la
-rwxr-xr-x 1 rn133959 bteng 920718 Apr 26 04:38 libaxutil.a
-rwxr-xr-x 1 rn133959 bteng 837 Apr 26 04:38 libaxutil.la
-rwxr-xr-x 1 rn133959 bteng 186196 Apr 26 04:38 libguththila.a
-rwxr-xr-x 1 rn133959 bteng 903 Apr 26 04:38 libguththila.la
-rwxr-xr-x 1 rn133959 bteng 1222627 Apr 26 04:39 libneethi.a
-rwxr-xr-x 1 rn133959 bteng 1055 Apr 26 04:39 libneethi.la
drwxr-xr-x 2 rn133959 bteng 512 Apr 26 04:40 pkgconfig
Note that the .a files are *NOT* static libraries, but rather 'old style' AIX *shared* libraries, as can been seen, e.g:
$ ar tv libaxutil.a
rwxr-xr-x 134959/500 887528 Apr 26 04:29 2011 libaxutil.so.0
Programs can be built successfully against such libraries. E.G. a simple test of hash tables:
xlc_r -I/ENG/rn133959/axis2c/aix/32/1.6.0/include/axis2-1.6.0 -I. hashtest.c -L/ENG/rn133959/axis2c/aix/32/1.6.0/lib -laxutil -o hashtest
Then ldd shows the *shared* dependency:
$ ldd hashtest
hashtest needs:
/usr/lib/threads/libc.a(shr.o)
/usr/lib/libpthreads.a(shr_xpg5.o)
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxutil.a(libaxutil.so.0)
/unix
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libpthreads.a(shr_comm.o)
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libdl.a(shr.o)
So, the problem is not that the '.so' files are not copied to the lib directory, but rather that 'old style' shared libraries are being
created and that the AXIS2/C dynamic load code (dlopen) code doesn't handle this. While this could be fixed by changing the paths passed to dlopen() and by
use of RTLD_MEMBER, I think the better fix is to move to using 'Run Time Linking' (Which is very similar to the Linux style):
Starting with a clean, tree, do 'export LDFLAGS='brtl' before './configure', then repeat the whole build process.
I'm no expert in automake, but this seems to be sufficient to cause new/Linux style shared objects get built/installed. i.e:
export LDFLAGS=-brtl
./configure --prefix=${AXIS2C_HOME}
...
(Fix duff #includes as before)
make
...
make install
...
This time, the lib directory contains different files:
$ ls -l
total 32904
-rw-r--r-- 1 rn133959 bteng 1421947 Apr 26 05:21 libaxis2_axiom.a
-rwxr-xr-x 1 rn133959 bteng 1072 Apr 26 05:21 libaxis2_axiom.la
lrwxrwxrwx 1 rn133959 bteng 23 Apr 26 05:21 libaxis2_axiom.so -> libaxis2_axiom.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 23 Apr 26 05:21 libaxis2_axiom.so.0 -> libaxis2_axiom.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 1339010 Apr 26 05:21 libaxis2_axiom.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 2986018 Apr 26 05:22 libaxis2_engine.a
-rwxr-xr-x 1 rn133959 bteng 1248 Apr 26 05:22 libaxis2_engine.la
lrwxrwxrwx 1 rn133959 bteng 24 Apr 26 05:22 libaxis2_engine.so -> libaxis2_engine.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 24 Apr 26 05:22 libaxis2_engine.so.0 -> libaxis2_engine.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 2814951 Apr 26 05:22 libaxis2_engine.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 522255 Apr 26 05:22 libaxis2_http_common.a
-rwxr-xr-x 1 rn133959 bteng 1170 Apr 26 05:22 libaxis2_http_common.la
lrwxrwxrwx 1 rn133959 bteng 29 Apr 26 05:22 libaxis2_http_common.so -> libaxis2_http_common.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 29 Apr 26 05:22 libaxis2_http_common.so.0 -> libaxis2_http_common.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 532301 Apr 26 05:22 libaxis2_http_common.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 62544 Apr 26 05:22 libaxis2_http_receiver.a
-rwxr-xr-x 1 rn133959 bteng 1354 Apr 26 05:22 libaxis2_http_receiver.la
lrwxrwxrwx 1 rn133959 bteng 31 Apr 26 05:22 libaxis2_http_receiver.so -> libaxis2_http_receiver.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 31 Apr 26 05:22 libaxis2_http_receiver.so.0 -> libaxis2_http_receiver.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 74393 Apr 26 05:22 libaxis2_http_receiver.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 382083 Apr 26 05:22 libaxis2_http_sender.a
-rwxr-xr-x 1 rn133959 bteng 1340 Apr 26 05:22 libaxis2_http_sender.la
lrwxrwxrwx 1 rn133959 bteng 29 Apr 26 05:22 libaxis2_http_sender.so -> libaxis2_http_sender.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 29 Apr 26 05:22 libaxis2_http_sender.so.0 -> libaxis2_http_sender.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 451984 Apr 26 05:22 libaxis2_http_sender.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 177649 Apr 26 05:21 libaxis2_parser.a
-rwxr-xr-x 1 rn133959 bteng 1022 Apr 26 05:21 libaxis2_parser.la
lrwxrwxrwx 1 rn133959 bteng 24 Apr 26 05:21 libaxis2_parser.so -> libaxis2_parser.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 24 Apr 26 05:21 libaxis2_parser.so.0 -> libaxis2_parser.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 192194 Apr 26 05:21 libaxis2_parser.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 183903 Apr 26 05:21 libaxis2_xpath.a
-rwxr-xr-x 1 rn133959 bteng 910 Apr 26 05:21 libaxis2_xpath.la
lrwxrwxrwx 1 rn133959 bteng 23 Apr 26 05:21 libaxis2_xpath.so -> libaxis2_xpath.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 23 Apr 26 05:21 libaxis2_xpath.so.0 -> libaxis2_xpath.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 184633 Apr 26 05:21 libaxis2_xpath.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 1015659 Apr 26 05:21 libaxutil.a
-rwxr-xr-x 1 rn133959 bteng 875 Apr 26 05:21 libaxutil.la
lrwxrwxrwx 1 rn133959 bteng 18 Apr 26 05:21 libaxutil.so -> libaxutil.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 18 Apr 26 05:21 libaxutil.so.0 -> libaxutil.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 987347 Apr 26 05:21 libaxutil.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 200709 Apr 26 05:21 libguththila.a
-rwxr-xr-x 1 rn133959 bteng 947 Apr 26 05:21 libguththila.la
lrwxrwxrwx 1 rn133959 bteng 21 Apr 26 05:21 libguththila.so -> libguththila.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 21 Apr 26 05:21 libguththila.so.0 -> libguththila.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 200525 Apr 26 05:21 libguththila.so.0.6.0
-rw-r--r-- 1 rn133959 bteng 1572136 Apr 26 05:21 libneethi.a
-rwxr-xr-x 1 rn133959 bteng 1093 Apr 26 05:21 libneethi.la
lrwxrwxrwx 1 rn133959 bteng 18 Apr 26 05:21 libneethi.so -> libneethi.so.0.6.0
lrwxrwxrwx 1 rn133959 bteng 18 Apr 26 05:21 libneethi.so.0 -> libneethi.so.0.6.0
-rwxr-xr-x 1 rn133959 bteng 1296952 Apr 26 05:21 libneethi.so.0.6.0
drwxr-xr-x 2 rn133959 bteng 512 Apr 26 05:23 pkgconfig
Note the presence of the '.so' files and the relevant symlinks.
Note also that the '.a' files now contain *static* objects. e.g:
$ ar tv libaxutil.a
rw-r--r-- 134959/500 35160 Apr 26 05:06 2011 hash.o
rw-r--r-- 134959/500 7975 Apr 26 05:06 2011 allocator.o
rw-r--r-- 134959/500 14433 Apr 26 05:06 2011 env.o
rw-r--r-- 134959/500 31555 Apr 26 05:06 2011 error.o
rw-r--r-- 134959/500 42332 Apr 26 05:06 2011 stream.o
rw-r--r-- 134959/500 25858 Apr 26 05:06 2011 log.o
...
If we now build our 'hastest' program, we need to specify '-brtl' to link against the '.so':
$ xlc_r -brtl -I/ENG/rn133959/axis2c/aix/32/1.6.0/include/axis2-1.6.0 -I. hashtest.c -L/ENG/rn133959/axis2c/aix/32/1.6.0/lib -laxutil -o hashtest
$ ldd hashtest
hashtest needs:
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxutil.so
/usr/lib/libpthreads.a(shr_xpg5.o)
/usr/lib/threads/libc.a(shr.o)
/usr/lib/librtl.a(shr.o)
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libdl.a(shr.o)
/usr/lib/libpthreads.a(shr_comm.o)
/unix
/usr/lib/libcrypt.a(shr.o)
Now however, programs that use the dlopen code now work. E.G. here's a simple program that uses 'axis2_svc_client_send_receive' to
invoke a simple spell-checking service on the public internet:
$ xlc_r -I/ENG/rn133959/axis2c/aix/32/1.6.0/include/axis2-1.6.0 -I. prog1.c -brtl -L/ENG/rn133959/axis2c/aix/32/1.6.0/lib -laxis2_engine -lneethi -laxis2_http_common -laxis2_axiom -laxis2_parser -lguththila -laxutil -o prog1
$ ldd prog1
prog1 needs:
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxis2_engine.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libneethi.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxis2_http_common.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxis2_axiom.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxis2_parser.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libguththila.so
/ENG/rn133959/axis2c/aix/32/1.6.0/lib/libaxutil.so
/usr/lib/libpthreads.a(shr_xpg5.o)
/usr/lib/threads/libc.a(shr.o)
/usr/lib/librtl.a(shr.o)
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libdl.a(shr.o)
/usr/lib/libpthreads.a(shr_comm.o)
/unix
/usr/lib/libcrypt.a(shr.o)
LIBPATH=/ENG/rn133959/axis2c/aix/32/1.6.0/lib ./prog1
prog1.main() >
prog1.main() : AXIS2C_HOME is </ENG/rn133959/axis2c/aix/32/1.6.0>
prog1.main() : Creating environment...
prog1.main() : ..done
prog1.main() : Creating endpoint ref...
prog1.main() : ..done
prog1.main() : Creating options...
prog1.main() : ..done
prog1.main() : Setting endpoint ref...
prog1.main() : ..done
prog1.main() : Creating service client...
prog1.main() : ..done
prog1.main() : Setting options...
prog1.main() : ..done
prog1.buildRequest() >
prog1.buildRequest() : elementA is 20007f48
prog1.buildRequest() : elementB is 200239d8
prog1.buildRequest() : nodeA is 20007f18
prog1.buildRequest() : nodeB is 200239a8
prog1.buildRequest() : payload xml is [<foo:CheckTextBodyV2 xmlns:foo="http://ws.cdyne.com/"><foo:BodyText>Enter the draagon</foo:BodyText></foo:CheckTextBodyV2>]
prog1.buildRequest() < 20023af0
prog1.main() : Invoking service...
prog1.main() : ..done
Element : CheckTextBodyV2Response
Element : DocumentSummary
Element : MisspelledWord
Element : Suggestions
Text : dragon
Element : Suggestions
Text : dragoon
Element : Suggestions
Text : dragons
Element : Suggestions
Text : tarragon
Element : Suggestions
Text : dragoons
Element : Suggestions
Text : dragging
Element : Suggestions
Text : dragon's
Element : Suggestions
Text : Trajan
Element : Suggestions
Text : drugging
Element : Suggestions
Text : dragooned
Element : Suggestions
Text : dragoon's
Element : Suggestions
Text : Trojan
Element : Suggestions
Text : draggingly
Element : Suggestions
Text : tarragons
Element : Suggestions
Text : dragooning
Element : Suggestions
Text : trigging
Element : Suggestions
Text : Trajan's
Element : Suggestions
Text : tarragon's
Element : Suggestions
Text : trekking
Element : Suggestions
Text : trucking
Element : Suggestions
Text : Trojans
Element : Suggestions
Text : Trojan's
Element : Suggestions
Text : trucking's
Element : word
Text : draagon
Element : SuggestionCount
Text : 23
Element : ver
Text : 2.0
Element : body
Text : Enter the draagon
Element : MisspelledWordCount
Text : 1
prog1.main() <
I hope that this is all helpful to someone. If anyone wants to contact me about this, I can be reached as (remove spaces etc)
r o b DOT n u g e n t AT c l e r i t y DOT c o m
> AIX: dynamic libraries are built but not installed
> --------------------------------------------------
>
> Key: AXIS2C-1437
> URL: https://issues.apache.org/jira/browse/AXIS2C-1437
> Project: Axis2-C
> Issue Type: Bug
> Components: build system (Unix/Linux)
> Affects Versions: 1.6.0, 1.7.0, Current (Nightly)
> Environment: AIX 5.3
> Reporter: Olivier Mengué
> Labels: DLL, dlopen, dynamic, library, libtool
> Attachments: inst-libs.sh
>
>
> On AIX, the dynamic are correctly built, but they are not installed by "make install". I only have .a and .la in $deploy_dir/lib. No .so.
> It looks like that the dynamic libraries are build with a ".so.0" extension instead of just ".so"
> # find . -name '*.so'
> # find . -name '*.so*'
> ./guththila/src/.libs/libguththila.so.0
> ./util/src/.libs/libaxutil.so.0
> ./neethi/src/.libs/libneethi.so.0
> ./axiom/src/xpath/.libs/libaxis2_xpath.so.0
> ./axiom/src/om/.libs/libaxis2_axiom.so.0
> ./axiom/src/parser/guththila/.libs/libaxis2_parser.so.0
> ./src/modules/mod_log/.libs/libaxis2_mod_log.so.0
> ./src/modules/mod_addr/.libs/libaxis2_mod_addr.so.0
> ./src/core/transport/http/sender/.libs/libaxis2_http_sender.so.0
> ./src/core/transport/http/receiver/.libs/libaxis2_http_receiver.so.0
> ./src/core/transport/http/common/.libs/libaxis2_http_common.so.0
> ./src/core/engine/.libs/libaxis2_engine.so.0
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org