Redhat 5 compilation errors in xmem_error.c
Nick Simicich
njs at scifi.squawk.com
Thu Dec 5 03:18:39 CET 2002
I figured it was time for one more swing at bogofilter. I downloaded the
recent version of Berkeley db, patched it up, and compiled it without
problems. I have no intentions of installing it for any other packages
than bogofilter on this system, so I simply did a configure, built the
objects, and then did a "make libdb.a" to build the library.
Back to bogofilter, you folks anticipated this, it seems, as you allow me
to specify
./configure --with-db=/root/bogofilter/db-4.1.24/build_unix/
And sure enough, it configured.
Make died almost immediately, as the
#ifdef NEVER
/*@noreturn@*/
#ifdef __GNUC__
__attribute__ ((noreturn))
#endif
#endif
stuff is not recognized. (The #ifdef NEVER stuff is added by me, since it
seemed that my version of __GNUC__ has no idea what you are talking
about.) I have no idea how much optimization an __attribute__ ((noreturn))
actually gives you given that this can't be communicated, I don't
think. If this is an important optimization, it might be better inlined.
Anyway, with that one change, the make completed.
make check fails, as follows:
gcc -DHAVE_CONFIG_H -I. -I.
-I.. -I/root/bogofilter/db-4.1.24/build_unix/ -g
-O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wshadow
-Wbad-function-
cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return
-Wmissing-decla
rations -Wnested-externs -ggdb -fno-common -Wchar-subscripts -Wcomment
-Wformat=
2 -Wimplicit -Wreturn-type -Wpointer-arith -c `test -f 'dumbhead.c' || echo
'./'
`dumbhead.c
dumbhead.c:25: parse error before `static'
dumbhead.c:27: parse error before `1'
dumbhead.c:27: warning: function declaration isn't a prototype
dumbhead.c:27: conflicting types for `exit'
/usr/include/stdlib.h:388: previous declaration of `exit'
dumbhead.c:27: warning: data definition has no type or storage class
dumbhead.c: In function `main':
dumbhead.c:47: warning: implicit declaration of function `die'
dumbhead.c:53: warning: control reaches end of non-void function
make[3]: *** [dumbhead.o] Error 1
make[3]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make: *** [check-recursive] Error 1
[root at scifi bogofilter-0.9.1]#
Same problem. Same fix. Try the make check again, and it gets to here:
make[3]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make check-TESTS
make[3]: Entering directory `/root/bogofilter/bogofilter-0.9.1/tests'
./t.score1: syntax error near unexpected token `then'
FAIL: t.score1
./t.score2: syntax error near unexpected token `then'
FAIL: t.score2
./t.integrity: syntax error near unexpected token `then'
FAIL: t.integrity
./t.integrity2: syntax error near unexpected token `then'
FAIL: t.integrity2
./t.lock1: syntax error near unexpected token `then'
FAIL: t.lock1
./t.ignore_spam_header: syntax error near unexpected token `then'
FAIL: t.ignore_spam_header
./t.nullstatsprefix: syntax error near unexpected token `then'
FAIL: t.nullstatsprefix
./t.lexer: syntax error near unexpected token `then'
FAIL: t.lexer
./t.systest: syntax error near unexpected token `then'
FAIL: t.systest
./t.grftest: syntax error near unexpected token `then'
FAIL: t.grftest
=====================
10 of 10 tests failed
=====================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/root/bogofilter/bogofilter-0.9.1/tests'
make: *** [check-recursive] Error 1
[root at scifi bogofilter-0.9.1]#
Now, I frankly have no idea what exactly is failing there. I think it is
the makefile. Running the tests from the command line seems to work:
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.score1
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.score2
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.integrity
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.integrity2
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.lock1
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.ignore_spam_header
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.nullstatsprefix
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.lexer
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.systest
[root at scifi tests]# SUPPRESS_DELETE="no" ./t.grftest
[root at scifi tests]#
I looked in the leftover directories. Stuff *seemed* normal.
[root at scifi bogofilter-0.9.1]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
[root at scifi bogofilter-0.9.1]#
I think what is needed is an ifdef other than simply __GCC__
--
If you doubt that magnet therapy works, I put to you this observation: When
refrigerators were first invented, in the 1940s, they were rather
unreliable, but then they became significantly more reliable. The basic
design of the refrigerator did not change, and we all know that quality was
important back then, so I doubt that newer refrigerators are made better.
Refrigerators have become more reliable because of the rise of the
refrigerator magnet.
Nick Simicich - njs at scifi.squawk.com
More information about the Bogofilter
mailing list