apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Gomez" <henri.go...@gmail.com>
Subject How to make use APR 1.2.2 statically
Date Wed, 08 Mar 2006 12:04:28 GMT
Hi to all,

I'm using a Suse SLES 9 on a Linux Power PC box (an iSeries LPAR).

SLES 9 came with Apache 2.0.49 and APR 0.9.5 but to be able to use
Tomcat 5.5.x with APR support (tomcat-native), I should use an APR
1.1+.

I build apr 1.2.2 and installed it in /root/local/ and I wonder now
how I could make use of APR 1.2.2 statically ?

For example in tomcat-native 1.1.2, the makefile is :

$(TARGET_LIB): $(OBJECTS)
        $(LINK) -rpath $(libdir) $(OBJECTS)
/root/local/lib/libapr-1.la -lrt -lcrypt  -lpthread -ldl -lssl
-lcrypto


I tried with :

$(TARGET_LIB): $(OBJECTS)
        $(LINK) -rpath $(libdir) $(OBJECTS) -Bstatic
/root/local/lib/libapr-1.a -lrt -lcrypt  -lpthread -ldl -lssl -lcrypto


But it didn't works, got this :

/bin/sh /root/local/build-1/libtool --silent --mode=link  gcc -g -O2
-pthread   -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D                  
    _GNU_SOURCE -D_LARGEFILE64_SOURCE   -g -O2 -DHAVE_OPENSSL
-DAPR_DECLARE_STATIC  -I/root/tomcat-native-1.1.2/jni/native/in       
               clude -I/opt/IBMJava2-cxppc32142ifx-20060209//include
-I/opt/IBMJava2-cxppc32142ifx-20060209//include/  -I/root/local/inc   
                   lude/apr-1   -version-info 2:2:2    -o
libtcnative-1.la -rpath /usr/local/apr/lib src/os.lo src/info.lo
src/poll.lo src/p                       ool.lo src/misc.lo
src/error.lo src/shm.lo src/proc.lo src/mmap.lo src/network.lo
src/sslcontext.lo src/dir.lo src/user.l                       o
src/sslnetwork.lo src/sslutils.lo src/ssl.lo src/file.lo
src/sslinfo.lo src/stdlib.lo src/lock.lo src/jnilib.lo os/unix        
              /uxpipe.lo os/unix/system.lo -Bstatic
/root/local/lib/libapr-1.a -lrt -lcrypt  -lpthread -ldl -lssl -lcrypto

*** Warning: Linking the shared library libtcnative-1.la against the
*** static library /root/local/lib/libapr-1.a is not portable!
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_snprintf' has a R                      
_PPC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_snprintf' has a R                      
_PPC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_snprintf' has a R                      
_PPC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_palloc' has a R_P                      
PC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `__moddi3' has a R_PPC                       _REL24
relocation, that means '/root/local/lib/libapr-1.a(apr_strings.o)' was
compiled without -fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `__divdi3' has a R_PPC                       _REL24
relocation, that means '/root/local/lib/libapr-1.a(apr_strings.o)' was
compiled without -fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_palloc' has a R_P                      
PC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `apr_palloc' has a R_P                      
PC_REL24 relocation, that means
'/root/local/lib/libapr-1.a(apr_strings.o)' was compiled without
-fPIC.

Any help is more than welcome

Mime
View raw message