You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Gustavo A. Baratto" <gb...@superb.net> on 2005/06/27 20:25:59 UTC

error

A bit off-topic, but I posted the same e-mail to the users@ mailing list 
earlier last week... but nobody could help me there...  and since most 
developers are here... anyways, here it goes:

Does anybody know what is this error all about?

I got the same error in all combinations of these:
- freebsd 5.3 and 5.4.
- apache 2.0.53 and 2.0.54
- freebsd make and gmake

gmake[4]: Entering directory
`/home/admin2/src/httpd-2.0.54/server/mpm/prefork'
/home/admin2/src/httpd-2.0.54/srclib/apr/libtool --silent --mode=compile
cc  -g -O2    -D_REENTRANT -D_THREAD_SAFE -DAP_HAVE_DESIGNATED_INITIALIZER
 -I/home/admin2/src/httpd-2.0.54/srclib/apr/include -I/home/admin2/src/httpd-2.0.54/srclib/apr-util/include
 -I/usr/local/include -I. -I/home/admin2/src/httpd-2.0.54/os/unix -I/home/admin2/src/httpd-2.0.54/server/mpm/prefork
 -I/home/admin2/src/httpd-2.0.54/modules/http -I/home/admin2/src/httpd-2.0.54/modules/filters
 -I/home/admin2/src/httpd-2.0.54/modules/proxy -I/home/admin2/src/httpd-2.0.54/include
 -I/home/admin2/src/httpd-2.0.54/modules/generators -I/usr/include/openssl -I/home/admin2/src/httpd-2.0.54/modules/dav/main
 -prefer-non-pic -static -c prefork.c && touch prefork.lo
prefork.c:103: error: syntax error before '*' token
prefork.c:103: warning: data definition has no type or storage class
gmake[4]: *** [prefork.lo] Error 1
gmake[4]: Leaving directory
`/home/admin2/src/httpd-2.0.54/server/mpm/prefork'


Thanks 


Re: Include Paths, was Re: error

Posted by "Gustavo A. Baratto" <gb...@superb.net>.
Yes. that's the problem.

I removed all the apache's *.h files from the system's include directory, 
and recompiled apache.
Works great now ;)

And what Joe Orton said, is right. I had a mpm.h from worker in 
/usr/local/include, and I'm rebuilding apache with prefork now.

I haven't set -I/usr/local/includes nor any other INCLUDES in my 
environment. This is what config.log and config.status show about INCLUDES:

----
# grep INCLUDE config.log
APR_INCLUDEDIR='/home/admin2/src/httpd-2.0.54/srclib/apr/include'
APU_INCLUDEDIR='/home/admin2/src/httpd-2.0.54/srclib/apr-util/include'
EXTRA_INCLUDES=' -I/home/admin2/src/httpd-2.0.54/srclib/apr/include  -I/home/admin2/src/httpd-2.0.54/srclib/apr-util/include 
 -I/usr/local/include -I. -I$(top_srcdir)/os/$(OS_DIR) -I$(top_srcdir)/server/mpm/$(MPM_SUBDIR_NAME) 
 -I$(top_srcdir)/modules/http -I$(top_srcdir)/modules/filters -I$(top_srcdir)/modules/proxy 
 -I$(top_srcdir)/include -I$(top_srcdir)/modules/generators -I/usr/include/openssl 
 -I$(top_srcdir)/modules/dav/main'
INCLUDES=''


# grep INCLUDE config.status
s,@EXTRA_INCLUDES@, -I/home/admin2/src/httpd-2.0.54/srclib/apr/include  -I/home/admin2/src/httpd-2.0.54/srclib/apr-util/include 
 -I/usr/local/include -I. -I$(top_srcdir)/os/$(OS_DIR) -I$(top_srcdir)/server/mpm/$(MPM_SUBDIR_NAME) 
 -I$(top_srcdir)/modules/http -I$(top_srcdir)/modules/filters -I$(top_srcdir)/modules/proxy 
 -I$(top_srcdir)/include -I$(top_srcdir)/modules/generators -I/usr/include/openssl 
 -I$(top_srcdir)/modules/dav/main,;t t
s,@INCLUDES@,,;t t
s,@APR_INCLUDEDIR@,/home/admin2/src/httpd-2.0.54/srclib/apr/include,;t t
s,@APU_INCLUDEDIR@,/home/admin2/src/httpd-2.0.54/srclib/apr-util/include,;t 
t
------

Thanks a lot for your help

----- Original Message ----- 
From: "Paul Querna" <ch...@force-elite.com>
To: <de...@httpd.apache.org>
Sent: Monday, June 27, 2005 12:41 PM
Subject: Include Paths, was Re: error


> Joe Orton wrote:
>> On Mon, Jun 27, 2005 at 02:46:23PM -0400, Cliff Woolley wrote:
>>
>>>On Mon, 27 Jun 2005, Gustavo A. Baratto wrote:
>>>
>>>
>>>>prefork.c:103: error: syntax error before '*' token
>>>>prefork.c:103: warning: data definition has no type or storage class
>>>>gmake[4]: *** [prefork.lo] Error 1
>>>>gmake[4]: Leaving directory
>>>>`/home/admin2/src/httpd-2.0.54/server/mpm/prefork'
>>>
>>>
>>>Hmm, I'm not really sure how this never came up before.
>>>
>>>prefork.c:103 says:
>>>    static ap_pod_t *pod;
>>>
>>>struct ap_pod_t is defined in mpm_common.h but only if AP_MPM_USES_POD is
>>>defined.  server/mpm/prefork/mpm.h does define this symbol.  But 
>>>prefork.c
>>>does not include mpm.h at all, whereas it would have to do so prior to
>>>including mpm_common.h to pick up the definition of this data type.
>>
>>
>> mpm_common.h does itself include mpm.h fortunately, otherwise the
>> ceiling would indeed have fallen in ;)
>>
>> Gustova can you do:
>>
>> cd server/mpm/prefork
>> make CFLAGS=-E prefork.lo
>>
>> and then upload the preprocessed output "prefork.o" somewhere?  Possibly
>> you're picking up an installed mpm.h which was generated for a different
>> MPM, or something like that.
>
> Actually, I have been hitting this myself recently with trunk.
>
> I was picking up the an existing ap_listen.h.  This is a problem, since
> the Listen directive was changed from 1 arg to argv,
>
> This happened since I was installing to the same prefix, and
> APR/APR-Util were also installed to this same prefix. We recently
> changed to using an installed APR/APR-Util by default, which means those
> directories now get added to the include path, and wham, it includes the
> installed ap_listen.h first.
>
> Should just be some build hackery to make sure our include directory is
> always first.
>
> -Paul
> 


Re: Include Paths, was Re: error

Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jun 27, 2005 at 12:41:42PM -0700, Paul Querna wrote:
> Joe Orton wrote:
> > and then upload the preprocessed output "prefork.o" somewhere?  Possibly 
> > you're picking up an installed mpm.h which was generated for a different 
> > MPM, or something like that.
> 
> Actually, I have been hitting this myself recently with trunk.
> 
> I was picking up the an existing ap_listen.h.  This is a problem, since
> the Listen directive was changed from 1 arg to argv,
> 
> This happened since I was installing to the same prefix, and
> APR/APR-Util were also installed to this same prefix. We recently
> changed to using an installed APR/APR-Util by default, which means those
> directories now get added to the include path, and wham, it includes the
> installed ap_listen.h first.
> 
> Should just be some build hackery to make sure our include directory is
> always first.

A while back configure on the trunk was changed to add the `ap*-config 
--includes` output much later in the INCLUDES, which solved most cases 
like this.

Certainly that much looks OK for me here with separate APR/util builds; 
-I$(top_srcdir)/include is much earlier than the external include 
directories; so if you're seeing that specific problem it needs further 
investigation - what does your INCLUDES look like?

joe


Include Paths, was Re: error

Posted by Paul Querna <ch...@force-elite.com>.
Joe Orton wrote:
> On Mon, Jun 27, 2005 at 02:46:23PM -0400, Cliff Woolley wrote:
> 
>>On Mon, 27 Jun 2005, Gustavo A. Baratto wrote:
>>
>>
>>>prefork.c:103: error: syntax error before '*' token
>>>prefork.c:103: warning: data definition has no type or storage class
>>>gmake[4]: *** [prefork.lo] Error 1
>>>gmake[4]: Leaving directory
>>>`/home/admin2/src/httpd-2.0.54/server/mpm/prefork'
>>
>>
>>Hmm, I'm not really sure how this never came up before.
>>
>>prefork.c:103 says:
>>    static ap_pod_t *pod;
>>
>>struct ap_pod_t is defined in mpm_common.h but only if AP_MPM_USES_POD is
>>defined.  server/mpm/prefork/mpm.h does define this symbol.  But prefork.c
>>does not include mpm.h at all, whereas it would have to do so prior to
>>including mpm_common.h to pick up the definition of this data type.
> 
> 
> mpm_common.h does itself include mpm.h fortunately, otherwise the 
> ceiling would indeed have fallen in ;)
> 
> Gustova can you do:
> 
> cd server/mpm/prefork
> make CFLAGS=-E prefork.lo
> 
> and then upload the preprocessed output "prefork.o" somewhere?  Possibly 
> you're picking up an installed mpm.h which was generated for a different 
> MPM, or something like that.

Actually, I have been hitting this myself recently with trunk.

I was picking up the an existing ap_listen.h.  This is a problem, since
the Listen directive was changed from 1 arg to argv,

This happened since I was installing to the same prefix, and
APR/APR-Util were also installed to this same prefix. We recently
changed to using an installed APR/APR-Util by default, which means those
directories now get added to the include path, and wham, it includes the
installed ap_listen.h first.

Should just be some build hackery to make sure our include directory is
always first.

-Paul


Re: error

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 27 Jun 2005, Joe Orton wrote:

> mpm_common.h does itself include mpm.h fortunately, otherwise the
> ceiling would indeed have fallen in ;)

Naturally, the one place I didn't look.  :)  Yeah that explains the lack
of cave-ins.  ;)

Thanks Joe.

Re: error

Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jun 27, 2005 at 02:46:23PM -0400, Cliff Woolley wrote:
> On Mon, 27 Jun 2005, Gustavo A. Baratto wrote:
> 
> > prefork.c:103: error: syntax error before '*' token
> > prefork.c:103: warning: data definition has no type or storage class
> > gmake[4]: *** [prefork.lo] Error 1
> > gmake[4]: Leaving directory
> > `/home/admin2/src/httpd-2.0.54/server/mpm/prefork'
> 
> 
> Hmm, I'm not really sure how this never came up before.
> 
> prefork.c:103 says:
>     static ap_pod_t *pod;
> 
> struct ap_pod_t is defined in mpm_common.h but only if AP_MPM_USES_POD is
> defined.  server/mpm/prefork/mpm.h does define this symbol.  But prefork.c
> does not include mpm.h at all, whereas it would have to do so prior to
> including mpm_common.h to pick up the definition of this data type.

mpm_common.h does itself include mpm.h fortunately, otherwise the 
ceiling would indeed have fallen in ;)

Gustova can you do:

cd server/mpm/prefork
make CFLAGS=-E prefork.lo

and then upload the preprocessed output "prefork.o" somewhere?  Possibly 
you're picking up an installed mpm.h which was generated for a different 
MPM, or something like that.

joe

Re: error

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 27 Jun 2005, Gustavo A. Baratto wrote:

> prefork.c:103: error: syntax error before '*' token
> prefork.c:103: warning: data definition has no type or storage class
> gmake[4]: *** [prefork.lo] Error 1
> gmake[4]: Leaving directory
> `/home/admin2/src/httpd-2.0.54/server/mpm/prefork'


Hmm, I'm not really sure how this never came up before.

prefork.c:103 says:
    static ap_pod_t *pod;

struct ap_pod_t is defined in mpm_common.h but only if AP_MPM_USES_POD is
defined.  server/mpm/prefork/mpm.h does define this symbol.  But prefork.c
does not include mpm.h at all, whereas it would have to do so prior to
including mpm_common.h to pick up the definition of this data type.

Anybody have any clue how this compiles at all anywhere?