grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
91 stars 19 forks source link

Cannot build with older dovecot #102

Closed slavkoja closed 2 years ago

slavkoja commented 2 years ago

I tried to build new version against dovecot from debian stable (2.3.13) and it fails with:

...
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -O2 -O2 -I/usr/include/dovecot -L/usr/lib/x86_64-linux-gnu -lxapian -licuio -licui18n -licuuc -licudata -Wl,-rpath= -g -O2 -ffile-prefix-map=/build/dovecot-fts-xapian-1.4.14=. -fstack-protector-strong -Wformat -Werror=format-security -MT fts-backend-xapian.lo -MD -MP -MF .deps/fts-backend-xapian.Tpo -c fts-backend-xapian.cpp  -fPIC -DPIC -o .libs/fts-backend-xapian.o
fts-xapian-plugin.c: In function 'fts_xapian_mail_user_created':
fts-xapian-plugin.c:98:6: error: too many arguments to function 'fts_mail_user_init'
   98 |  if (fts_mail_user_init(user, FALSE, &error) < 0) i_error("FTS Xapian: %s", error);
      |      ^~~~~~~~~~~~~~~~~~
In file included from fts-xapian-plugin.h:10,
                 from fts-xapian-plugin.c:4:
/usr/include/dovecot/fts-user.h:21:5: note: declared here
   21 | int fts_mail_user_init(struct mail_user *user, const char **error_r);
      |     ^~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:561: fts-xapian-plugin.lo] Error 1

Will this be caused by latest updates for 2.3.17?

grosjo commented 2 years ago

Looking for a preprocessor macron to compare VERSION_DOVECOT with 2.3.17. Any clue ?

slavkoja commented 2 years ago

I cannot help with C...

grosjo commented 2 years ago

This is not C, this is preprocessor

grosjo commented 2 years ago

Can you try with latest git (please redo autoreconf)

fezie commented 2 years ago

I also use Debian stable dovecot with fts-xapian from git And it seems to work now with your changes from 8b97b97