Does anyone have an updated HP-UX 10.x0 math library with position
independent code (PIC code, or +z/+Z in HP parlance)?
On Tue, 11 May 1999 [EMAIL PROTECTED] wrote:
> - When compiling shared libraries on HP-UX, pa-risc2.o mustn't be used
> since ist uses DP relative code which can't be linked into a shared
> library
Funny thing happened while trying to compile apache.1.3.6+mod_ssl.2.3.3:
I'm using so (dynamic modules) support in Apache, so I compiled openssl with
'-fPIC'. The "target" line in the perl Configure script reads (pardon the
line wrap):
"hpux10-gcc", "gcc:-DB_ENDIAN -DBN_DIV2W -O2 -fPIC:-D_REENTRANT::BN_LLONG
DES_PTR DES_UNROLL DES_RISC1:::",
(if you notice, I changed -O to "2" and added -fPIC to the default
hpux10-gcc config)
The whole thing compiled cleanly and spit out the expected libcrypto.a.
Then, while making apache after applying the mod_ssl configure:
===> src/modules/ssl
rm -f libssl.so
ld -L/opt/openssl/lib -b -o libssl.so mod_ssl.lo
ssl_engine_config.lo ssl_engine_compat.lo ssl_engine_ds.lo ssl_engine_dh.lo
ssl_engine_init.lo ssl_engine_kernel.lo ssl_engine_rand.lo ssl_engine_io.lo
ssl_engine_log.lo ssl_engine_mutex.lo ssl_engine_pphrase.lo
ssl_engine_scache.lo ssl_engine_vars.lo ssl_engine_ext.lo ssl_expr.lo
ssl_expr_scan.lo ssl_expr_parse.lo ssl_expr_eval.lo ssl_util.lo
ssl_util_ssl.lo ssl_util_sdbm.lo ssl_util_table.lo -ldbm -lssl -lcrypto
-L/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1 -lgcc
ld: DP relative code in file
/opt/openssl/lib/libcrypto.a(rand_lib.o) - shared library must be position
independent. Use +z or +Z to recompile.
Doing a quick and dirty analysis of the library and object file:
$ file ./crypto/rand/rand_lib.o /opt/openssl/lib/libcrypto.a
./crypto/rand/rand_lib.o: PA-RISC1.1 relocatable object
/opt/openssl/lib/libcrypto.a: archive file -s800 relocatable library
Huh? Who's lying, file(1) or ld(1)?
AFAICR, the system math library shipped with HPUX 10.20 is not PIC (I once
stumbled upon this when trying to compile perl with so support).
Could this be the problem? By looking at the rand*.* code in crypto/rand, I
see no explicit use of the math library, but it could be linked in
automagically with no explicit references.
I'm no linker/C-internals guru: how can I see if that is the problem? OTOH,
how can I fix it, whatever the problem is?
I once opened a support call with HP for an updated math lib with PIC code,
but the support engineers assigned to C development calls here in Mexico
were unbelievably dense and really hadn't the slightest idea of what I was
talking about.
> - On HP-UX 10.xx (at least 10.20), crypto/des/fcrypt_b.c can't be
> compiled with higher optimization than -O (specifying e.g. +O3
> causes the compiler to hang forever)
Funny, I'm using gcc 2.8.1 and I could get away with -O2. I tried using the
newer aCC HP-UX compiler, but it chokes on all the non-pure-ANSI code. Are
you using c-front?
Cheers, and tx for yr help... Marco Zamora
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]