Wed Oct 27 12:23:06 2004
Building and Installing AxKit on OS XFor now see http://www.kings-of-chaos.de/~bboksa/axkit_macosx.html IntroductionThis document might contain errors, please feel free to fix them. The following tutorial will show you how to build apache and AxKit on Mac OS X. It was tested with Mac OS X 10.2 (Jaguar) and comes with no warranty. Use it at your own risk. Everything you will see here is not new and no big secret, it is just a compilation of all the stuff, that was quite hard for me to find out. It is not polished, not the best thing to do it and it shows that I am not an expert for all that compilation stuff. But hey, it works (and least it worked for me). You have to have some basic knowledge about installing software and Perl-Modules using the CPAN module. The tutorial is split up into five parts:
Before we startChanging the default compilerThe default compiler coming with Mac OS X 10.2 (gcc 3.1) is kind of buggy with the new system, this is why we change it back to gcc 2.95 with the following command (thanks do Spider from #de.mac, IRCnet). sudo gcc_select 2 Handling downloadsWhen downloading files I assume you put them into tar xvfz *filename* Building apache with mod_perl and mod_sslIn this section we will build apache with mod_perl and mod_ssl statically compiled in. DownloadsBefore we can start you have to download the following software: Installationgdbmcd /usr/local/src/gdbm-*version* sudo cp /usr/share/libtool/config* sudo ./configure sudo make sudo make install sudo ln -s /usr/local/lib/libgdbm.a /usr/local/lib/libdbm.a mod_perlPredependenciessudo mv /usr/bin/head /tmp sudo perl -MCPAN -e 'shell' cpan> install HTML::Parser cpan> install LWP sudo mv /usr/bin/get /usr/local/bin/lwp-get sudo mv /usr/bin/head /usr/local/bin/lwp-head sudo mv /usr/bin/post /usr/local/bin/lwp-post sudo mv /tmp/head /usr/binInstallation cd /usr/local/src/mod_perl-*version* sudo perl Makefile.PL EVERYTHING=1 USE_APACI=1 PREP_HTTPD=1 DO_HTTPD=1 sudo make sudo make install opensslcd openssl-*version* sudo ./config sudo make sudo make test mod_sslcd /usr/local/src/mod_ssl-*version* sudo ./configure \ --with-apache=/usr/local/src/apache_*version* \ --with-ssl=/usr/local/src/openssl-*version* apachecd /usr/local/src/apache_*version* setenv SSL_BASE /usr/local/src/openssl-*version* sudo ./configure \ --enable-module=most \ --enable-shared=max \ --activate-module=src/modules/perl/libperl.a \ --enable-module=perl \ --enable-module=ssl \ --disable-shared=perl \ --disable-shared=ssl \ --disable-rule=EXPAT sudo make sudo make certificate TYPE=test sudo make install Building AxKitThis part shows you how to build AxKit and install the Perl-Predependencies for it. DownloadsBefore we can start you have to download the following software: Installationlibiconvcd /usr/local/src/libiconv-*version* sudo ./configure sudo make sudo make check sudo make install expatcd /usr/local/src/expat-*version* sudo ./configure sudo make sudo make install libghttpcd /usr/local/src/libghttp-*version* sudo ./configure sudo make sudo make install libxml2Simple Patch for libxml2-2.4.24:The idea behind the patch is to add "-flat_namespace". It comes from Nyk Cowham. *** configure.orig Sun Sep 15 00:53:23 2002
--- configure Sun Sep 15 00:56:51 2002
***************
*** 3784,3790 ****
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
-install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && \
echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
--- 3784,3790 ----
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
$deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
x$verstring != x0.0 && echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
Installation
cd /usr/local/src/libxml2-*version* setenv LDFLAGS "-flat_namespace -undefined suppress" sudo ./configure --with-zlib=/usr --prefix=/usr/local sudo make sudo make check sudo make install libxsltSimple Patch for libxslt-1.0.20:The idea behind the patch is to add "-flat_namespace". It comes from Nyk Cowham. *** configure.orig Sun Sep 15 01:25:47 2002
--- configure Sun Sep 15 01:26:28 2002
***************
*** 3584,3590 ****
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
-install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && \
echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
--- 3584,3590 ----
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
$deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
x$verstring != x0.0 && echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
Installation
cd /usr/local/src/libxml2-*version* setenv LDFLAGS "-flat_namespace -undefined suppress" sudo ./configure --with-zlib=/usr --prefix=/usr/local sudo make sudo make check sudo make install sablotronSimple Patch for Sablot-0.96:The idea behind the patch is to add "-flat_namespace". It comes from Nyk Cowham. *** configure.orig Sun Sep 15 11:32:21 2002
--- configure Sun Sep 15 11:32:58 2002
***************
*** 3326,3332 ****
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts \
-install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && \
echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
--- 3326,3332 ----
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
! archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo \
-dynamiclib) $allow_undefined_flag -flat_namespace -o $lib $libobjs \
$deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a \
x$verstring != x0.0 && echo $verstring)'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
Patch for 0.96
Execute the follwing commands if you use Sablot 0.96: cd /usr/local/src/Sablot-*version* sudo curl -O http://download-2.gingerall.cz/download/sablot/Sablot-0.96.1.patch sudo patch -p2 < Sablot-0.96.1.patchInstallation cd /usr/local/src/Sablot-*version* setenv LDFLAGS "-flat_namespace -undefined suppress" sudo ./configure --with-zlib=/usr --prefix=/usr/local sudo make sudo make check sudo make install Perl-ModulesThe following commands need to be executed to install the predependecies for AxKit. Any errors occuring (for libs not found) can be ignored, they will be corrected later sudo perl -MCPAN -e shell cpan> install Error cpan> install Apache::Request cpan> install XML::Parser cpan> install XML::XPath cpan> install HTTP::GHTTP cpan> install XML::Sablotron cpan> install XML::LibXML cpan> install XML::LibXSLT cpan> install Apache::Filter Install the Perl-Module with an explicit link to the libraries/includes. cd ~/.cpan/build/XML-Parser-*version* sudo perl Makefile.PL \ EXPATLIBPATH=/usr/local/lib \ EXPATINCPATH=/usr/local/inc sudo make sudo make test sudo make install Install the Perl-Module with an explicit link to the libraries/includes. cd ~/.cpan/build/XML-Sablotron-0.90/ sudo perl Makefile.PL \ EXPATLIBPATH=/usr/local/lib \ EXPATINCPATH=/usr/local/inc \ SABLOTLIBPATH=/usr/local/lib \ SABLOTINCPATH=/usr/local/inc sudo make sudo make test sudo make install The final step. Install AxKit. sudo perl -MCPAN -e shell cpan> install AxKit Configuring apache for AxKitConfiguring apache for AxKit is very easy, it is just a matter of adding some lines to your httpd.conf ( If you just want to modify your user configuration you have to modify Configuration directives four your httpd.confPerlModule AxKit AddHandler axkit .xml AddHandler axkit .xsp AddHandler axkit .dkb AxAddStyleMap application/x-xpathscript Apache::AxKit::Language::XPathScript AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot AxDebugLevel 10 PerlSetVar AxXPSInterpolate 1 Edit This Page / Show Page History / |

Home