Package: extsmail Version: 1.4-1 Severity: wishlist Usertags: goto-cc Tags: patch
During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.
gcc -o extsmaild conf_parser.tab.o conf_tokenizer.o externals_parser.tab.o
externals_tokenizer.o extsmaild.o common.o
error: conflicting types for variable "yyelval"
old definition in module externals_parser.tab file externals_parser.tab.c line
1052
union YYSTYPE {
const char * str;
signed long int time;
struct _mat * match;
struct _ext * external;
struct _grp * group;
}
new definition in module externals_tokenizer file externals_parser.tab.h line 94
union YYSTYPE {
const char * str;
signed long int time;
struct _mat * match;
struct _ext * external;
struct _grp * group;
}
reason for conflict at nil.match.preg.buffer in types listed below
(struct/struct):
names of component 0 differ (buffer/__buffer)
struct re_pattern_buffer {
unsigned char * buffer;
unsigned long int allocated;
unsigned long int used;
unsigned long int syntax;
char * fastmap;
unsigned char * translate;
unsigned long int re_nsub;
unsigned int can_be_null;
unsigned int regs_allocated;
unsigned int fastmap_accurate;
unsigned int no_sub;
unsigned int not_bol;
unsigned int not_eol;
unsigned int newline_anchor;
unsigned __CPROVER_bitvector[56] $pad0;
}
struct re_pattern_buffer {
unsigned char * __buffer;
unsigned long int __allocated;
unsigned long int __used;
unsigned long int __syntax;
char * __fastmap;
unsigned char * __translate;
unsigned long int re_nsub;
unsigned int __can_be_null;
unsigned int __regs_allocated;
unsigned int __fastmap_accurate;
unsigned int __no_sub;
unsigned int __not_bol;
unsigned int __not_eol;
unsigned int __newline_anchor;
unsigned __CPROVER_bitvector[56] $pad0;
}
Makefile:23: recipe for target 'extsmaild' failed
make[1]: *** [extsmaild] Error 64
make[1]: Leaving directory
'/srv/jenkins-slave/workspace/sid-goto-cc-extsmail/extsmail-1.4'
dh_auto_build: make -j1 returned exit code 2
debian/rules:6: recipe for target 'build' failed
As the C standard mandates that type compatibility requires equal field names in
compound types, the above does violate the requirement despite the bit-level
equality of types. The problem here is really caused by flex, which #include's
several standard header files before getting to "Config.h". A workaround, which
may actually speed up compilation as a positive side effect, is implemented in
the attached patch.
Best,
Michael
--- extsmail-1.4.orig/externals_parser.y
+++ extsmail-1.4/externals_parser.y
@@ -50,9 +50,9 @@ Match *add_match(Match_Type, const char
%union {
const char *str;
time_t time;
- Match *match;
- External *external;
- Group *group;
+ struct _mat *match;
+ struct _ext *external;
+ struct _grp *group;
}
%token TGROUP
--- extsmail-1.4.orig/externals_tokenizer.l
+++ extsmail-1.4/externals_tokenizer.l
@@ -24,14 +24,12 @@
#include <err.h>
#include <errno.h>
-#include <regex.h>
#include <stdbool.h>
#include <string.h>
#include <time.h>
#include "conf.h"
#include "common.h"
-#include "externals.h"
#include "externals_parser.tab.h"
char *mk_str(char *);
pgpwumRihYEaa.pgp
Description: PGP signature

