Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

config.h included twice

config.h included twice

2013-08-11 by Jim Klimov

I found some build noise in the milter-greylist compilation like this:

gcc -L/lib -L/usr/lib -L/usr/local/ssl/lib -L/usr/local/lib 
-L/usr/sfw/lib -L/opt/sfw/lib -I. -I..  -Wall -I/usr/local/ssl/include 
-I/usr/local/include -DUSE_LDAP -DLDAP_DEPRECATED 
-I/home/jim/BuildNew/milter-greylist-buildzone/__installroot_i386_build-sol10-x86_8.13.8+Sun//opt/COSmail/include 
-DUSE_FD_POOL -DUSE_P0F -DHAVE_P0F3 -DHAVE_P0F306 
-I'/home/jim/BuildNew/milter-greylist-buildzone/p0f-3.06b' 
-DP0F_QUERY_FROM_P0F_DIST -DUSE_DNSRBL -DUSE_MX 
-DCONFFILE=\"/etc/mail/greylist.conf\" 
-DDUMPFILE=\"/var/milter-greylist/greylist.db\" -D_BSD_SOURCE -I.. -I. 
   -c -o conf_yacc.o conf_yacc.c
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:5:1: warning: "BUILD_ENV" redefined
In file included from ../conf_yacc.y:24:
config.h:5:1: warning: this is the location of the previous definition
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:187:1: warning: "PACKAGE_STRING" redefined
In file included from ../conf_yacc.y:24:
config.h:187:1: warning: this is the location of the previous definition
In file included from ../conf.h:35,
                  from ../conf_yacc.y:41:
../config.h:196:1: warning: "PACKAGE_VERSION" redefined
In file included from ../conf_yacc.y:24:
config.h:196:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:5:1: warning: "BUILD_ENV" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:5:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:187:1: warning: "PACKAGE_STRING" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:187:1: warning: this is the location of the previous definition
In file included from ../conf_lex.l:179,
                  from ../conf_yacc.y:1948:
config.h:196:1: warning: "PACKAGE_VERSION" redefined
In file included from ../p0f.h:35,
                  from ../conf_yacc.y:64:
../config.h:196:1: warning: this is the location of the previous definition


I see that config.h is generated from config.h.in by configure, and
the template may be generated from configure(.ac?) by autoconf suite.

I also see that conf.h does have "ifdef" protection against double
inclusion, and includes config.h - which does not have this protection.

Finally, I see that conf_yacc.c includes both of these - leading to
double-processing of define's:

$ grep include conf_yacc.c | grep conf
#include "config.h"
#include "conf.h"
#include "conf_lex.c"


P0f.c as well:

$ grep include p0f.c | grep conf
#include "config.h"
#include "conf.h"


I think something outta be fixed, even if only for cosmetic aesthetics ;)

//Jim Klimov

Re: [milter-greylist] config.h included twice

2013-08-11 by Jim Klimov

On 2013-08-11 16:24, Jim Klimov wrote:
> I found some build noise in the milter-greylist compilation like this:

Hmmm... maybe false alarm; at least if you can't reproduce - no
need to bother then. My build routine keeps the original code
separate from the generated files, including config.h, and when
I was applying my patches to a vanilla tarball - I forgot to
remove the stock config.h, which gave me a number of mismatches
and errors (it overrode the generated one). Removing it is a
step I do, and forgot to do, and now I don't have these warnings.
Even though the file is still, apparently, included twice... :\

//Jim

Re: [milter-greylist] config.h included twice - PATCH

2013-08-13 by Jim Klimov

On 2013-08-11 19:03, Jim Klimov wrote:
> On 2013-08-11 16:24, Jim Klimov wrote:
>  > I found some build noise in the milter-greylist compilation like this:
>
> Hmmm... maybe false alarm; at least if you can't reproduce - no
> need to bother then. My build routine keeps the original code
> separate from the generated files, including config.h, and when
> I was applying my patches to a vanilla tarball - I forgot to
> remove the stock config.h, which gave me a number of mismatches
> and errors (it overrode the generated one). Removing it is a
> step I do, and forgot to do, and now I don't have these warnings.

The trivial patch to avoid this conflict is inline below (make
the current directory a higher priority for headers than the
source directory), tested to help on that build system which
did have a problem otherwise.


> Even though the file is still, apparently, included twice... :\

This I did not take care of, so you may want to look into this still...




diff -Naur milter-greylist-4.4.3-orig/Makefile.in 
milter-greylist-4.4.3-jimbuild/Makefile.in
--- milter-greylist-4.4.3-orig/Makefile.in      2013-01-19 
20:01:15.000000000 +0400
+++ milter-greylist-4.4.3-jimbuild/Makefile.in  2013-07-20 
00:07:43.000000000 +0400
@@ -29,7 +29,7 @@
  # OF THE POSSIBILITY OF SUCH DAMAGE.
  #

-CFLAGS=        @CFLAGS@ -D_BSD_SOURCE -I${SRCDIR} -I. @CPPFLAGS@
+CFLAGS=        @CFLAGS@ -D_BSD_SOURCE -I. -I${SRCDIR} @CPPFLAGS@
  LDFLAGS=       @LDFLAGS@
  LIBS=          @LIBS@
  prefix=                @prefix@



HTH,
//Jim

Re: [milter-greylist] config.h included twice - PATCH

2013-08-13 by Jim Klimov

On 2013-08-13 12:36, Jim Klimov wrote:
> The trivial patch to avoid this conflict is inline below (make
> the current directory a higher priority for headers than the
> source directory), tested to help on that build system which
> did have a problem otherwise.

PS: All this said, I am more comfortable and certain with just
removing the stock config.h file from the source directory as
part of my build procedure... ;)
Show quoted textHide quoted text
> diff -Naur milter-greylist-4.4.3-orig/Makefile.in
> milter-greylist-4.4.3-jimbuild/Makefile.in
> --- milter-greylist-4.4.3-orig/Makefile.in 2013-01-19
> 20:01:15.000000000 +0400
> +++ milter-greylist-4.4.3-jimbuild/Makefile.in 2013-07-20
> 00:07:43.000000000 +0400
> @@ -29,7 +29,7 @@
> # OF THE POSSIBILITY OF SUCH DAMAGE.
> #
>
> -CFLAGS= @CFLAGS@ -D_BSD_SOURCE -I${SRCDIR} -I. @CPPFLAGS@
> +CFLAGS= @CFLAGS@ -D_BSD_SOURCE -I. -I${SRCDIR} @CPPFLAGS@
> LDFLAGS= @LDFLAGS@
> LIBS= @LIBS@
> prefix= @prefix@
>
> HTH,

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.