Bug 91681 - www/apache20 apache-2.0.54_4 building modules fails using integrated module build system.
Summary: www/apache20 apache-2.0.54_4 building modules fails using integrated module b...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-11 19:30 UTC by Byron Young
Modified: 2009-03-26 15:48 UTC (History)
0 users

See Also:


Attachments
file.diff (2.83 KB, patch)
2006-01-11 19:30 UTC, Byron Young
no flags Details | Diff
apache-2.0.54_4-fixup.tar.gz (6.62 KB, application/x-gzip)
2006-01-11 20:03 UTC, spamiccling
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Byron Young 2006-01-11 19:30:10 UTC
Installed integrated build system fails to build modules correcty:

1) Generate a module
apxs -n simple -g

2) Attempt to build it
cd simple
make

(fails)

Fix: Patches for simple module building to post install files supplied.
Is fixing a package build time possible?

NOTE: setup.sh installs patches into system.
BEGIN setup.sh
#!/bin/sh

echo "Setting up"
WD=$(pwd)

cd /usr/local/sbin || exit
patch -p0 < ${WD}/apxs.patch || exit

cd /usr/local/share/apache2/build || exit
patch -p0 < $WD/config_vars.mk.patch || exit

cd $WD

cp -vfp mkdir.sh /usr/local/share/apache2/build || exit

echo "Checking..."
/bin/sh mod_simple.sh || exit
echo "Success"
exit
END setup.sh

BEGIN mod_simple.sh
#!/bin/sh

if test -d simple; then
    echo removing previous mod_simple
    rm -rf simple
fi

apxs -n simple -g || exit
cd simple
make || exit
make DESTDIR=`pwd`/dest install || exit

END mod_simple.sh

BEGIN apxs.patch
BEGIN config_vars.mk.patch


NOTE: mkdir.sh is from the distribution tarball, but included for completeness.
BEGIN mkdir.sh
#!/bin/sh
#
# Copyright 1999-2005 The Apache Software Foundation or its licensors, as
# applicable.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# 
# mkdir.sh -- make directory hierarchy
#
# Based on `mkinstalldirs' from Noah Friedman <friedman@prep.ai.mit.edu>
# as of 1994-03-25, which was placed in the Public Domain.
# Cleaned up for Apache's Autoconf-style Interface (APACI)
# by Ralf S. Engelschall <rse apache.org>

umask 022
errstatus=0
for file in ${1+"$@"} ; do 
    set fnord `echo ":$file" |\
               sed -e 's/^:\//%/' -e 's/^://' -e 's/\// /g' -e 's/^%/\//'`
    shift
    pathcomp=
    for d in ${1+"$@"}; do
        pathcomp="$pathcomp$d"
        case "$pathcomp" in
            -* ) pathcomp=./$pathcomp ;;
            ?: ) pathcomp="$pathcomp/" 
                 continue ;;
        esac
        if test ! -d "$pathcomp"; then
            echo "mkdir $pathcomp" 1>&2
            mkdir "$pathcomp" || errstatus=$?
        fi
        pathcomp="$pathcomp/"
    done
done
exit $errstatus
END mkdir.sh--Zfc4jlQfoREdkv86PTNoMMADeuTBrzlW2GFbR23cVQ94Brec
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** apxs.orig	Wed Oct 12 04:53:27 2005
--- apxs	Wed Jan 11 10:03:31 2006
***************
*** 653,660 ****
  ##
  
  builddir=.
! top_srcdir=%PREFIX%
! top_builddir=%PREFIX%
  include %INSTALLBUILDDIR%/special.mk
  
  #   the used tools
--- 653,660 ----
  ##
  
  builddir=.
! top_srcdir=%PREFIX%/share/apache2
! top_builddir=%PREFIX%/share/apache2
  include %INSTALLBUILDDIR%/special.mk
  
  #   the used tools
END apxs.patch
Comment 1 spamiccling 2006-01-11 20:03:09 UTC
A files tarball is attached.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Comment 2 Tim Bishop freebsd_committer freebsd_triage 2006-01-11 20:04:06 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer.
Comment 3 spamiccling 2006-01-13 17:16:25 UTC
Technically, unless --no-undefined is added to LDFLAGS
(most likely by the module builder), the
EXTRA_LDFLAGS=-L/usr/local/lib/apache2, which I added
in the config_vars.mk.patch, is not required. A
-R/usr/local/lib/apache2 would not be required either,
because the httpd (prefork version anyway) RPATH
includes it, and, the unix dso loader uses RTLD_NOW |
RTLD_GLOBAL.

I'm pretty sure that 000.apache2libs.sh adding
/usr/local/lib/apache2 to the dynamic linker hints is
not required. The httpd is linked to all libraries in
/usr/local/lib/apache2 (NEEDED), and undefined apr-0
and apr-util-0 symbols will be resolved at dynamic
load time. But, because of the frequency of process
creation, especially if MaxRequestsPerChild is set to
a low value, this improves performance for whatever
MPM is running.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
Comment 4 Philip M. Gollucci freebsd_committer freebsd_triage 2008-12-27 20:28:41 UTC
Responsible Changed
From-To: clement->apache

apache team
Comment 5 Philip M. Gollucci freebsd_committer freebsd_triage 2009-01-12 22:19:24 UTC
I so completely under what you are trying to fix here.

Are you saying if you use ports to install www/apache20 (which is now 2.0.63)
that you can't create a module in say ~/module with apxs and compile it ?

If thats the case, that I can look into.

This LDFLAGS stuff is unrelated right.  If thats still an issue, can you make 
a seperate pr.
Comment 6 Philip M. Gollucci freebsd_committer freebsd_triage 2009-01-12 22:21:00 UTC
State Changed
From-To: open->feedback

As submitter for feedback
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2009-03-26 15:46:57 UTC
State Changed
From-To: feedback->closed

Feedback timeout