You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2003/10/14 15:59:06 UTC
-Werror compilation errors
hi all
I was trying to build httpd-apreq-2 and the build script pulled out the
-Werror setting from my mod_perl build and failed.
attached is a patch that gets rid of most of the warnings/errors. the only
ones left are
/src/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h:388: warning:
`apreq_xs_encode' defined but not used
/src/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h:409: warning:
`apreq_xs_decode' defined but not used
/src/httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Apache__Request.h:63:
warning: `apreq_xs_make_param' defined but not used
which I wasn't sure how to get rid of, since they are functions that appear
to be used elsewhere.
oh, and if someone could enlighten me as to the proper way to disable
-Werror on-the-fly, that would be super.
--Geoff
Re: -Werror compilation errors
Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
Actually you could try -Wno-error, not sure if gcc will pick the latter option
if -Werror is specified before -Wno-error.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: -Werror compilation errors
Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> Geoffrey Young <ge...@modperlcookbook.org> writes:
>
>
>>>I can't see anything that has to do with C ;)
>>
>>:)
>>
>>
>>>Here is a temp workaround for you:
>>>httpd-apreq-2/glue/perl> make MPOLLUTE=-Wno-error
>>
>>you rock!
>
>
> Shouldn't be necessary with current cvs.
Indeed. Thanks Joe!
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: -Werror compilation errors
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:
> > I can't see anything that has to do with C ;)
>
> :)
>
> > Here is a temp workaround for you:
> > httpd-apreq-2/glue/perl> make MPOLLUTE=-Wno-error
>
> you rock!
Shouldn't be necessary with current cvs.
--
Joe Schaefer
Re: -Werror compilation errors
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> I can't see anything that has to do with C ;)
:)
>
> Here is a temp workaround for you:
>
> httpd-apreq-2/glue/perl> make MPOLLUTE=-Wno-error
you rock!
thanks.
--Geoff
Re: -Werror compilation errors
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>>> something like
>>>
>>> $ CCFLAGS=-Wno-unused make
>>>
>>> or even
>>>
>>> $ CCFLAGS=-Wno-unused ./configure
>
>
>>
>> According to gcc manual, it should work:
>
>
> right. the issue is, though, that it's not being picked up by either of
> the two options above. I also tried CCOPTS and a bunch of other things,
> but my build still only contains the options I used to build mod_perl:
>
> -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
> -Werror
>
> so, it's not like -Wno-unused doesn't work - I can't even get it to be
> recognized.
>
> I'm sure it's just a failing of my non-C mind, though...
I can't see anything that has to do with C ;)
Here is a temp workaround for you:
httpd-apreq-2/glue/perl> make MPOLLUTE=-Wno-error
derived from Makefile:
MPOLLUTE =
...
CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \
$(CCFLAGS) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
$(XS_DEFINE_VERSION)
just used the unused flag ;) Certainly something to fix.
>> Of course if you would have built mp without MP_MAINTAINER=1 it won't
>> be used as well ;)
>
>
> yeah, thanks :)
>
> but it's pretty silly that I can't compile apreq without recompiling
> mod_perl presently - there ought to be a quick way to disable this that
> I'm missing.
Agreed.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: -Werror compilation errors
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>> something like
>>
>> $ CCFLAGS=-Wno-unused make
>>
>> or even
>>
>> $ CCFLAGS=-Wno-unused ./configure
>
> According to gcc manual, it should work:
right. the issue is, though, that it's not being picked up by either of the
two options above. I also tried CCOPTS and a bunch of other things, but my
build still only contains the options I used to build mod_perl:
-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror
so, it's not like -Wno-unused doesn't work - I can't even get it to be
recognized.
I'm sure it's just a failing of my non-C mind, though...
>
> Of course if you would have built mp without MP_MAINTAINER=1 it won't be
> used as well ;)
yeah, thanks :)
but it's pretty silly that I can't compile apreq without recompiling
mod_perl presently - there ought to be a quick way to disable this that I'm
missing.
--Geoff
Re: -Werror compilation errors
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
>
> Stas Bekman wrote:
>
>> Geoffrey Young wrote:
>> [...]
>>
>>> oh, and if someone could enlighten me as to the proper way to disable
>>> -Werror on-the-fly, that would be super.
>>
>>
>>
>> what do you mean disable on the fly? it's either on or off, do I miss
>> something in your question?
>
>
> something like
>
> $ CCFLAGS=-Wno-unused make
>
> or even
>
> $ CCFLAGS=-Wno-unused ./configure
>
> anything which would override the default -Werror that make is picking
> up from Apache::Build. I would have thought that some variant of the
> above would have worked, but alas...
>
> --Geoff
According to gcc manual, it should work:
You can request many specific warnings with options beginning -W, for
example -Wimplicit to request warnings on implicit declarations. Each
of these specific warning options also has a negative form beginning
-Wno- to turn off warnings; for example, -Wno-implicit. This manual
lists only one of the two forms, whichever is not the default.
-Wno-unused (for any unused warnings)
or any of the following after applying s/-W/-Wno-/
-Wunused-function -Wunused-label -Wunused-parameter
-Wunused-value -Wunused-variable
Of course if you would have built mp without MP_MAINTAINER=1 it won't be used
as well ;)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: -Werror compilation errors
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Stas Bekman wrote:
> Geoffrey Young wrote:
> [...]
>
>> oh, and if someone could enlighten me as to the proper way to disable
>> -Werror on-the-fly, that would be super.
>
>
> what do you mean disable on the fly? it's either on or off, do I miss
> something in your question?
something like
$ CCFLAGS=-Wno-unused make
or even
$ CCFLAGS=-Wno-unused ./configure
anything which would override the default -Werror that make is picking up
from Apache::Build. I would have thought that some variant of the above
would have worked, but alas...
--Geoff
Re: -Werror compilation errors
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
[...]
> oh, and if someone could enlighten me as to the proper way to disable
> -Werror on-the-fly, that would be super.
what do you mean disable on the fly? it's either on or off, do I miss
something in your question?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: -Werror compilation errors
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Joe Schaefer wrote:
> Geoffrey Young <ge...@modperlcookbook.org> writes:
>
>
>>>attached is a patch
>>
>>oops. here it is.
>
>
> Thanks, applied with one change:
excellent, thanks.
just keep in mind my last comment from before - it still doesn't compile
with -Werror, I just don't know how to fix the remaining issues.
but I'll keep trying :)
--Geoff
Re: -Werror compilation errors
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Geoffrey Young <ge...@modperlcookbook.org> writes:
> > attached is a patch
>
> oops. here it is.
Thanks, applied with one change:
> @@ -277,9 +278,10 @@
> const char *val)
> {
> struct apreq_xs_do_arg *d = (struct apreq_xs_do_arg *)data;
> - void *env = d->env;
> + void *env;
> dTHXa(d->perl);
> dSP;
> + env = d->env;
> if (key)
> XPUSHs(sv_2mortal(newSVpv(key,0)));
> else
"env" isn't needed at all in this section, so I dropped the variable
entirely.
--
Joe Schaefer
Re: -Werror compilation errors
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> attached is a patch
oops. here it is.
--Geoff