The following script requires that you have build the APR and
APR-utils prior to building JSVC in 64-bit mode. You will need the
paths where the APR and APR-utils get installed.
I use this script to build jsvc in Linux and Solaris, so you also need
to define some variables to define the path to your "autoconf" and
"make" commands (that in my case, they live in different directories
and the version I want to use is not always in the PATH)
JSVC_PATH_SRC must point to the sources for Unix (something like
${tomcat.root}/bin/commons-daemon-${jsvc.version}-native-src/unix )
=== buildjsvc.sh ===
#!/bin/sh
if [ "${JAVA_HOME}" = "" ] ; then
echo "JAVA_HOME is not defined"
exit 1
fi
if [ "${CATALINA_HOME}" = "" ] ; then
echo "CATALINA_HOME is not defined"
exit 1
fi
if [ "${APR_DIR}" = "" ] ; then
echo "APR_DIR not defined."
exit 1
fi
if [ "${APU_DIR}" = "" ] ; then
echo "APU_DIR not defined."
exit 1
fi
if [ "${AUTOCONF_CMD}" = "" ] ; then
echo "AUTOCONF_CMD not defined"
exit 1
fi
if [ "${JSVC_PATH_SRC}" = "" ] ; then
echo " JSVC_PATH_SRC not defined"
exit 1
fi
if [ "${MAKE_CMD}" = "" ] ; then
echo " MAKE_CMD not defined "
exit 1
fi
# Kill me on all errors
set -e
CPPFLAGS="-m64 -O3"
CXXFLAGS="-m64 -O3"
CFLAGS="-m64 -O3"
LDFLAGS="-m64 -O3 -L${APR_DIR}/lib -L${APU_DIR}/lib
-L${JAVA_HOME}/jre/lib/amd64 -L${JAVA_HOME}/jre/lib/sparcv9"
export CPPFLAGS CXXFLAGS CFLAGS LDFLAGS
chmod u+x ${JSVC_PATH_SRC}/configure
cd "${JSVC_PATH_SRC}"
${AUTOCONF_CMD}
${JSVC_PATH_SRC}/configure --with-java="${JAVA_HOME}"
# This is a hack: The configure step does not configure the appropiate
CPU on 64-bit systems
cp "${JSVC_PATH_SRC}/Makedefs" "${JSVC_PATH_SRC}/Makedefs-Original"
sed '
s:-DCPU=\\"i386\\":-DCPU=\\"amd64\\":g
s:-DCPU=\\"sparc\\":-DCPU=\\"sparcv9\\":g' <
"${JSVC_PATH_SRC}/Makedefs-Original" > "${JSVC_PATH_SRC}/Makedefs"
${MAKE_CMD} clean
${MAKE_CMD}
cp ${JSVC_PATH_SRC}/jsvc ${CATALINA_HOME}/bin
EXIT_CODE=$?
exit $EXIT_CODE
On Wed, Aug 11, 2010 at 3:22 PM, David Parks <[email protected]> wrote:
> Are there any good step-by-steps on getting JSVC working with Tomcat 6 on
> Linux
> (Fedora)?
>
> The tomcat installation docs are outdated (JSVC isn’t even in /bin), and every
> guide I find seems to be 2 years old and wrong in some way.
>
> I trying downloading JSVC separately, but get make errors, and those docs
> aren’t
> terribly explicit about certain details either.
>
> Thanks,
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]