#248 Building aolserver on hpux

aolserver_v40
open
nobody
5
2005-02-28
2005-02-28
Yuri Kozlov
No

Hello.
It turned out, that building aolserver on hpux is noе
trivial work :)
1. static path to /opt2/aol-hp/nsd/libnsd.sl
Nsd is linking statical path to libnsd.sl:

gcc -pipe -L../nsthread -L../nsd -o nsd main.o
libnsd.sl -lnsd -lnsthread -L/opt2/tcl/lib -ltcl8.5
-ldld -lpthread -lxnet -lm -lgcc_s -Wl,-E
-Wl,+s,+b,:./opt2/aolserver1/lib -Wl,+s,+b,:./opt2/tcl/lib

bash-2.04$ ./nsd
/usr/lib/dld.sl: Can't find path for shared library:
libnsd.sl
chatr nsd
...
shared library list:
static /opt2/aol-hp/nsd/libnsd.sl
dynamic ../nsthread/libnsthread.sl
...
/opt2/aol-hp/nsd/l is building dir, not install dir

2. Dynamic initialization shared libs is missing

bash-2.04$ bin/nsd -f -t sample-config.tcl
Ns_TlsGet: invalid key: 0: should be between 1 and 100
ABORT instruction (core dumped)
bash-2.04$

Please, try patches below.
I have hp-ux 11.11, gcc 3.3.4, ld from HP

--- aolserver-HEAD-20050208/include/Makefile.global.in
2004-11-20 04:46:00.000000000 +0300
+++ Makefile.global.in 2005-02-28 23:41:48.000000000 +0300
@@ -109,14 +109,17 @@
LIBS+=-lrt
endif
endif
-
# Add dynamic library entry point flags.
ifdef LIBINIT
- ifneq (,$(findstring Darwin,$(uname)))
- LDLIB += -init _$(LIBINIT)
+ ifneq (,$(findstring Darwin,$(uname)))
+ LDLIB += -init _$(LIBINIT)
+ else
+ ifneq (,$(findstring HP-UX,$(uname)))
+ LDLIB += -Wl,+init,$(LIBINIT)
else
- CFLAGS += -D$(LIBINIT)=_init
+ CFLAG += -D$(LIBINIT)=_init
endif
+ endif
endif

--- aolserver-HEAD-20050208/include/Makefile.module.in
2004-11-15 16:38:38.000000000 +0300
+++ Makefile.module.in 2005-02-28 23:40:33.000000000 +0300
@@ -97,6 +97,7 @@

ifdef PGM
BUILD += $(PGM)
+ PGMLIBS = -l$(LIB)
INSTALL += install-pgm
CLEAN += clean-pgm
endif

Discussion