You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Harris <dh...@drh.net> on 1999/08/28 03:11:44 UTC

[patch] ./configure --activate-module bugfix

I just ran into an interesting bug in the configure script.
The --activate-module option does not work correctly with the --enable-shared
option.

In my configuration I had:

./configure \
--activate-module=src/modules/extra/mod_frontpage.c \
--enable-shared=frontpage

and mod_frontpage was built as a static module.

The code that implements --activate-module was appending "AddModule
modules/extra/mod_frontpage.c" to the $addconf file, which should really be the
same filename with an ".o" extension as evidenced by behavior --add-module
option. The problem was that the sed commands that implement
the --enable-shared option by converting the AddModule commands to SharedModule
commands don't match AddModule lines with .c extensions.

Appended is a patch to fix this by making the --activate-module option add
AddModule lines ending in .o.

 - David Harris
   Principal Engineer, DRH Internet Services


--- apache_1.3.6/configure.orig Fri Aug 27 20:50:22 1999
+++ apache_1.3.6/configure      Fri Aug 27 20:53:46 1999
@@ -634,6 +634,7 @@
                     ;;
             esac
             modfile=`echo $file | sed -e 's;^src/;;'`
+            modfileo=`echo $modfile | sed -e 's;\.c$;.o;'`
             if [ "x$addconf_created" = "x0" ]; then
                 addconf_created=1
                 rm -f $addconf 2>/dev/null
@@ -642,7 +643,7 @@
             echo "" >>$addconf
             echo "## On-the-fly activated module" >>$addconf
             echo "## (configure --activate-module=$file)" >>$addconf
-            echo "AddModule $modfile" >>$addconf
+            echo "AddModule $modfileo" >>$addconf
             module=`echo "$modfile" |\
                     sed -e 's%^.*/\(.*\)$%\1%' \
                         -e 's/\.[^.]*$//' \


Re: [patch] ./configure --activate-module bugfix

Posted by sa...@ix.netcom.com.
David, I can not build the shared module using the "configure"
under apache 1.3.9 on Solaris . Has anyone tried the DSO option
under Solaris?

I have enabled the mod_so and also I
have enabled my own module as a "SharedModule" in the file
Configuration.tmpl . 

Then I run the configuration procedure from top level
./configure --activate-module=src/....../mod_hello.c \
            --enable-shared=hello

I get two errors on the screen from eval. The Makefile for the
module gets generated all right but the module never gets included
on linked into the httpd server. 

    Regards,
    Saeed

> 
> I just ran into an interesting bug in the configure script.
> The --activate-module option does not work correctly with the --enable-shared
> option.
> 
> In my configuration I had:
> 
> ./configure \
> --activate-module=src/modules/extra/mod_frontpage.c \
> --enable-shared=frontpage
> 
> and mod_frontpage was built as a static module.
> 
> The code that implements --activate-module was appending "AddModule
> modules/extra/mod_frontpage.c" to the $addconf file, which should really be the
> same filename with an ".o" extension as evidenced by behavior --add-module
> option. The problem was that the sed commands that implement
> the --enable-shared option by converting the AddModule commands to SharedModule
> commands don't match AddModule lines with .c extensions.
> 
> Appended is a patch to fix this by making the --activate-module option add
> AddModule lines ending in .o.
> 
>  - David Harris
>    Principal Engineer, DRH Internet Services
> 
> --- apache_1.3.6/configure.orig Fri Aug 27 20:50:22 1999
> +++ apache_1.3.6/configure      Fri Aug 27 20:53:46 1999
> @@ -634,6 +634,7 @@
>                      ;;
>              esac
>              modfile=`echo $file | sed -e 's;^src/;;'`
> +            modfileo=`echo $modfile | sed -e 's;\.c$;.o;'`
>              if [ "x$addconf_created" = "x0" ]; then
>                  addconf_created=1
>                  rm -f $addconf 2>/dev/null
> @@ -642,7 +643,7 @@
>              echo "" >>$addconf
>              echo "## On-the-fly activated module" >>$addconf
>              echo "## (configure --activate-module=$file)" >>$addconf
> -            echo "AddModule $modfile" >>$addconf
> +            echo "AddModule $modfileo" >>$addconf
>              module=`echo "$modfile" |\
>                      sed -e 's%^.*/\(.*\)$%\1%' \
>                          -e 's/\.[^.]*$//' \

Re: Silicon Valley, Bay area Apache group?

Posted by Greg Stein <gs...@lyra.org>.
saeedt@ix.netcom.com wrote:
> 
> I apologize for sending this email to the "new-httpd" mailing
> list. I have searched but I have not found any information on
> this subject.
> 
> Is there a Silicon Valley/Bay area Apache user's or developer's
> group that I can contact?

I haven't heard of any, but I bet the Silicon Valley Linux Users Group
(www.svlug.org) would have plenty of Apache users/developers.

Cheers,
-g

--
Greg Stein, http://www.lyra.org/

Silicon Valley, Bay area Apache group?

Posted by sa...@ix.netcom.com.
I apologize for sending this email to the "new-httpd" mailing
list. I have searched but I have not found any information on
this subject.

Is there a Silicon Valley/Bay area Apache user's or developer's
group that I can contact?

    Regards,
    Saeed