You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Steve Hay <st...@uk.radan.com> on 2004/04/26 10:08:27 UTC

Problem building CVS: apxs -q EXTRA_CFLAGS failed

Hi all,

After realising that everything had apparently gone very quiet on this 
list, I discovered for the second time in recent months that I'd been 
unsubscribed from it somehow!

I don't know why it keeps happening, but I'm back now anyway.  So now 
I'm trying to build the latest CVS mp2 to test out a few Win32 things 
that I see people have been asking about, and I find that the 
Makefile.PL stage doesn't even work.  I get loads of lines like these 
coming out:

[  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CFLAGS' failed:
[  error]

[  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CPPFLAGS' failed:
[  error]

Presumably these relate to Apache::Build::apxs_extra_cflags() and 
Apache::Build::apxs_extra_cppflags(), which have both been added since I 
last built mp2, but I've no idea what's going wrong -- the error 
messages are a little less than useful ;)

Anyone else having this trouble?

I can "fix" it by commenting out the call to apxs_extra_cppflags() in 
ap_ccopts() and by making has_large_files_conflict() return 0 
immediately, thus removing all calls to those two new methods.

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Stas Bekman <st...@stason.org>.
> Didn't quite do the trick: $error needs to be chomp()'ed like $val 
> itself was a line or two earlier, otherwise $error contains a newline 
> and evaluates as "true".  This fixes it for me:

Excellent, Steve, committed.
__________________________________________________________________
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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:

>Randy Kobes wrote:
>  
>
>>But the port of apxs that I did does have an EXTRA_CPPFLAGS,
>>it's just that
>>   apxs -q EXTRA_CPPFLAGS
>>returns nothing. That's to be compared to, eg,
>>   apxs -q FOO_BAR
>>which gives an apxs error.
>>    
>>
>
>Yes, sorry Randy, you are right, it's the apxs() sub problem. It always 
>expects some value, and considers the empty value as a an error.
>
>May be this is a safe change:
>
>Index: lib/Apache/Build.pm
>===================================================================
>RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
>retrieving revision 1.160
>diff -u -r1.160 Build.pm
>--- lib/Apache/Build.pm 5 Apr 2004 21:45:08 -0000       1.160
>+++ lib/Apache/Build.pm 26 Apr 2004 18:19:43 -0000
>@@ -168,13 +168,13 @@
>      chomp $val if defined $val; # apxs post-2.0.40 adds a new line
>
>      unless ($val) {
>-        error "'$apxs @_' failed:";
>-
>+        # do we have an error or it's just an empty value?
>          if (my $error = qx($apxs @_ 2>&1)) {
>+            error "'$apxs @_' failed:";
>              error $error;
>          }
>          else {
>-            error 'unknown error';
>+            $val = '';
>          }
>      }
>
Didn't quite do the trick: $error needs to be chomp()'ed like $val 
itself was a line or two earlier, otherwise $error contains a newline 
and evaluates as "true".  This fixes it for me:

Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.160
diff -u -u -r1.160 Build.pm
--- lib/Apache/Build.pm 5 Apr 2004 21:45:08 -0000       1.160
+++ lib/Apache/Build.pm 27 Apr 2004 13:12:47 -0000
@@ -168,13 +168,15 @@
     chomp $val if defined $val; # apxs post-2.0.40 adds a new line

     unless ($val) {
-        error "'$apxs @_' failed:";
-
-        if (my $error = qx($apxs @_ 2>&1)) {
+        # do we have an error or is it just an empty value?
+        my $error = qx($apxs @_ 2>&1);
+        chomp $error if defined $error; # apxs post-2.0.40 adds a new line
+        if ($error) {
+            error "'$apxs @_' failed:";
             error $error;
         }
         else {
-            error 'unknown error';
+            $val = '';
         }
     }




------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Mon, 26 Apr 2004, Stas Bekman wrote:
> 
> 
>>>>But isn't apxs.bat is a custom script made by Randy? May
>>>>be it doesn't include those flags?
>>>
>>>
>>>That's right - I didn't put anything into EXTRA_CPPFLAGS,
>>>so it just comes back as an empty string. Should this be
>>>considered (by mod_perl) as an "error"? Or should apxs
>>>put something into EXTRA_CPPFLAGS, to handle this context?
>>
>>It's an error, since apxs tells mod_perl that such flag doesn't exist, which
>>indicates that something is wrong. I think apxs.bat should at least support
>>those flags, but return an empty string, if you think they have nothing to return.
>>
>>mod_perl didn't invent those flags, it's the apxs that provides them. I don't
>>know how did you port apxs to win32, but I'd think that you need to look at
>>apxs to figure out the answer what should be in them. But ideally apxs.bat
>>should support all the same flags that apxs supports. Otherwise the code
>>relying on apxs can't be portable.
> 
> 
> But the port of apxs that I did does have an EXTRA_CPPFLAGS,
> it's just that
>    apxs -q EXTRA_CPPFLAGS
> returns nothing. That's to be compared to, eg,
>    apxs -q FOO_BAR
> which gives an apxs error.

Yes, sorry Randy, you are right, it's the apxs() sub problem. It always 
expects some value, and considers the empty value as a an error.

May be this is a safe change:

Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.160
diff -u -r1.160 Build.pm
--- lib/Apache/Build.pm 5 Apr 2004 21:45:08 -0000       1.160
+++ lib/Apache/Build.pm 26 Apr 2004 18:19:43 -0000
@@ -168,13 +168,13 @@
      chomp $val if defined $val; # apxs post-2.0.40 adds a new line

      unless ($val) {
-        error "'$apxs @_' failed:";
-
+        # do we have an error or it's just an empty value?
          if (my $error = qx($apxs @_ 2>&1)) {
+            error "'$apxs @_' failed:";
              error $error;
          }
          else {
-            error 'unknown error';
+            $val = '';
          }
      }



__________________________________________________________________
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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 26 Apr 2004, Stas Bekman wrote:

>
> >>But isn't apxs.bat is a custom script made by Randy? May
> >>be it doesn't include those flags?
> >
> >
> > That's right - I didn't put anything into EXTRA_CPPFLAGS,
> > so it just comes back as an empty string. Should this be
> > considered (by mod_perl) as an "error"? Or should apxs
> > put something into EXTRA_CPPFLAGS, to handle this context?
>
> It's an error, since apxs tells mod_perl that such flag doesn't exist, which
> indicates that something is wrong. I think apxs.bat should at least support
> those flags, but return an empty string, if you think they have nothing to return.
>
> mod_perl didn't invent those flags, it's the apxs that provides them. I don't
> know how did you port apxs to win32, but I'd think that you need to look at
> apxs to figure out the answer what should be in them. But ideally apxs.bat
> should support all the same flags that apxs supports. Otherwise the code
> relying on apxs can't be portable.

But the port of apxs that I did does have an EXTRA_CPPFLAGS,
it's just that
   apxs -q EXTRA_CPPFLAGS
returns nothing. That's to be compared to, eg,
   apxs -q FOO_BAR
which gives an apxs error.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Stas Bekman <st...@stason.org>.
>>But isn't apxs.bat is a custom script made by Randy? May
>>be it doesn't include those flags?
> 
> 
> That's right - I didn't put anything into EXTRA_CPPFLAGS,
> so it just comes back as an empty string. Should this be
> considered (by mod_perl) as an "error"? Or should apxs
> put something into EXTRA_CPPFLAGS, to handle this context?

It's an error, since apxs tells mod_perl that such flag doesn't exist, which 
indicates that something is wrong. I think apxs.bat should at least support 
those flags, but return an empty string, if you think they have nothing to return.

mod_perl didn't invent those flags, it's the apxs that provides them. I don't 
know how did you port apxs to win32, but I'd think that you need to look at 
apxs to figure out the answer what should be in them. But ideally apxs.bat 
should support all the same flags that apxs supports. Otherwise the code 
relying on apxs can't be portable.

__________________________________________________________________
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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Steve Hay <st...@uk.radan.com>.
Randy Kobes wrote:

>On Mon, 26 Apr 2004, Stas Bekman wrote:
>
>  
>
>>Steve Hay wrote:
>>    
>>
>>>Hi all,
>>>
>>>After realising that everything had apparently gone very quiet on this
>>>list, I discovered for the second time in recent months that I'd been
>>>unsubscribed from it somehow!
>>>      
>>>
>>it's a qmail feature. If it sends you an email and it bounces. It tries to
>>send a few probes. If they bounce it unsubscribes you.
>>
>>    
>>
>>>I don't know why it keeps happening, but I'm back now anyway.  So now
>>>I'm trying to build the latest CVS mp2 to test out a few Win32 things
>>>that I see people have been asking about, and I find that the
>>>Makefile.PL stage doesn't even work.  I get loads of lines like these
>>>coming out:
>>>
>>>[  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CFLAGS' failed:
>>>[  error]
>>>
>>>[  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CPPFLAGS' failed:
>>>[  error]
>>>
>>>Presumably these relate to Apache::Build::apxs_extra_cflags() and
>>>Apache::Build::apxs_extra_cppflags(), which have both been added since I
>>>last built mp2, but I've no idea what's going wrong -- the error
>>>messages are a little less than useful ;)
>>>
>>>Anyone else having this trouble?
>>>      
>>>
>
>I've seen those messages too, but a Makefile was still
>produced which built mod_perl. I took the messages more to
>be warnings, rather than fatal errors.
>
Oh yes! -- I get a Makefile too!  I hadn't even noticed that.  I just 
saw 11+ screens-full of [error] messages and assumed the worst ;)

>
>  
>
>>But isn't apxs.bat is a custom script made by Randy? May
>>be it doesn't include those flags?
>>    
>>
>
>That's right - I didn't put anything into EXTRA_CPPFLAGS,
>so it just comes back as an empty string. Should this be
>considered (by mod_perl) as an "error"? Or should apxs
>put something into EXTRA_CPPFLAGS, to handle this context?
>  
>
Would it be possible to have apxs.bat support the EXTRA_ flags?  Stas 
said that part of the new stuff was done to check for possible LFS 
conflicts, which is also an issue on Win32 isn't it?

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 26 Apr 2004, Stas Bekman wrote:

> Steve Hay wrote:
> > Hi all,
> >
> > After realising that everything had apparently gone very quiet on this
> > list, I discovered for the second time in recent months that I'd been
> > unsubscribed from it somehow!
>
> it's a qmail feature. If it sends you an email and it bounces. It tries to
> send a few probes. If they bounce it unsubscribes you.
>
> > I don't know why it keeps happening, but I'm back now anyway.  So now
> > I'm trying to build the latest CVS mp2 to test out a few Win32 things
> > that I see people have been asking about, and I find that the
> > Makefile.PL stage doesn't even work.  I get loads of lines like these
> > coming out:
> >
> > [  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CFLAGS' failed:
> > [  error]
> >
> > [  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CPPFLAGS' failed:
> > [  error]
> >
> > Presumably these relate to Apache::Build::apxs_extra_cflags() and
> > Apache::Build::apxs_extra_cppflags(), which have both been added since I
> > last built mp2, but I've no idea what's going wrong -- the error
> > messages are a little less than useful ;)
> >
> > Anyone else having this trouble?

I've seen those messages too, but a Makefile was still
produced which built mod_perl. I took the messages more to
be warnings, rather than fatal errors.

> But isn't apxs.bat is a custom script made by Randy? May
> be it doesn't include those flags?

That's right - I didn't put anything into EXTRA_CPPFLAGS,
so it just comes back as an empty string. Should this be
considered (by mod_perl) as an "error"? Or should apxs
put something into EXTRA_CPPFLAGS, to handle this context?

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problem building CVS: apxs -q EXTRA_CFLAGS failed

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Hi all,
> 
> After realising that everything had apparently gone very quiet on this 
> list, I discovered for the second time in recent months that I'd been 
> unsubscribed from it somehow!

it's a qmail feature. If it sends you an email and it bounces. It tries to 
send a few probes. If they bounce it unsubscribes you.

> I don't know why it keeps happening, but I'm back now anyway.  So now 
> I'm trying to build the latest CVS mp2 to test out a few Win32 things 
> that I see people have been asking about, and I find that the 
> Makefile.PL stage doesn't even work.  I get loads of lines like these 
> coming out:
> 
> [  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CFLAGS' failed:
> [  error]
> 
> [  error] 'C:\apache2\bin\apxs.bat -q EXTRA_CPPFLAGS' failed:
> [  error]
> 
> Presumably these relate to Apache::Build::apxs_extra_cflags() and 
> Apache::Build::apxs_extra_cppflags(), which have both been added since I 
> last built mp2, but I've no idea what's going wrong -- the error 
> messages are a little less than useful ;)
> 
> Anyone else having this trouble?

But isn't apxs.bat is a custom script made by Randy? May be it doesn't include 
those flags?

> I can "fix" it by commenting out the call to apxs_extra_cppflags() in 
> ap_ccopts() and by making has_large_files_conflict() return 0 
> immediately, thus removing all calls to those two new methods.

I think it's safe to disable those calls for win32 anyway, unless win32 has 
the same Large File Support as Unices do. That's the reason they were 
introduced recently. Courtesy of Joe Orton, who I hope will come back and help 
us finish a few other open issues on Solaris (hey 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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org