You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andrew WC Brown <om...@gmail.com> on 2007/09/19 03:27:41 UTC

[users@httpd] [module] how do I compile a module?

Hi, I'm new to this mailing list (waves).

I'm running OS X.4.10 with Apache 2.2.6

When I installed apache I was sure to --enable-module=shared so I could load
DSOs.

I let apache2 install to /usr/local/apache2. When I run apache it works.

I didn't specify any additional modules on compilation so my modules
directory is emptied.

I'm going to be using virtual hosting so I want to compile mod_vhost_alias.c

I've navigated to the directory in my source folder: httpd-2.2.6
/modules/mappers/

I've tired to compile using: sudo apxs -c mod_vhost_alias.c

I get the following error:

gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe
-DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/httpd  -c
mod_vhost_alias.c
mod_vhost_alias.c:36:17: error: apr.h: No such file or directory
mod_vhost_alias.c:37:25: error: apr_strings.h: No such file or directory
mod_vhost_alias.c:38:23: error: apr_hooks.h: No such file or directory
mod_vhost_alias.c:39:21: error: apr_lib.h: No such file or directory
mod_vhost_alias.c:42:22: error: apr_want.h: No such file or directory
In file included from /usr/include/httpd/ap_config.h:1129,
                 from /usr/include/httpd/httpd.h:29,
                 from mod_vhost_alias.c:44:
/usr/include/httpd/hsregex.h:22:1: warning: "ap_private_extern" redefined
In file included from /usr/include/httpd/httpd.h:29,
                 from mod_vhost_alias.c:44:
/usr/include/httpd/ap_config.h:1025:1: warning: this is the location of the
previous definition
mod_vhost_alias.c:50: error: parse error before 'vhost_alias_module'
mod_vhost_alias.c:50: warning: data definition has no type or storage class
mod_vhost_alias.c:72: error: parse error before '*' token
mod_vhost_alias.c: In function 'mva_create_server_config':
mod_vhost_alias.c:76: error: 'p' undeclared (first use in this function)
mod_vhost_alias.c:76: error: (Each undeclared identifier is reported only
once
mod_vhost_alias.c:76: error: for each function it appears in.)
mod_vhost_alias.c: At top level:
mod_vhost_alias.c:84: error: parse error before '*' token
mod_vhost_alias.c: In function 'mva_merge_server_config':
mod_vhost_alias.c:86: error: 'parentv' undeclared (first use in this
function)
mod_vhost_alias.c:87: error: 'childv' undeclared (first use in this
function)
mod_vhost_alias.c:90: error: 'p' undeclared (first use in this function)
mod_vhost_alias.c: In function 'vhost_alias_set':
mod_vhost_alias.c:127: error: request for member 'module_index' in something
not a structure or union
mod_vhost_alias.c:154: warning: passing argument 1 of
'ap_os_is_path_absolute' from incompatible pointer type
mod_vhost_alias.c:154: error: too many arguments to function
'ap_os_is_path_absolute'
mod_vhost_alias.c: At top level:
mod_vhost_alias.c:219: error: initializer element is not constant
mod_vhost_alias.c:219: error: (near initialization for
'mva_commands[0].name')
mod_vhost_alias.c:222: error: initializer element is not constant
mod_vhost_alias.c:222: error: (near initialization for
'mva_commands[0].func')
mod_vhost_alias.c:225: error: initializer element is not constant
mod_vhost_alias.c:225: error: (near initialization for
'mva_commands[0].cmd_data')
mod_vhost_alias.c:228: error: initializer element is not constant
mod_vhost_alias.c:228: error: (near initialization for
'mva_commands[0].req_override')
mod_vhost_alias.c:229: warning: braces around scalar initializer
mod_vhost_alias.c:229: warning: (near initialization for
'mva_commands[0].args_how')
mod_vhost_alias.c:229: error: incompatible types in initialization
mod_vhost_alias.c:237: error: syntax error before 'void'
mod_vhost_alias.c: In function 'vhost_alias_checkspace':
mod_vhost_alias.c:244: warning: assignment makes pointer from integer
without a cast
mod_vhost_alias.c:247: warning: assignment makes pointer from integer
without a cast
mod_vhost_alias.c: In function 'vhost_alias_interpolate':
mod_vhost_alias.c:376: warning: assignment makes pointer from integer
without a cast
mod_vhost_alias.c:379: warning: assignment makes pointer from integer
without a cast
mod_vhost_alias.c: In function 'mva_translate':
mod_vhost_alias.c:390: error: request for member 'module_index' in something
not a structure or union
mod_vhost_alias.c:390: error: array subscript is not an integer
mod_vhost_alias.c:428: error: 'struct request_rec' has no member named
'canonical_filename'
mod_vhost_alias.c: At top level:
mod_vhost_alias.c:440: error: parse error before '*' token
mod_vhost_alias.c: In function 'register_hooks':
mod_vhost_alias.c:444: error: 'APR_HOOK_MIDDLE' undeclared (first use in
this function)
mod_vhost_alias.c: At top level:
mod_vhost_alias.c:447: error: parse error before 'vhost_alias_module'
mod_vhost_alias.c:449: error: 'STANDARD20_MODULE_STUFF' undeclared here (not
in a function)
mod_vhost_alias.c:450: warning: excess elements in scalar initializer
mod_vhost_alias.c:450: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:451: warning: excess elements in scalar initializer
mod_vhost_alias.c:451: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:452: warning: excess elements in scalar initializer
mod_vhost_alias.c:452: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:453: warning: excess elements in scalar initializer
mod_vhost_alias.c:453: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:454: warning: excess elements in scalar initializer
mod_vhost_alias.c:454: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:456: warning: excess elements in scalar initializer
mod_vhost_alias.c:456: warning: (near initialization for
'vhost_alias_module')
mod_vhost_alias.c:456: warning: data definition has no type or storage class
apxs:Break: Command failed with rc=1

I've read though the documentation and searched for help but haven't been
successful.
What do I need to do to compile a module using apxs?

Re: [users@httpd] [module] how do I compile a module?

Posted by Andrew WC Brown <om...@gmail.com>.
Ohh, I forgot to add it to my path and I think its calling the old one.
Thanks Nick.

On 9/19/07, Andrew WC Brown <om...@gmail.com> wrote:
>
> but I 'm calling the command as root user.
>
> On 9/19/07, J. Greenlees <li...@jaqui-greenlees.net> wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Andrew WC Brown wrote:
> > > As per my image:
> > http://img48.imageshack.us/img48/1457/apacheincludetu5.jpg
> > > It shows that the files are where I specified.
> > >
> >
> > Then it could be that the access permissions are not allowing the user
> > account to read them.
> >
> > Jaqui
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFG8KvKylMakk+oQ1oRAnMdAJ0afAMIj+i6K2tZZAyV7Itj7w5v+wCfZCGV
> > OZWjMz2WjRfaPBCiNN5ENZ0=
> > =ha6u
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> --
> Monsterbox Productions
> putting small businesses on-line
>
> 1319 Victoria Avenue East
> Thunder Bay, Ontario P7C 1C3
> Canada
>
> Andrew WC Brown
> web-developer and owner
> andrew@monsterboxpro.com
> P: 807-626-9009
> F: 807-624-2705
>



-- 
Monsterbox Productions
putting small businesses on-line

1319 Victoria Avenue East
Thunder Bay, Ontario P7C 1C3
Canada

Andrew WC Brown
web-developer and owner
andrew@monsterboxpro.com
P: 807-626-9009
F: 807-624-2705

Re: [users@httpd] [module] how do I compile a module?

Posted by Andrew WC Brown <om...@gmail.com>.
but I 'm calling the command as root user.

On 9/19/07, J. Greenlees <li...@jaqui-greenlees.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew WC Brown wrote:
> > As per my image:
> http://img48.imageshack.us/img48/1457/apacheincludetu5.jpg
> > It shows that the files are where I specified.
> >
>
> Then it could be that the access permissions are not allowing the user
> account to read them.
>
> Jaqui
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG8KvKylMakk+oQ1oRAnMdAJ0afAMIj+i6K2tZZAyV7Itj7w5v+wCfZCGV
> OZWjMz2WjRfaPBCiNN5ENZ0=
> =ha6u
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Monsterbox Productions
putting small businesses on-line

1319 Victoria Avenue East
Thunder Bay, Ontario P7C 1C3
Canada

Andrew WC Brown
web-developer and owner
andrew@monsterboxpro.com
P: 807-626-9009
F: 807-624-2705

Re: [users@httpd] [module] how do I compile a module?

Posted by "J. Greenlees" <li...@jaqui-greenlees.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew WC Brown wrote:
> As per my image: http://img48.imageshack.us/img48/1457/apacheincludetu5.jpg
> It shows that the files are where I specified.
> 

Then it could be that the access permissions are not allowing the user
account to read them.

Jaqui


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8KvKylMakk+oQ1oRAnMdAJ0afAMIj+i6K2tZZAyV7Itj7w5v+wCfZCGV
OZWjMz2WjRfaPBCiNN5ENZ0=
=ha6u
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] [module] how do I compile a module?

Posted by Andrew WC Brown <om...@gmail.com>.
As per my image: http://img48.imageshack.us/img48/1457/apacheincludetu5.jpg
It shows that the files are where I specified.

On 9/19/07, J. Greenlees <li...@jaqui-greenlees.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew WC Brown wrote:
> > I receive the same results, also --c doesn't work, only with single
> hyphen
> >
>
> Then the include path is not right. The error messages say that the
> files are not where it's looking for them.
>
> Jaqui
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG8KBEylMakk+oQ1oRAqWjAJ9kntKf2g3ccPT+FRdggk0L5IabbQCeJ1B/
> sOHwcKxXuZ3tfhC25H537go=
> =WB2R
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] [module] how do I compile a module?

Posted by "J. Greenlees" <li...@jaqui-greenlees.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew WC Brown wrote:
> I receive the same results, also --c doesn't work, only with single hyphen
> 

Then the include path is not right. The error messages say that the
files are not where it's looking for them.

Jaqui



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8KBEylMakk+oQ1oRAqWjAJ9kntKf2g3ccPT+FRdggk0L5IabbQCeJ1B/
sOHwcKxXuZ3tfhC25H537go=
=WB2R
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] [module] how do I compile a module?

Posted by Andrew WC Brown <om...@gmail.com>.
I receive the same results, also --c doesn't work, only with single hyphen

On 9/18/07, J. Greenlees <li...@jaqui-greenlees.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew WC Brown wrote:
> > I've tired to add the include directory but appears to ignore the one I
> gave
> > it:
> >
> > apple:/volumes/scratch/dump/httpd-2.2.6/modules/mappers owner$ sudo apxs
> -c
> > mod_vhost_alias.c -I/usr/local/apache2/include
>
> try:
> apple:/volumes/scratch/dump/httpd-2.2.6/modules/mappers owner$ sudo apxs
> - -c mod_vhost_alias.ca -I /usr/local/apache2/include
>
> the space between the -I and path is required by the compiler.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG8JccylMakk+oQ1oRAqEuAJ9r8SmCUKQn26KH+pdTRWfP6iyO3gCeP3jJ
> YEjs+Q6dRsfqi9hylt7RXvM=
> =5Lly
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Monsterbox Productions
putting small businesses on-line

1319 Victoria Avenue East
Thunder Bay, Ontario P7C 1C3
Canada

Andrew WC Brown
web-developer and owner
andrew@monsterboxpro.com
P: 807-626-9009
F: 807-624-2705

Re: [users@httpd] [module] how do I compile a module?

Posted by "J. Greenlees" <li...@jaqui-greenlees.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew WC Brown wrote:
> I've tired to add the include directory but appears to ignore the one I gave
> it:
> 
> apple:/volumes/scratch/dump/httpd-2.2.6/modules/mappers owner$ sudo apxs -c
> mod_vhost_alias.c -I/usr/local/apache2/include

try:
apple:/volumes/scratch/dump/httpd-2.2.6/modules/mappers owner$ sudo apxs
- -c mod_vhost_alias.ca -I /usr/local/apache2/include

the space between the -I and path is required by the compiler.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8JccylMakk+oQ1oRAqEuAJ9r8SmCUKQn26KH+pdTRWfP6iyO3gCeP3jJ
YEjs+Q6dRsfqi9hylt7RXvM=
=5Lly
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] [module] how do I compile a module?

Posted by Andrew WC Brown <om...@gmail.com>.
I've tired to add the include directory but appears to ignore the one I gave
it:

apple:/volumes/scratch/dump/httpd-2.2.6/modules/mappers owner$ sudo apxs -c
mod_vhost_alias.c -I/usr/local/apache2/include

results in:

gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe
-DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/httpd  -c
mod_vhost_alias.c
mod_vhost_alias.c:36:17: error: apr.h: No such file or directory
mod_vhost_alias.c:37:25: error: apr_strings.h: No such file or directory
mod_vhost_alias.c:38:23: error: apr_hooks.h: No such file or directory
mod_vhost_alias.c:39:21: error: apr_lib.h: No such file or directory
mod_vhost_alias.c:42:22: error: apr_want.h: No such file or directory
...

On 9/18/07, Dragon <dr...@crimson-dragon.com> wrote:
>
>
> On Tue, September 18, 2007 18:27, Andrew WC Brown wrote:
> > Hi, I'm new to this mailing list (waves).
> >
> > I'm running OS X.4.10 with Apache 2.2.6
> >
> > When I installed apache I was sure to --enable-module=shared so I could
> > load
> > DSOs.
> >
> > I let apache2 install to /usr/local/apache2. When I run apache it works.
> >
> > I didn't specify any additional modules on compilation so my modules
> > directory is emptied.
> >
> > I'm going to be using virtual hosting so I want to compile
> > mod_vhost_alias.c
> >
> > I've navigated to the directory in my source folder: httpd-2.2.6
> > /modules/mappers/
> >
> > I've tired to compile using: sudo apxs -c mod_vhost_alias.c
> >
> > I get the following error:
> >
> > gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe
> > -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/httpd  -c
> > mod_vhost_alias.c
> > mod_vhost_alias.c:36:17: error: apr.h: No such file or directory
> > mod_vhost_alias.c:37:25: error: apr_strings.h: No such file or directory
> > mod_vhost_alias.c:38:23: error: apr_hooks.h: No such file or directory
> > mod_vhost_alias.c:39:21: error: apr_lib.h: No such file or directory
> > mod_vhost_alias.c:42:22: error: apr_want.h: No such file or directory
> > In file included from /usr/include/httpd/ap_config.h:1129,
> >                  from /usr/include/httpd/httpd.h:29,
> >                  from mod_vhost_alias.c:44:
>
>
> The section of the errors I have kept above tell you where the problem is.
>
> The header files that apxs expects to find in the include directory
> specified on the command line with the -I option do not exist where you
> are telling apxs they should be.
>
> You need to locate where those files are and change the -I option on the
> command line to point to the right place. I don't know if there needs to
> be a space between the option specifier and the include path, but if you
> do have those files in the specified directory, I would put a space in
> there and try again.
>
> Hopefully, that is all you will need to do.
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] [module] how do I compile a module?

Posted by Dragon <dr...@crimson-dragon.com>.
On Tue, September 18, 2007 18:27, Andrew WC Brown wrote:
> Hi, I'm new to this mailing list (waves).
>
> I'm running OS X.4.10 with Apache 2.2.6
>
> When I installed apache I was sure to --enable-module=shared so I could
> load
> DSOs.
>
> I let apache2 install to /usr/local/apache2. When I run apache it works.
>
> I didn't specify any additional modules on compilation so my modules
> directory is emptied.
>
> I'm going to be using virtual hosting so I want to compile
> mod_vhost_alias.c
>
> I've navigated to the directory in my source folder: httpd-2.2.6
> /modules/mappers/
>
> I've tired to compile using: sudo apxs -c mod_vhost_alias.c
>
> I get the following error:
>
> gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe
> -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/httpd  -c
> mod_vhost_alias.c
> mod_vhost_alias.c:36:17: error: apr.h: No such file or directory
> mod_vhost_alias.c:37:25: error: apr_strings.h: No such file or directory
> mod_vhost_alias.c:38:23: error: apr_hooks.h: No such file or directory
> mod_vhost_alias.c:39:21: error: apr_lib.h: No such file or directory
> mod_vhost_alias.c:42:22: error: apr_want.h: No such file or directory
> In file included from /usr/include/httpd/ap_config.h:1129,
>                  from /usr/include/httpd/httpd.h:29,
>                  from mod_vhost_alias.c:44:


The section of the errors I have kept above tell you where the problem is.

The header files that apxs expects to find in the include directory
specified on the command line with the -I option do not exist where you
are telling apxs they should be.

You need to locate where those files are and change the -I option on the
command line to point to the right place. I don't know if there needs to
be a space between the option specifier and the include path, but if you
do have those files in the specified directory, I would put a space in
there and try again.

Hopefully, that is all you will need to do.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] [module] how do I compile a module?

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 18 Sep 2007 21:27:41 -0400
"Andrew WC Brown" <om...@gmail.com> wrote:

> I'm running OS X.4.10 with Apache 2.2.6

> I let apache2 install to /usr/local/apache2. When I run apache it
>works.

but ...

> I've tired to compile using: sudo apxs -c mod_vhost_alias.c
> 
> I get the following error:
> 
> gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os
> -pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE

That's a very, very old apxs, and has nothing to do with your 2.2.6
installation.  Get rid of it, and use the one that got installed
under /usr/local/apache2.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: [module] how do I compile a module?

Posted by Neville Hillyer <n....@open.ac.uk>.
Are you running OS X 10.4.10 or OS X server 10.4.10 ?

I am on holiday and don't have easy access to my Xserve but I wonder 
if you have checked that file permissions are satisfactory.

Neville

ps would it be helpful if everybody put their OS at the beginning of 
their subject line?

At 21:27 -0400 18/09/2007, Andrew WC Brown wrote:
>Hi, I'm new to this mailing list (waves).
>
>I'm running OS X.4.10 with Apache 2.2.6
>
>When I installed apache I was sure to --enable-module=shared so I 
>could load DSOs.
>
>I let apache2 install to /usr/local/apache2. When I run apache it works.
>
>I didn't specify any additional modules on compilation so my modules 
>directory is emptied.
>
>I'm going to be using virtual hosting so I want to compile mod_vhost_alias.c
>
>I've navigated to the directory in my source folder: 
>httpd-2.2.6/modules/mappers/
>
>I've tired to compile using: sudo apxs -c mod_vhost_alias.c
>
>I get the following error:
>
>gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os 
>-pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE 
>-I/usr/include/httpd  -c mod_vhost_alias.c
>mod_vhost_alias.c:36:17: error: apr.h: No such file or directory
>mod_vhost_alias.c:37:25: error: apr_strings.h: No such file or directory
>mod_vhost_alias.c:38:23: error: apr_hooks.h: No such file or directory
>mod_vhost_alias.c:39:21: error: apr_lib.h: No such file or directory
>mod_vhost_alias.c:42:22: error: apr_want.h: No such file or directory
>In file included from /usr/include/httpd/ap_config.h:1129,
>                  from /usr/include/httpd/httpd.h:29,
>                  from mod_vhost_alias.c:44:
>/usr/include/httpd/hsregex.h:22:1: warning: "ap_private_extern" redefined
>In file included from /usr/include/httpd/httpd.h:29,
>                  from mod_vhost_alias.c:44:
>/usr/include/httpd/ap_config.h:1025:1: warning: this is the location 
>of the previous definition
>mod_vhost_alias.c:50: error: parse error before 'vhost_alias_module'
>mod_vhost_alias.c:50: warning: data definition has no type or storage class
>mod_vhost_alias.c:72: error: parse error before '*' token
>mod_vhost_alias.c: In function 'mva_create_server_config':
>mod_vhost_alias.c:76: error: 'p' undeclared (first use in this function)
>mod_vhost_alias.c:76: error: (Each undeclared identifier is reported only once
>mod_vhost_alias.c:76: error: for each function it appears in.)
>mod_vhost_alias.c: At top level:
>mod_vhost_alias.c:84: error: parse error before '*' token
>mod_vhost_alias.c: In function 'mva_merge_server_config':
>mod_vhost_alias.c:86: error: 'parentv' undeclared (first use in this function)
>mod_vhost_alias.c:87: error: 'childv' undeclared (first use in this function)
>mod_vhost_alias.c:90: error: 'p' undeclared (first use in this function)
>mod_vhost_alias.c: In function 'vhost_alias_set':
>mod_vhost_alias.c:127: error: request for member 'module_index' in 
>something not a structure or union
>mod_vhost_alias.c:154: warning: passing argument 1 of 
>'ap_os_is_path_absolute' from incompatible pointer type
>mod_vhost_alias.c:154: error: too many arguments to function 
>'ap_os_is_path_absolute'
>mod_vhost_alias.c: At top level:
>mod_vhost_alias.c:219: error: initializer element is not constant
>mod_vhost_alias.c:219: error: (near initialization for 'mva_commands[0].name')
>mod_vhost_alias.c:222: error: initializer element is not constant
>mod_vhost_alias.c:222: error: (near initialization for 'mva_commands[0].func')
>mod_vhost_alias.c:225: error: initializer element is not constant
>mod_vhost_alias.c:225: error: (near initialization for 
>'mva_commands[0].cmd_data')
>mod_vhost_alias.c:228: error: initializer element is not constant
>mod_vhost_alias.c:228: error: (near initialization for 
>'mva_commands[0].req_override')
>mod_vhost_alias.c:229: warning: braces around scalar initializer
>mod_vhost_alias.c:229: warning: (near initialization for 
>'mva_commands[0].args_how')
>mod_vhost_alias.c:229: error: incompatible types in initialization
>mod_vhost_alias.c:237: error: syntax error before 'void'
>mod_vhost_alias.c: In function 'vhost_alias_checkspace':
>mod_vhost_alias.c:244: warning: assignment makes pointer from 
>integer without a cast
>mod_vhost_alias.c:247: warning: assignment makes pointer from 
>integer without a cast
>mod_vhost_alias.c: In function 'vhost_alias_interpolate':
>mod_vhost_alias.c:376: warning: assignment makes pointer from 
>integer without a cast
>mod_vhost_alias.c:379: warning: assignment makes pointer from 
>integer without a cast
>mod_vhost_alias.c: In function 'mva_translate':
>mod_vhost_alias.c:390: error: request for member 'module_index' in 
>something not a structure or union
>mod_vhost_alias.c:390: error: array subscript is not an integer
>mod_vhost_alias.c:428: error: 'struct request_rec' has no member 
>named 'canonical_filename'
>mod_vhost_alias.c: At top level:
>mod_vhost_alias.c:440: error: parse error before '*' token
>mod_vhost_alias.c: In function 'register_hooks':
>mod_vhost_alias.c:444: error: 'APR_HOOK_MIDDLE' undeclared (first 
>use in this function)
>mod_vhost_alias.c: At top level:
>mod_vhost_alias.c:447: error: parse error before 'vhost_alias_module'
>mod_vhost_alias.c:449: error: 'STANDARD20_MODULE_STUFF' undeclared 
>here (not in a function)
>mod_vhost_alias.c:450: warning: excess elements in scalar initializer
>mod_vhost_alias.c:450: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:451: warning: excess elements in scalar initializer
>mod_vhost_alias.c:451: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:452: warning: excess elements in scalar initializer
>mod_vhost_alias.c:452: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:453: warning: excess elements in scalar initializer
>mod_vhost_alias.c:453: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:454: warning: excess elements in scalar initializer
>mod_vhost_alias.c:454: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:456: warning: excess elements in scalar initializer
>mod_vhost_alias.c:456: warning: (near initialization for 'vhost_alias_module')
>mod_vhost_alias.c:456: warning: data definition has no type or storage class
>apxs:Break: Command failed with rc=1
>
>I've read though the documentation and searched for help but haven't 
>been successful.
>What do I need to do to compile a module using apxs?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org