problem building 0.15.7

Dave Lovelace dave at firstcomp.biz
Mon Dec 8 22:40:53 CET 2003


David Relson wrote:
> 
> Dave,
> 
> Good work!  Every compiler and operating system has preprocessor symbols
> that are unique to it.  Assuming __DGUX__ is such a symbol, try adding
> the following before the typedef:
> 
> #ifdef __DGUX__
> #undef EX_OK
> #endif
> 
> 
> Let me know what the unique symbol is, and we'll add something to
> system.h
> 
__DGUX__ is correct.

To try to move ahead, I did in fact try the hack I mentioned (changing
all occurrences of EX_OK to something else).  That compile is still
running (slow machine, by current standards), but I've seen one other
thing to ask about:
----snip----snip----snip----snip----snip----snip----snip----snip----
        source='lexer_v3.c' object='lexer_v3.o' libtool=no \
        depfile='.deps/lexer_v3.Po' tmpdepfile='.deps/lexer_v3.TPo' \
        depmode=gcc /bin/ksh ../depcomp \
        gcc -DHAVE_CONFIG_H -I. -I. -I.  -I../trio -I..   -I/usr/local/BerkeleyD
B.4.1/include  -DBOGOFILTER -g -O2  -Wall -W -Wstrict-prototypes -Wmissing-proto
types -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wag
gregate-return -Wmissing-declarations -Wnested-externs -ggdb -fno-common -Wchar-
subscripts -Wcomment -Wimplicit -Wreturn-type -c `test -f 'lexer_v3.c' || echo '
./'`lexer_v3.c
lexer_v3.c: In function `lexer_v3_lex':
lexer_v3.c:28161: warning: int format, long int arg (arg 3)
lexer_v3.c: At top level:
lexer_v3.c:29266: warning: `yy_flex_realloc' defined but not used
----snip----snip----snip----snip----snip----snip----snip----snip----

Are the lexer warnings anything I need to worry about?  I freely admit
that they may have been there when I built the older version; I wouldn't
even have seen them in all the stuff that scrolls by, except that I
happened to look at the screen when they were there.

Hmm.  Scanning my scrollback buffer for "warn" is turning up an awful lot
of warnings.  Here are the ones I see, so far:

----snip----snip----snip----snip----snip----snip----snip----snip----
charset.c: In function `init_charset_table':
charset.c:371: warning: implicit declaration of function `strcasecmp'
----snip----snip----snip----snip----snip----snip----snip----snip----
error.c: In function `print_error':
error.c:47: warning: passing arg 2 of `syslog' discards `const' from pointer target type
----snip----snip----snip----snip----snip----snip----snip----snip----
mime.c: In function `mime_disposition':
mime.c:448: warning: implicit declaration of function `strcasecmp'
mime.c: In function `mime_type':
mime.c:519: warning: implicit declaration of function `strncasecmp'
----snip----snip----snip----snip----snip----snip----snip----snip----
passthrough.c: In function `write_message':
passthrough.c:173: warning: implicit declaration of function `strncasecmp'
passthrough.c: In function `write_log_message':
passthrough.c:243: warning: passing arg 2 of `syslog' discards `const' from pointer target type
passthrough.c:245: warning: passing arg 2 of `syslog' discards `const' from pointer target type
passthrough.c:247: warning: passing arg 2 of `syslog' discards `const' from pointer target type
----snip----snip----snip----snip----snip----snip----snip----snip----
token.c: In function `add_hint':
token.c:311: warning: statement with no effect
----snip----snip----snip----snip----snip----snip----snip----snip----
transaction.c:53: warning: declaration of `write' shadows global declaration
transaction.c: In function `ta_flush':
transaction.c:54: warning: declaration of `write' shadows global declaration
----snip----snip----snip----snip----snip----snip----snip----snip----
uudecode.c: In function `uudecode':
uudecode.c:32: warning: implicit declaration of function `strncasecmp'
----snip----snip----snip----snip----snip----snip----snip----snip----
memdebug.c: In function `mh_disp':
memdebug.c:71: warning: int format, long int arg (arg 3)
----snip----snip----snip----snip----snip----snip----snip----snip----
datastore_db.c: In function `db_get_dbvalue':
datastore_db.c:345: warning: int format, long int arg (arg 5)
datastore_db.c:345: warning: int format, long int arg (arg 6)
datastore_db.c:358: warning: field width is not type int (arg 3)
datastore_db.c:363: warning: field width is not type int (arg 4)
datastore_db.c: In function `db_set_dbvalue':
datastore_db.c:396: warning: field width is not type int (arg 4)
----snip----snip----snip----snip----snip----snip----snip----snip----
In file included from ../gsl/cdf/gamma.c:137:
../gsl/cdf/../specfunc/gamma.c:1033: warning: cast does not match function type
../gsl/cdf/../specfunc/gamma.c: In function `gsl_sf_gamma_e':
../gsl/cdf/../specfunc/gamma.c:1256: warning: cast does not match function type
----snip----snip----snip----snip----snip----snip----snip----snip----
../gsl/specfunc/gamma_inc.c: In function `gamma_inc_Q_asymp_unif':
../gsl/specfunc/gamma_inc.c:152: warning: declaration of `erfc' shadows global declaration
----snip----snip----snip----snip----snip----snip----snip----snip----
../gsl/specfunc/exp.c: In function `gsl_sf_exp_e10_e':
../gsl/specfunc/exp.c:133: warning: cast does not match function type
../gsl/specfunc/exp.c: In function `gsl_sf_exp_mult_e10_e':
../gsl/specfunc/exp.c:216: warning: cast does not match function type
../gsl/specfunc/exp.c: In function `gsl_sf_exp_mult_err_e10_e':
../gsl/specfunc/exp.c:313: warning: cast does not match function type
../gsl/specfunc/exp.c: In function `gsl_sf_exp_err_e10_e':
../gsl/specfunc/exp.c:568: warning: cast does not match function type
----snip----snip----snip----snip----snip----snip----snip----snip----
main.c: In function `main':
main.c:50: warning: passing arg 1 of `openlog' discards `const' from pointer target type
----snip----snip----snip----snip----snip----snip----snip----snip----

My plan was to remove my hack (does "make clean" work?), put in what you suggested, & remake, tomorrow.  But while I was compiling all the warnings, it
died a horrible death.  Here is the output:

----snip----snip----snip----snip----snip----snip----snip----snip----
        gcc -DBOGOFILTER -g -O2  -Wall -W -Wstrict-prototypes -Wmissing-prototyp
es -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggre
gate-return -Wmissing-declarations -Wnested-externs -ggdb -fno-common -Wchar-sub
scripts -Wcomment -Wimplicit -Wreturn-type  -L/usr/local/BerkeleyDB.4.1/lib  -o
bogofilter  bogofilter.o main.o  method.o graham.o robinson.o  fisher.o libbogof
ilter.a  strlcpy.o strlcat.o libbf_gsl.a -lm  -ldb
Undefined                       first referenced
 symbol                             in file
.L_E882                             libbf_gsl.a(libbf_gsl_a-gamma_inc.o)
.L_E883                             libbf_gsl.a(libbf_gsl_a-gamma_inc.o)
.L_E865                             libbf_gsl.a(libbf_gsl_a-zeta.o)
.L_E866                             libbf_gsl.a(libbf_gsl_a-zeta.o)
.L_E664                             libbf_gsl.a(libbf_gsl_a-gamma.o)
.L_E852                             libbf_gsl.a(libbf_gsl_a-erfc.o)
.L_E853                             libbf_gsl.a(libbf_gsl_a-erfc.o)
.L_E466                             libbf_gsl.a(libbf_gsl_a-trig.o)
.L_E467                             libbf_gsl.a(libbf_gsl_a-trig.o)
.L_E458                             libbf_gsl.a(libbf_gsl_a-exp.o)
.L_E459                             libbf_gsl.a(libbf_gsl_a-exp.o)
.L_E690                             libbf_gsl.a(libbf_gsl_a-gamma.o)
.L_E691                             libbf_gsl.a(libbf_gsl_a-gamma.o)
.L_E340                             libbf_gsl.a(libbf_gsl_a-gamma_inc.o)
.L_E359                             libbf_gsl.a(libbf_gsl_a-gamma_inc.o)
.L_E793                             libbf_gsl.a(libbf_gsl_a-erfc.o)
.L_E806                             libbf_gsl.a(libbf_gsl_a-zeta.o)
.L_E823                             libbf_gsl.a(libbf_gsl_a-gamma_inc.o)
.L_E432                             libbf_gsl.a(libbf_gsl_a-exp.o)
.L_E435                             libbf_gsl.a(libbf_gsl_a-trig.o)
ld: bogofilter: fatal error: Symbol referencing errors. No output written to bog
ofilter
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
----snip----snip----snip----snip----snip----snip----snip----snip----

I understand what a symbol referencing error is, but have no idea what's
behind these.  I hope you will.

Thanks.  <SIGH>
-- 
- Dave Lovelace
  dave at firstcomp.biz
  davel at cyberspace.org




More information about the Bogofilter mailing list