|
From: EXT-Smith, E. M <eri...@bo...> - 2003-10-10 15:39:09
|
Leif, et al.
I have run some simple tests using the input from Andreas Wendt (Thank =
you Andreas).
Here is what I have come up with so far: The problem is in the way that =
wrapper is built.
I came to this conclusion after the following:
1) Modified the Makefile.hpux file as follows:
a) Set up the following as the definitions:
DEFS =3D -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux
DEFVALS =3D -DHPUX -D_HPUX -D_POSIX_C_SOURCE=3D199506L =
-D_XOPEN_SOURCE_EXTENDED
OPTS =3D -ansi -fPIC
COMPILE =3D gcc -c $(DEFVALS) $(OPTS) $(DEFS)
COMPILE_LINK =3D gcc $(DEFVALS) $(OPTS) $(DEFS)
LINK =3D ld -b
realpath_SOURCE =3D realpath.c
wrapper_SOURCE =3D wrapper.c wrapper_unix.c property.c logger.c
wrapper_OBJECTS =3D wrapper.o wrapper_unix.o property.o logger.o
libwrapper_sl_SOURCE =3D wrapperjni_unix.c wrapperjni.c
libwrapper_sl_OBJECTS =3D wrapperjni_unix.o wrapperjni.o
BIN =3D ../../bin
LIB =3D ./../lib
b) changed the rule for wrapper to
wrapper: $(wrapper_SOURCE)
$(COMPILE_LINK) $(wrapper_OBJECTS) -lm -o $(BIN)/wrapper
c) changed the rule for libwrapper to=20
libwrapper.sl: $(libwrapper_so_OBJECTS)
${COMPILE} $(libwrapper_sl_SOURCE)
${LINK} -b -o $(LIB)/libwrapper.sl $(libwrapper_sl_OBJECTS)
d) changed the compile rule to
%.o: %.c
${COMPILE} ${OPTS} ${DEFS} $<
2) Ran the entire build as follows:
./build.sh clean
./build.sh compile
./build.sh main
I know the main build rule takes care of everything, but I did this =
just to be sure.
3) Edited the conf/wrapper.conf file to point to the proper JAVA_HOME =
and libwrapper.sl file . <<NOTE, the .sl and not .so extension>>
4) Changed the SHLIB_PATH environment variable to reference the =
wrapper/lib directory.
5) Tried running bin/testwrapper console
Failed
6) Tried running bin/wrapper with the proper parameters
Failed
7) Tried running the org.tanukisoftware.wrapper.test.Main class straight =
from Java
Success
Then to be sure the shared library was loading...
8) Added lines to the WrapperManager.java bracketing the =
System.loadLibrary
9) Tried running the org.tanukisoftware.wrapper.test.Main class straight =
from Java to see the bracketing labels
Success
Therefore, I am now looking at how wrapper is built for a solution.
I have already tried splitting the compilation and linking for wrapper =
(using gcc and ld), but the resulting file is not executable.
Our biggest problem is the lack of the native HP-UX ansi C compiler on =
our test machine. We are stuck with ISO C89 unless we use gcc. We are =
searching for an ansi compiler in-house, but haven't found one yet.
Any suggestions (other than locating the ansi c compiler)?
Eric M. Smith
InfoStructure Systems
Boeing Chairman's Innovation Initiative
|