[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AIX apr-util questions / problems
From: |
Perry Smith |
Subject: |
AIX apr-util questions / problems |
Date: |
Thu, 2 Aug 2012 11:50:17 -0500 |
My target right now is to have Apache httpd with an add on module called
"passenger". Right now, at exit time, it core dumps and part of the problem is
a polluted library space. All these are multi-threaded and so they need to use
the pthread version of library calls.
To set the stage, with AIX and gcc, there are four versions of libgcc_s.a. I
believe this is normal to most platforms. The four versions are:
./lib/libgcc_s.a
./lib/ppc64/libgcc_s.a
./lib/pthread/libgcc_s.a
./lib/pthread/ppc64/libgcc_s.a
Here "." is the top of what most would call /usr/local/lib but I have it down
in /gsa/ausgsa/projects/r/ruby
Right now, libapr-util has an issue. I'm thinking that it is a libtool bug...
but you guys can decide.
The call to libtool is:
/gsa/ausgsa/projects/r/ruby/bin/bash
/gsa/ausgsa/projects/r/ruby/apache2/build/libtool --mode=link gcc -g -O2
-pthread -DHAVE_CONFIG_H -U__STR__ -D_THREAD_SAFE -D_LARGEFILE64_SOURCE
-I/usr/work/build/apr-util-1.4.1/include
-I/usr/work/build/apr-util-1.4.1/include/private
-I/usr/work/src/apr-util-1.4.1/include/private
-I/usr/work/src/apr-util-1.4.1/include
-I/gsa/ausgsa/projects/r/ruby/apache2/include/apr-1 -version-info 4:1:4
-Wl,-brtl -o libaprutil-1.la -rpath /gsa/ausgsa/projects/r/ruby/apache2/lib
buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo
buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo
buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo
buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo
buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo
buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo
crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo
crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo
dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo
dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo
hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo
memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo
misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo
strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo
-lpthread -lexpat -liconv /gsa/ausgsa/projects/r/ruby/apache2/lib/libapr-1.la
-lpthread
Note that there is no -L options and the -pthread option is present. To my
eyes, this looks correct. (Note that the original line also had --silent which
I removed to help me debug this.)
The call to ld is this:
ld -bpT:0x10000000 -bpD:0x20000000 -btextro -bnodelcsect -bM:SRE -bnoentry -o
.libs/libaprutil-1.so.0.4.1 -L/gsa/ausgsa/projects/r/ruby/lib
-L/gsa/ausgsa/projects/r/ruby/apache2/lib
-L/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2/pthread
-L/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2/../../../pthread
-L/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2
-L/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc
-L/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2/../../..
buckets/.libs/apr_brigade.o /tmp//ccK8A3il.o buckets/.libs/apr_buckets.o
buckets/.libs/apr_buckets_alloc.o buckets/.libs/apr_buckets_eos.o
buckets/.libs/apr_buckets_file.o buckets/.libs/apr_buckets_flush.o
buckets/.libs/apr_buckets_heap.o buckets/.libs/apr_buckets_mmap.o
buckets/.libs/apr_buckets_pipe.o buckets/.libs/apr_buckets_pool.o
buckets/.libs/apr_buckets_refcount.o buckets/.libs/apr_buckets_simple.o
buckets/.libs/apr_buckets_socket.o crypto/.libs/apr_crypto.o
crypto/.libs/apr_md4.o crypto/.libs/apr_md5.o crypto/.libs/apr_sha1.o
crypto/.libs/getuuid.o crypto/.libs/uuid.o dbd/.libs/apr_dbd.o
dbm/.libs/apr_dbm.o dbm/.libs/apr_dbm_sdbm.o dbm/sdbm/.libs/sdbm.o
dbm/sdbm/.libs/sdbm_hash.o dbm/sdbm/.libs/sdbm_lock.o
dbm/sdbm/.libs/sdbm_pair.o encoding/.libs/apr_base64.o hooks/.libs/apr_hooks.o
ldap/.libs/apr_ldap_stub.o ldap/.libs/apr_ldap_url.o
memcache/.libs/apr_memcache.o misc/.libs/apr_date.o misc/.libs/apr_queue.o
misc/.libs/apr_reslist.o misc/.libs/apr_rmm.o misc/.libs/apr_thread_pool.o
misc/.libs/apu_dso.o misc/.libs/apu_version.o strmatch/.libs/apr_strmatch.o
uri/.libs/apr_uri.o xlate/.libs/xlate.o xml/.libs/apr_xml.o
-blibpath:/gsa/ausgsa/projects/r/ruby/lib:/gsa/ausgsa/projects/r/ruby/apache2/lib:/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2:/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc:/gsa/ausgsa-p9/06/ruby/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/4.5.2/../../..:/usr/lib:/lib
/gsa/ausgsa/projects/r/ruby/lib/libexpat.a -liconv -lapr-1 -lpthread -lc
-bnoentry -brtl -berok -bexport:.libs/libaprutil-1.exp -G -lgcc_s -lpthreads
-lc -lgcc_s -binitfini:_GLOBAL__FI_libaprutil_1_so:_GLOBAL__FD_libaprutil_1_so
-bE:/tmp//ccIKemPU.x
There are two curiosities here. First, the first -L is for the non-pthread
library: -L/gsa/ausgsa/projects/r/ruby/lib. Then other -L options follow.
Second, the -blibpath does not specify the lib/pthread path(s) at all.
The result is an object file destined to use the ./lib/libgcc_s.a version
rather than the ./lib/pthread/libgcc_s.a version for what I believe are two
reasons. -blibpath forces that but even if that was removed, the ordering of
the -L options would imply it.
I don't know how libtool figures out (or does it guess?) what the compiler
needs but in this case, it appears to be making a couple mistakes.
Thank you for your time,
Perry
- AIX apr-util questions / problems,
Perry Smith <=