Stefan Teleman wrote:
> Including Apache 2.2.6 with Solaris
> 
> Stefan Teleman <Stefan.Teleman at Sun.COM>
> 19 September 2007
> 
> Addressing the 32- vs. 64- bitness issue.
> 
> 1.    Summary, Motivation and Problem Domain
> 
> 
> 2.    Proposed Approach
> 
>       We are proposing the following approach to solving this problem:
> 
>       2.1.    Executables and shared libraries:
>  
>               ${APACHE_ROOT}/bin/
>               ${APACHE_ROOT}/bin/${MACH64}/
>               ${APACHE_ROOT}/lib/
>               ${APACHE_ROOT}/lib/${MACH64}/
>               ${APACHE_ROOT}/sbin/
>               ${APACHE_ROOT}/sbin/${MACH64}/
>               ${APACHE_ROOT}/libexec/
>               ${APACHE_ROOT}/libexec/${MACH64}/
> 
>       2.2.    Include [ header ] files.
> 
>       The Solaris distribution of Apache will not deliver bitness
>       separate directories for header files.
> 
>       2.3.    Supporting build directories and scripts [ apxs ].
> 
>               /var/${APACHE_DIR}/build/
>               /var/${APACHE_DIR}/build/${MACH64}/
> 
>       Separate versions of the 'config.layout' files
>       will have to be maintained.
> 
>       2.3.    SMF Manifests.
>  
>       2.4.    Documentation.
>       

I tried to verify the proposed 64 bit layout and things worked fine.

I built 64-bit apache (on x86) using the following layout:

-------------------------------------------------------------------
<Layout Solaris-Apache2>
     prefix:        /usr/apache2/222
     exec_prefix:   ${prefix}
     bindir:        ${prefix}/bin/amd64
     sbindir:       ${prefix}/bin/amd64
     libdir:        ${prefix}/lib/amd64
     mandir:        ${prefix}/man
     sysconfdir:    /etc/apache2/2.2
     datadir:       /var/apache2/2.2
     libexecdir:    ${prefix}/libexec/amd64
     installbuilddir: ${prefix}/build/amd64
     errordir:      ${datadir}/error
     iconsdir:      ${datadir}/icons
     htdocsdir:     ${datadir}/htdocs
     manualdir:     ${prefix}/manual
     cgidir:        ${datadir}/cgi-bin
     includedir:    ${prefix}/include/amd64
     localstatedir: ${prefix}
     runtimedir:    /var/run/apache2/2.2
     logfiledir:    ${datadir}/logs
     proxycachedir: ${datadir}/proxy
</Layout>
-------------------------------------------------------------------

and 32-bit using
-------------------------------------------------------------------
<Layout Solaris-Apache2>
     prefix:        /usr/apache2/2.2
     exec_prefix:   ${prefix}
     bindir:        ${prefix}/bin
     sbindir:       ${prefix}/bin
     libdir:        ${prefix}/lib
     mandir:        ${prefix}/man
     sysconfdir:    /etc/apache2/2.2
     datadir:       /var/apache2/2.2
     libexecdir:    ${prefix}/libexec
     installbuilddir: ${prefix}/build
     errordir:      ${datadir}/error
     iconsdir:      ${datadir}/icons
     htdocsdir:     ${datadir}/htdocs
     manualdir:     ${prefix}/manual
     cgidir:        ${datadir}/cgi-bin
     includedir:    ${prefix}/include
     localstatedir: ${prefix}
     runtimedir:    /var/run/apache2/2.2
     logfiledir:    ${datadir}/logs
     proxycachedir: ${datadir}/proxy
</Layout>
-------------------------------------------------------------------


Then I used another Makefile to merge the header files.
-------------------------------------------------------------------
HDRS= \
ap_config_layout.h \
apr.h

$(SPARC_BLD)AP4BITCPPSYMBOL = __sparcv9
$(INTEL_BLD)AP64BITCPPSYMBOL = __amd64

ROOTHDRDIR = $(ROOT)/usr/apache2/2.2/include
HDRDIR32= $(ROOTHDRDIR)
HDRDIR64= $(ROOT)/usr/apache2/2.2/include/amd64
TMP=/tmp
ROOTHDRS = $(HDRS:%=$(TMP)/%)

install_headers: $(ROOTHDRS)

$(TMP)/%: $(HDRDIR32)/% $(HDRDIR64)/%
         ( \
         set +e; /usr/bin/diff -D $(AP64BITCPPSYMBOL) $(HDRDIR32)/$(@F) 
$(HDRDIR64)/$(@F); true; \
         ) > $(TMP)/$*
         cp $(TMP)/$* $(ROOTHDRDIR)

-------------------------------------------------------------------

For the default 64-bit .conf file, I modified SERVER_CONFIG_FILE entry within 
configure script.

After installation, I fixed the 64 bit specific path issues within

* build/rules.mk :
            include  $(top_builddir)/build/config_vars.mk
     to
            include  $(top_builddir)/build/amd64/config_vars.mk

* build/special.mk :
            include $(top_builddir)/build/rules.mk
            .......
           $(top_srcdir)/build/instdso.sh
     to
            include $(top_builddir)/build/amd64/rules.mk
            .......
           $(top_srcdir)/build/amd64/instdso.sh


Then tested 32 and 64 bit installations using Apache Test framework.
I used "apxs -n foo -g" to test apxs.


Best Regards,
Seema.




Reply via email to