Hi
Using latest git, I get 2 very weird errors
1 - Just launching dovecot, I get: Feb 15 14:04:05 gjserver dovecot[444199]: doveconf: Fatal: Error in configuration file /etc/mail/dovecot/dovecot.conf line 13: mail_location: Unknown setting: mail_location
My mail_location is
mail_location = mdbox:/data/mails/%d/%n
All was working fine at the time of release of 2.4
Not any more
2 - Trying to adjust my plugin (FTS Xapian) to latest git, I get :
make[2]: Entering directory '/files/src/fts-xapian/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1
-g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF
.deps/fts-xapian-plugin.Tpo -c -o fts-xapian-plugin.lo
fts-xapian-plugin.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -O2
-I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2
-std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF
.deps/fts-xapian-plugin.Tpo -c fts-xapian-plugin.c -fPIC -DPIC -o
.libs/fts-xapian-plugin.o
In file included from /usr/include/dovecot/lib.h:37,
from fts-xapian-plugin.h:7,
from fts-xapian-plugin.c:3:
/usr/include/dovecot/macros.h:173:21: error: size of unnamed array is
negative
173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE
: FALSE)
| ^
The first line of fts-xapian-plugin.h is
#include "lib.h" (nothing else before)
Your help welcome
Thank you so muich
Am 15.02.25 um 15:20 schrieb Joan Moreau via dovecot:
Hi
Using latest git, I get 2 very weird errors
1 - Just launching dovecot, I get: Feb 15 14:04:05 gjserver dovecot[444199]: doveconf: Fatal: Error in configuration file /etc/mail/dovecot/dovecot.conf line 13: mail_location: Unknown setting: mail_location
My mail_location is
mail_location = mdbox:/data/mails/%d/%n
All was working fine at the time of release of 2.4
Not any more
Yes, this should be
mail_driver = mdbox mail_path = /data/mails/%{user | domain }/%{user | username }
now, see https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html
Regards Bjoern
Hi
This is not clear
Is %d replaced by %domain or "user | domain" (??)
Is %u now the same as %n (shall not be !!! )
For instance:
toto@dodo -> %u = toto@dodo, %d = dodo, %n = toto, now, %domain = dodo and %user = toto or toto@dodo , $username = ???
On 2025-02-15 22:33, Bjoern Franke via dovecot wrote:
Am 15.02.25 um 15:20 schrieb Joan Moreau via dovecot:
Hi
Using latest git, I get 2 very weird errors
1 - Just launching dovecot, I get: Feb 15 14:04:05 gjserver dovecot[444199]: doveconf: Fatal: Error in configuration file /etc/mail/dovecot/dovecot.conf line 13: mail_location: Unknown setting: mail_location
My mail_location is
mail_location = mdbox:/data/mails/%d/%n
All was working fine at the time of release of 2.4
Not any more
Yes, this should be
mail_driver = mdbox mail_path = /data/mails/%{user | domain }/%{user | username }
now, see https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html
Regards Bjoern
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi Anyone to clarify that ?
On 15 February 2025 22:50:13 Joan Moreau <jom@grosjo.net> wrote:
Hi This is not clear Is %d replaced by %domain or "user | domain" (??) Is %u now the same as %n (shall not be !!! ) For instance: toto@dodo -> %u = toto@dodo, %d = dodo, %n = toto, now, %domain = dodo and %user = toto or toto@dodo , $username = ???
On 2025-02-15 22:33, Bjoern Franke via dovecot wrote:
Am 15.02.25 um 15:20 schrieb Joan Moreau via dovecot:
Hi
Using latest git, I get 2 very weird errors
1 - Just launching dovecot, I get: Feb 15 14:04:05 gjserver dovecot[444199]: doveconf: Fatal: Error in configuration file /etc/mail/dovecot/dovecot.conf line 13: mail_location: Unknown setting: mail_location
My mail_location is
mail_location = mdbox:/data/mails/%d/%n
All was working fine at the time of release of 2.4
Not any more
Yes, this should be
mail_driver = mdbox mail_path = /data/mails/%{user | domain }/%{user | username }
now, see https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html
Regards Bjoern
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
On 16. Feb 2025, at 1.26, Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Hi Anyone to clarify that ?
On 15 February 2025 22:50:13 Joan Moreau <jom@grosjo.net> wrote:
Hi This is not clear Is %d replaced by %domain or "user | domain" (??) Is %u now the same as %n (shall not be !!! ) For instance: toto@dodo -> %u = toto@dodo, %d = dodo, %n = toto, now, %domain = dodo and %user = toto or toto@dodo , $username =
I thought these are clearly enough listed in https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html ?
There is no %{domain} and there is no %{username}. There is only %{user} and filters |username and |domain to get the username or domain parts of the %{user}.
So bottom line, what is the variable to get the user if " there is no username/domain" ? Don't really understand your "filter" either . There is only one value (the only one of the user connected)
No, donc is extemely ambiguous and don't provide any exmaple, stating literally "use A or B" for field X . Ok, but A or B ?
On 2025-02-16 15:33, Timo Sirainen via dovecot wrote:
On 16. Feb 2025, at 1.26, Joan Moreau via dovecot <dovecot@dovecot.org> wrote: Hi Anyone to clarify that ?
On 15 February 2025 22:50:13 Joan Moreau <jom@grosjo.net> wrote: Hi This is not clear Is %d replaced by %domain or "user | domain" (??) Is %u now the same as %n (shall not be !!! ) For instance: toto@dodo -> %u = toto@dodo, %d = dodo, %n = toto, now, %domain = dodo and %user = toto or toto@dodo , $username =
I thought these are clearly enough listed in https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html ?
There is no %{domain} and there is no %{username}. There is only %{user} and filters |username and |domain to get the username or domain parts of the %{user}.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
For instance, it says:
%n
%{user | username }
ok, so the replacement is "user" or "username" ? Why not providing the right answer ?
On 2025-02-16 16:16, Joan Moreau wrote:
So bottom line, what is the variable to get the user if " there is no username/domain" ? Don't really understand your "filter" either . There is only one value (the only one of the user connected)
No, donc is extemely ambiguous and don't provide any exmaple, stating literally "use A or B" for field X . Ok, but A or B ?
On 2025-02-16 15:33, Timo Sirainen via dovecot wrote: On 16. Feb 2025, at 1.26, Joan Moreau via dovecot <dovecot@dovecot.org> wrote: Hi Anyone to clarify that ?
On 15 February 2025 22:50:13 Joan Moreau <jom@grosjo.net> wrote: Hi This is not clear Is %d replaced by %domain or "user | domain" (??) Is %u now the same as %n (shall not be !!! ) For instance: toto@dodo -> %u = toto@dodo, %d = dodo, %n = toto, now, %domain = dodo and %user = toto or toto@dodo , $username =
I thought these are clearly enough listed in https://doc.dovecot.org/2.4.0/installation/upgrade/2.3-to-2.4.html ?
There is no %{domain} and there is no %{username}. There is only %{user} and filters |username and |domain to get the username or domain parts of the %{user}.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
On 16. Feb 2025, at 10.18, Joan Moreau <jom@grosjo.net> wrote:
For instance, it says:
%n %{user | username } ok, so the replacement is "user" or "username" ? Why not providing the right answer ?
The replacement is literally %{user | username}. It doesn't mean "or". The | is the new filter syntax. https://doc.dovecot.org/2.4.0/core/settings/variables.html#variable-expansio...
so in practice, each 'new' variable is computed instead of just put such standard value in a variable ?
What is the root reason to have created such a complicated animal ?
On 2025-02-16 16:44, Timo Sirainen wrote:
On 16. Feb 2025, at 10.18, Joan Moreau <jom@grosjo.net> wrote:
For instance, it says:
%n %{user | username }
ok, so the replacement is "user" or "username" ? Why not providing the right answer ?
The replacement is literally %{user | username}. It doesn't mean "or". The | is the new filter syntax. https://doc.dovecot.org/2.4.0/core/settings/variables.html#variable-expansio...
On 15/02/2025 16:20 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Hi
Using latest git, I get 2 very weird errors
2 - Trying to adjust my plugin (FTS Xapian) to latest git, I get :
make[2]: Entering directory '/files/src/fts-xapian/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1
-g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c -o fts-xapian-plugin.lo fts-xapian-plugin.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c fts-xapian-plugin.c -fPIC -DPIC -o .libs/fts-xapian-plugin.o In file included from /usr/include/dovecot/lib.h:37, from fts-xapian-plugin.h:7, from fts-xapian-plugin.c:3: /usr/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^The first line of fts-xapian-plugin.h is
#include "lib.h" (nothing else before)
Your help welcome
Thank you so muich
I guess you fixed your xapian plugin also against main, instead of release-2.4.0. It probably needs some changes, if you did that.
This is what I get after doing autoreconf -vi and configure.
fts-xapian-plugin.c: In function 'fts_xapian_mail_user_deinit': fts-xapian-plugin.c:18:9: warning: implicit declaration of function 'fts_mail_user_deinit'; did you mean 'fts_mail_user_init'? [-Wimplicit-function-declaration] 18 | fts_mail_user_deinit(user); | ^~~~~~~~~~~~~~~~~~~~ | fts_mail_user_init fts-xapian-plugin.c: In function 'fts_xapian_mail_user_created': fts-xapian-plugin.c:36:28: warning: implicit declaration of function 'mail_user_plugin_getenv'; did you mean 'mail_user_is_plugin_loaded'? [-Wimplicit-function-declaration] 36 | const char * env = mail_user_plugin_getenv(user, "fts_xapian"); | ^~~~~~~~~~~~~~~~~~~~~~~ | mail_user_is_plugin_loaded fts-xapian-plugin.c:36:28: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] fts-xapian-plugin.c:95:38: warning: passing argument 2 of 'fts_mail_user_init' from incompatible pointer type [-Wincompatible-pointer-types] 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~ | | | const char ** In file included from fts-xapian-plugin.h:11, from fts-xapian-plugin.c:4: /home/cmouse/dovecot/include/dovecot/fts-user.h:10:62: note: expected 'struct event *' but argument is of type 'const char **' 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ~~~~~~~~~~~~~~^~~~~ fts-xapian-plugin.c:95:13: error: too few arguments to function 'fts_mail_user_init' 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/fts-user.h:10:5: note: declared here 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ^~~~~~~~~~~~~~~~~~ fts-xapian-plugin.h: At top level: fts-xapian-plugin.h:72:21: warning: 'chars_sep' defined but not used [-Wunused-variable] 72 | static const char * chars_sep[] = { "\"", "\r", "\n", "\t", ",", ":", ";", "(", ")", "?", "!", "¿", "¡", "\u00A0", "‘", "“" }; | ^~~~~~~~~ fts-xapian-plugin.h:69:21: warning: 'chars_pb' defined but not used [-Wunused-variable] 69 | static const char * chars_pb[] = { "<", ">", ".", "-", "@", "&", "%", "*", "|", "`", "#", "^", "\\", "'", "/", "~", "[", "]", "{", "}", "-" }; | ^~~~~~~~ fts-xapian-plugin.h:63:21: warning: 'suffixDict' defined but not used [-Wunused-variable] 63 | static const char * suffixDict = "_dict.db"; | ^~~~~~~~~~ fts-xapian-plugin.h:62:21: warning: 'searchDict2' defined but not used [-Wunused-variable] 62 | static const char * searchDict2 = " ORDER BY len LIMIT 100"; | ^~~~~~~~~~~ fts-xapian-plugin.h:61:21: warning: 'searchDict1' defined but not used [-Wunused-variable] 61 | static const char * searchDict1 = "SELECT keyword FROM dict WHERE keyword like '%"; | ^~~~~~~~~~~ fts-xapian-plugin.h:60:21: warning: 'flushTmpWords' defined but not used [-Wunused-variable] 60 | static const char * flushTmpWords = "BEGIN TRANSACTION; INSERT OR IGNORE INTO main.dict SELECT keyword, header, len FROM work.dict; DELETE FROM work.dict; COMMIT;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:59:21: warning: 'replaceTmpWord' defined but not used [-Wunused-variable] 59 | static const char * replaceTmpWord ="INSERT OR IGNORE INTO work.dict VALUES('"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:58:21: warning: 'createTmpTable' defined but not used [-Wunused-variable] 58 | static const char * createTmpTable = "ATTACH DATABASE ':memory:' AS work; CREATE TABLE work.dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header) ); CREATE INDEX IF NOT EXISTS work.dict_h ON dict(header)"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:57:21: warning: 'createDictIndexes' defined but not used [-Wunused-variable] 57 | static const char * createDictIndexes = "CREATE INDEX IF NOT EXISTS dict_len ON dict (len); CREATE INDEX IF NOT EXISTS dict_h ON dict(header); CREATE INDEX IF NOT EXISTS dict_t ON dict(keyword);"; | ^~~~~~~~~~~~~~~~~ fts-xapian-plugin.h:56:21: warning: 'createDictTable' defined but not used [-Wunused-variable] 56 | static const char * createDictTable = "CREATE TABLE IF NOT EXISTS dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header));"; | ^~~~~~~~~~~~~~~ fts-xapian-plugin.h:54:21: warning: 'suffixExp' defined but not used [-Wunused-variable] 54 | static const char * suffixExp = "_exp.db"; | ^~~~~~~~~ fts-xapian-plugin.h:53:21: warning: 'deleteExpUID' defined but not used [-Wunused-variable] 53 | static const char * deleteExpUID = "delete from expunges where ID=%d;"; | ^~~~~~~~~~~~ fts-xapian-plugin.h:52:21: warning: 'replaceExpUID' defined but not used [-Wunused-variable] 52 | static const char * replaceExpUID = "replace into expunges values (%d);"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:51:21: warning: 'selectExpUIDs' defined but not used [-Wunused-variable] 51 | static const char * selectExpUIDs = "select ID from expunges;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:50:21: warning: 'createExpTable' defined but not used [-Wunused-variable] 50 | static const char * createExpTable = "CREATE TABLE IF NOT EXISTS expunges(ID INTEGER PRIMARY KEY NOT NULL);"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:47:21: warning: 'hdrs_query' defined but not used [-Wunused-variable] 47 | static const char * hdrs_query[HDRS_NB] = { "a", "b", "c", "d", "d", "e", "f", "g", "h", "i", "h" }; | ^~~~~~~~~~ fts-xapian-plugin.h:46:21: warning: 'hdrs_xapian' defined but not used [-Wunused-variable] 46 | static const char * hdrs_xapian[HDRS_NB] = { "Q", "S", "A", "XTO", "XCC", "XBCC", "XMID", "XLIST", "XBDY", "XCT", "XBDY" }; | ^~~~~~~~~~~ fts-xapian-plugin.h:45:21: warning: 'hdrs_emails' defined but not used [-Wunused-variable] 45 | static const char * hdrs_emails[HDRS_NB] = { "uid", "subject", "from", "to", "cc", "bcc", "messageid", "listid", "body", "contenttype", "" }; | ^~~~~~~~~~~ make[2]: *** [Makefile:572: fts-xapian-plugin.lo] Error 1 make[2]: Leaving directory '/home/cmouse/projects/fts-xapian/src' make[1]: *** [Makefile:504: all-recursive] Error 1 make[1]: Leaving directory '/home/cmouse/projects/fts-xapian' make: *** [Makefile:426: all] Error 2
Aki
I fixed all that but the error I get is the one I wrote
On 2025-02-15 22:39, Aki Tuomi via dovecot wrote:
On 15/02/2025 16:20 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Hi
Using latest git, I get 2 very weird errors
2 - Trying to adjust my plugin (FTS Xapian) to latest git, I get :
make[2]: Entering directory '/files/src/fts-xapian/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c -o fts-xapian-plugin.lo fts-xapian-plugin.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c fts-xapian-plugin.c -fPIC -DPIC -o .libs/fts-xapian-plugin.o In file included from /usr/include/dovecot/lib.h:37, from fts-xapian-plugin.h:7, from fts-xapian-plugin.c:3: /usr/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^
The first line of fts-xapian-plugin.h is
#include "lib.h" (nothing else before)
Your help welcome
Thank you so muich
I guess you fixed your xapian plugin also against main, instead of release-2.4.0. It probably needs some changes, if you did that.
This is what I get after doing autoreconf -vi and configure.
fts-xapian-plugin.c: In function 'fts_xapian_mail_user_deinit': fts-xapian-plugin.c:18:9: warning: implicit declaration of function 'fts_mail_user_deinit'; did you mean 'fts_mail_user_init'? [-Wimplicit-function-declaration] 18 | fts_mail_user_deinit(user); | ^~~~~~~~~~~~~~~~~~~~ | fts_mail_user_init fts-xapian-plugin.c: In function 'fts_xapian_mail_user_created': fts-xapian-plugin.c:36:28: warning: implicit declaration of function 'mail_user_plugin_getenv'; did you mean 'mail_user_is_plugin_loaded'? [-Wimplicit-function-declaration] 36 | const char * env = mail_user_plugin_getenv(user, "fts_xapian"); | ^~~~~~~~~~~~~~~~~~~~~~~ | mail_user_is_plugin_loaded fts-xapian-plugin.c:36:28: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] fts-xapian-plugin.c:95:38: warning: passing argument 2 of 'fts_mail_user_init' from incompatible pointer type [-Wincompatible-pointer-types] 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~ | | | const char ** In file included from fts-xapian-plugin.h:11, from fts-xapian-plugin.c:4: /home/cmouse/dovecot/include/dovecot/fts-user.h:10:62: note: expected 'struct event *' but argument is of type 'const char **' 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ~~~~~~~~~~~~~~^~~~~ fts-xapian-plugin.c:95:13: error: too few arguments to function 'fts_mail_user_init' 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/fts-user.h:10:5: note: declared here 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ^~~~~~~~~~~~~~~~~~ fts-xapian-plugin.h: At top level: fts-xapian-plugin.h:72:21: warning: 'chars_sep' defined but not used [-Wunused-variable] 72 | static const char * chars_sep[] = { "\"", "\r", "\n", "\t", ",", ":", ";", "(", ")", "?", "!", "¿", "¡", "\u00A0", "'", """ }; | ^~~~~~~~~ fts-xapian-plugin.h:69:21: warning: 'chars_pb' defined but not used [-Wunused-variable] 69 | static const char * chars_pb[] = { "<", ">", ".", "-", "@", "&", "%", "*", "|", "`", "#", "^", "\\", "'", "/", "~", "[", "]", "{", "}", "-" }; | ^~~~~~~~ fts-xapian-plugin.h:63:21: warning: 'suffixDict' defined but not used [-Wunused-variable] 63 | static const char * suffixDict = "_dict.db"; | ^~~~~~~~~~ fts-xapian-plugin.h:62:21: warning: 'searchDict2' defined but not used [-Wunused-variable] 62 | static const char * searchDict2 = " ORDER BY len LIMIT 100"; | ^~~~~~~~~~~ fts-xapian-plugin.h:61:21: warning: 'searchDict1' defined but not used [-Wunused-variable] 61 | static const char * searchDict1 = "SELECT keyword FROM dict WHERE keyword like '%"; | ^~~~~~~~~~~ fts-xapian-plugin.h:60:21: warning: 'flushTmpWords' defined but not used [-Wunused-variable] 60 | static const char * flushTmpWords = "BEGIN TRANSACTION; INSERT OR IGNORE INTO main.dict SELECT keyword, header, len FROM work.dict; DELETE FROM work.dict; COMMIT;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:59:21: warning: 'replaceTmpWord' defined but not used [-Wunused-variable] 59 | static const char * replaceTmpWord ="INSERT OR IGNORE INTO work.dict VALUES('"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:58:21: warning: 'createTmpTable' defined but not used [-Wunused-variable] 58 | static const char * createTmpTable = "ATTACH DATABASE ':memory:' AS work; CREATE TABLE work.dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header) ); CREATE INDEX IF NOT EXISTS work.dict_h ON dict(header)"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:57:21: warning: 'createDictIndexes' defined but not used [-Wunused-variable] 57 | static const char * createDictIndexes = "CREATE INDEX IF NOT EXISTS dict_len ON dict (len); CREATE INDEX IF NOT EXISTS dict_h ON dict(header); CREATE INDEX IF NOT EXISTS dict_t ON dict(keyword);"; | ^~~~~~~~~~~~~~~~~ fts-xapian-plugin.h:56:21: warning: 'createDictTable' defined but not used [-Wunused-variable] 56 | static const char * createDictTable = "CREATE TABLE IF NOT EXISTS dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header));"; | ^~~~~~~~~~~~~~~ fts-xapian-plugin.h:54:21: warning: 'suffixExp' defined but not used [-Wunused-variable] 54 | static const char * suffixExp = "_exp.db"; | ^~~~~~~~~ fts-xapian-plugin.h:53:21: warning: 'deleteExpUID' defined but not used [-Wunused-variable] 53 | static const char * deleteExpUID = "delete from expunges where ID=%d;"; | ^~~~~~~~~~~~ fts-xapian-plugin.h:52:21: warning: 'replaceExpUID' defined but not used [-Wunused-variable] 52 | static const char * replaceExpUID = "replace into expunges values (%d);"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:51:21: warning: 'selectExpUIDs' defined but not used [-Wunused-variable] 51 | static const char * selectExpUIDs = "select ID from expunges;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:50:21: warning: 'createExpTable' defined but not used [-Wunused-variable] 50 | static const char * createExpTable = "CREATE TABLE IF NOT EXISTS expunges(ID INTEGER PRIMARY KEY NOT NULL);"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:47:21: warning: 'hdrs_query' defined but not used [-Wunused-variable] 47 | static const char * hdrs_query[HDRS_NB] = { "a", "b",
"c", "d", "d", "e", "f", "g", "h", "i", "h" }; | ^~~~~~~~~~ fts-xapian-plugin.h:46:21: warning: 'hdrs_xapian' defined but not used [-Wunused-variable] 46 | static const char * hdrs_xapian[HDRS_NB] = { "Q", "S",
"A", "XTO", "XCC", "XBCC", "XMID", "XLIST", "XBDY", "XCT", "XBDY" }; | ^~~~~~~~~~~ fts-xapian-plugin.h:45:21: warning: 'hdrs_emails' defined but not used [-Wunused-variable] 45 | static const char * hdrs_emails[HDRS_NB] = { "uid", "subject", "from", "to", "cc", "bcc", "messageid", "listid", "body", "contenttype", "" }; | ^~~~~~~~~~~ make[2]: *** [Makefile:572: fts-xapian-plugin.lo] Error 1 make[2]: Leaving directory '/home/cmouse/projects/fts-xapian/src' make[1]: *** [Makefile:504: all-recursive] Error 1 make[1]: Leaving directory '/home/cmouse/projects/fts-xapian' make: *** [Makefile:426: all] Error 2Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Do you have the code somewhere pushed?
Aki
On 15/02/2025 16:44 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
I fixed all that but the error I get is the one I wrote
On 2025-02-15 22:39, Aki Tuomi via dovecot wrote:
On 15/02/2025 16:20 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Hi
Using latest git, I get 2 very weird errors
2 - Trying to adjust my plugin (FTS Xapian) to latest git, I get :
make[2]: Entering directory '/files/src/fts-xapian/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c -o fts-xapian-plugin.lo fts-xapian-plugin.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c fts-xapian-plugin.c -fPIC -DPIC -o .libs/fts-xapian-plugin.o In file included from /usr/include/dovecot/lib.h:37, from fts-xapian-plugin.h:7, from fts-xapian-plugin.c:3: /usr/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^
The first line of fts-xapian-plugin.h is
#include "lib.h" (nothing else before)
Your help welcome
Thank you so muich
I guess you fixed your xapian plugin also against main, instead of release-2.4.0. It probably needs some changes, if you did that.
This is what I get after doing autoreconf -vi and configure.
fts-xapian-plugin.c: In function 'fts_xapian_mail_user_deinit': fts-xapian-plugin.c:18:9: warning: implicit declaration of function 'fts_mail_user_deinit'; did you mean 'fts_mail_user_init'? [-Wimplicit-function-declaration] 18 | fts_mail_user_deinit(user); | ^~~~~~~~~~~~~~~~~~~~ | fts_mail_user_init fts-xapian-plugin.c: In function 'fts_xapian_mail_user_created': fts-xapian-plugin.c:36:28: warning: implicit declaration of function 'mail_user_plugin_getenv'; did you mean 'mail_user_is_plugin_loaded'? [-Wimplicit-function-declaration] 36 | const char * env = mail_user_plugin_getenv(user, "fts_xapian"); | ^~~~~~~~~~~~~~~~~~~~~~~ | mail_user_is_plugin_loaded fts-xapian-plugin.c:36:28: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] fts-xapian-plugin.c:95:38: warning: passing argument 2 of 'fts_mail_user_init' from incompatible pointer type [-Wincompatible-pointer-types] 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~ | | | const char ** In file included from fts-xapian-plugin.h:11, from fts-xapian-plugin.c:4: /home/cmouse/dovecot/include/dovecot/fts-user.h:10:62: note: expected 'struct event *' but argument is of type 'const char **' 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ~~~~~~~~~~~~~~^~~~~ fts-xapian-plugin.c:95:13: error: too few arguments to function 'fts_mail_user_init' 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/fts-user.h:10:5: note: declared here 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ^~~~~~~~~~~~~~~~~~ fts-xapian-plugin.h: At top level: fts-xapian-plugin.h:72:21: warning: 'chars_sep' defined but not used [-Wunused-variable] 72 | static const char * chars_sep[] = { "\"", "\r", "\n", "\t", ",", ":", ";", "(", ")", "?", "!", "¿", "¡", "\u00A0", "'", """ }; | ^~~~~~~~~ fts-xapian-plugin.h:69:21: warning: 'chars_pb' defined but not used [-Wunused-variable] 69 | static const char * chars_pb[] = { "<", ">", ".", "-", "@", "&", "%", "*", "|", "`", "#", "^", "\\", "'", "/", "~", "[", "]", "{", "}", "-" }; | ^~~~~~~~ fts-xapian-plugin.h:63:21: warning: 'suffixDict' defined but not used [-Wunused-variable] 63 | static const char * suffixDict = "_dict.db"; | ^~~~~~~~~~ fts-xapian-plugin.h:62:21: warning: 'searchDict2' defined but not used [-Wunused-variable] 62 | static const char * searchDict2 = " ORDER BY len LIMIT 100"; | ^~~~~~~~~~~ fts-xapian-plugin.h:61:21: warning: 'searchDict1' defined but not used [-Wunused-variable] 61 | static const char * searchDict1 = "SELECT keyword FROM dict WHERE keyword like '%"; | ^~~~~~~~~~~ fts-xapian-plugin.h:60:21: warning: 'flushTmpWords' defined but not used [-Wunused-variable] 60 | static const char * flushTmpWords = "BEGIN TRANSACTION; INSERT OR IGNORE INTO main.dict SELECT keyword, header, len FROM work.dict; DELETE FROM work.dict; COMMIT;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:59:21: warning: 'replaceTmpWord' defined but not used [-Wunused-variable] 59 | static const char * replaceTmpWord ="INSERT OR IGNORE INTO work.dict VALUES('"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:58:21: warning: 'createTmpTable' defined but not used [-Wunused-variable] 58 | static const char * createTmpTable = "ATTACH DATABASE ':memory:' AS work; CREATE TABLE work.dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header) ); CREATE INDEX IF NOT EXISTS work.dict_h ON dict(header)"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:57:21: warning: 'createDictIndexes' defined but not used [-Wunused-variable] 57 | static const char * createDictIndexes = "CREATE INDEX IF NOT EXISTS dict_len ON dict (len); CREATE INDEX IF NOT EXISTS dict_h ON dict(header); CREATE INDEX IF NOT EXISTS dict_t ON dict(keyword);"; | ^~~~~~~~~~~~~~~~~ fts-xapian-plugin.h:56:21: warning: 'createDictTable' defined but not used [-Wunused-variable] 56 | static const char * createDictTable = "CREATE TABLE IF NOT EXISTS dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header));"; | ^~~~~~~~~~~~~~~ fts-xapian-plugin.h:54:21: warning: 'suffixExp' defined but not used [-Wunused-variable] 54 | static const char * suffixExp = "_exp.db"; | ^~~~~~~~~ fts-xapian-plugin.h:53:21: warning: 'deleteExpUID' defined but not used [-Wunused-variable] 53 | static const char * deleteExpUID = "delete from expunges where ID=%d;"; | ^~~~~~~~~~~~ fts-xapian-plugin.h:52:21: warning: 'replaceExpUID' defined but not used [-Wunused-variable] 52 | static const char * replaceExpUID = "replace into expunges values (%d);"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:51:21: warning: 'selectExpUIDs' defined but not used [-Wunused-variable] 51 | static const char * selectExpUIDs = "select ID from expunges;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:50:21: warning: 'createExpTable' defined but not used [-Wunused-variable] 50 | static const char * createExpTable = "CREATE TABLE IF NOT EXISTS expunges(ID INTEGER PRIMARY KEY NOT NULL);"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:47:21: warning: 'hdrs_query' defined but not used [-Wunused-variable] 47 | static const char * hdrs_query[HDRS_NB] = { "a", "b",
"c", "d", "d", "e", "f", "g", "h", "i", "h" }; | ^~~~~~~~~~ fts-xapian-plugin.h:46:21: warning: 'hdrs_xapian' defined but not used [-Wunused-variable] 46 | static const char * hdrs_xapian[HDRS_NB] = { "Q", "S",
"A", "XTO", "XCC", "XBCC", "XMID", "XLIST", "XBDY", "XCT", "XBDY" }; | ^~~~~~~~~~~ fts-xapian-plugin.h:45:21: warning: 'hdrs_emails' defined but not used [-Wunused-variable] 45 | static const char * hdrs_emails[HDRS_NB] = { "uid", "subject", "from", "to", "cc", "bcc", "messageid", "listid", "body", "contenttype", "" }; | ^~~~~~~~~~~ make[2]: *** [Makefile:572: fts-xapian-plugin.lo] Error 1 make[2]: Leaving directory '/home/cmouse/projects/fts-xapian/src' make[1]: *** [Makefile:504: all-recursive] Error 1 make[1]: Leaving directory '/home/cmouse/projects/fts-xapian' make: *** [Makefile:426: all] Error 2Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki
On 15/02/2025 16:44 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
I fixed all that but the error I get is the one I wrote
On 2025-02-15 22:39, Aki Tuomi via dovecot wrote:
On 15/02/2025 16:20 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Hi
Using latest git, I get 2 very weird errors
2 - Trying to adjust my plugin (FTS Xapian) to latest git, I get :
make[2]: Entering directory '/files/src/fts-xapian/src' /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c -o fts-xapian-plugin.lo fts-xapian-plugin.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -O2 -I/usr/include/dovecot -DFTS_MAIL_USER_INIT_FOUR_ARGS=1 -g -O2 -std=gnu99 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -O2 -MT fts-xapian-plugin.lo -MD -MP -MF .deps/fts-xapian-plugin.Tpo -c fts-xapian-plugin.c -fPIC -DPIC -o .libs/fts-xapian-plugin.o In file included from /usr/include/dovecot/lib.h:37, from fts-xapian-plugin.h:7, from fts-xapian-plugin.c:3: /usr/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^
The first line of fts-xapian-plugin.h is
#include "lib.h" (nothing else before)
Your help welcome
Thank you so muich I guess you fixed your xapian plugin also against main, instead of release-2.4.0. It probably needs some changes, if you did that.
This is what I get after doing autoreconf -vi and configure.
fts-xapian-plugin.c: In function 'fts_xapian_mail_user_deinit': fts-xapian-plugin.c:18:9: warning: implicit declaration of function 'fts_mail_user_deinit'; did you mean 'fts_mail_user_init'? [-Wimplicit-function-declaration] 18 | fts_mail_user_deinit(user); | ^~~~~~~~~~~~~~~~~~~~ | fts_mail_user_init fts-xapian-plugin.c: In function 'fts_xapian_mail_user_created': fts-xapian-plugin.c:36:28: warning: implicit declaration of function 'mail_user_plugin_getenv'; did you mean 'mail_user_is_plugin_loaded'? [-Wimplicit-function-declaration] 36 | const char * env = mail_user_plugin_getenv(user, "fts_xapian"); | ^~~~~~~~~~~~~~~~~~~~~~~ | mail_user_is_plugin_loaded fts-xapian-plugin.c:36:28: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] fts-xapian-plugin.c:95:38: warning: passing argument 2 of 'fts_mail_user_init' from incompatible pointer type [-Wincompatible-pointer-types] 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~ | | | const char ** In file included from fts-xapian-plugin.h:11, from fts-xapian-plugin.c:4: /home/cmouse/dovecot/include/dovecot/fts-user.h:10:62: note: expected 'struct event *' but argument is of type 'const char **' 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ~~~~~~~~~~~~~~^~~~~ fts-xapian-plugin.c:95:13: error: too few arguments to function 'fts_mail_user_init' 95 | if (fts_mail_user_init(user, &error) < 0) | ^~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/fts-user.h:10:5: note: declared here 10 | int fts_mail_user_init(struct mail_user *user, struct event *event, | ^~~~~~~~~~~~~~~~~~ fts-xapian-plugin.h: At top level: fts-xapian-plugin.h:72:21: warning: 'chars_sep' defined but not used [-Wunused-variable] 72 | static const char * chars_sep[] = { "\"", "\r", "\n", "\t", ",", ":", ";", "(", ")", "?", "!", "¿", "¡", "\u00A0", "'", """ }; | ^~~~~~~~~ fts-xapian-plugin.h:69:21: warning: 'chars_pb' defined but not used [-Wunused-variable] 69 | static const char * chars_pb[] = { "<", ">", ".", "-", "@", "&", "%", "*", "|", "`", "#", "^", "\\", "'", "/", "~", "[", "]", "{", "}", "-" }; | ^~~~~~~~ fts-xapian-plugin.h:63:21: warning: 'suffixDict' defined but not used [-Wunused-variable] 63 | static const char * suffixDict = "_dict.db"; | ^~~~~~~~~~ fts-xapian-plugin.h:62:21: warning: 'searchDict2' defined but not used [-Wunused-variable] 62 | static const char * searchDict2 = " ORDER BY len LIMIT 100"; | ^~~~~~~~~~~ fts-xapian-plugin.h:61:21: warning: 'searchDict1' defined but not used [-Wunused-variable] 61 | static const char * searchDict1 = "SELECT keyword FROM dict WHERE keyword like '%"; | ^~~~~~~~~~~ fts-xapian-plugin.h:60:21: warning: 'flushTmpWords' defined but not used [-Wunused-variable] 60 | static const char * flushTmpWords = "BEGIN TRANSACTION; INSERT OR IGNORE INTO main.dict SELECT keyword, header, len FROM work.dict; DELETE FROM work.dict; COMMIT;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:59:21: warning: 'replaceTmpWord' defined but not used [-Wunused-variable] 59 | static const char * replaceTmpWord ="INSERT OR IGNORE INTO work.dict VALUES('"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:58:21: warning: 'createTmpTable' defined but not used [-Wunused-variable] 58 | static const char * createTmpTable = "ATTACH DATABASE ':memory:' AS work; CREATE TABLE work.dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header) ); CREATE INDEX IF NOT EXISTS work.dict_h ON dict(header)"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:57:21: warning: 'createDictIndexes' defined but not used [-Wunused-variable] 57 | static const char * createDictIndexes = "CREATE INDEX IF NOT EXISTS dict_len ON dict (len); CREATE INDEX IF NOT EXISTS dict_h ON dict(header); CREATE INDEX IF NOT EXISTS dict_t ON dict(keyword);"; | ^~~~~~~~~~~~~~~~~ fts-xapian-plugin.h:56:21: warning: 'createDictTable' defined but not used [-Wunused-variable] 56 | static const char * createDictTable = "CREATE TABLE IF NOT EXISTS dict (keyword TEXT COLLATE NOCASE, header INTEGER, len INTEGER, UNIQUE(keyword,header));"; | ^~~~~~~~~~~~~~~ fts-xapian-plugin.h:54:21: warning: 'suffixExp' defined but not used [-Wunused-variable] 54 | static const char * suffixExp = "_exp.db"; | ^~~~~~~~~ fts-xapian-plugin.h:53:21: warning: 'deleteExpUID' defined but not used [-Wunused-variable] 53 | static const char * deleteExpUID = "delete from expunges where ID=%d;"; | ^~~~~~~~~~~~ fts-xapian-plugin.h:52:21: warning: 'replaceExpUID' defined but not used [-Wunused-variable] 52 | static const char * replaceExpUID = "replace into expunges values (%d);"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:51:21: warning: 'selectExpUIDs' defined but not used [-Wunused-variable] 51 | static const char * selectExpUIDs = "select ID from expunges;"; | ^~~~~~~~~~~~~ fts-xapian-plugin.h:50:21: warning: 'createExpTable' defined but not used [-Wunused-variable] 50 | static const char * createExpTable = "CREATE TABLE IF NOT EXISTS expunges(ID INTEGER PRIMARY KEY NOT NULL);"; | ^~~~~~~~~~~~~~ fts-xapian-plugin.h:47:21: warning: 'hdrs_query' defined but not used [-Wunused-variable] 47 | static const char * hdrs_query[HDRS_NB] = { "a", "b", "c", "d", "d", "e", "f", "g", "h", "i", "h" }; | ^~~~~~~~~~ fts-xapian-plugin.h:46:21: warning: 'hdrs_xapian' defined but not used [-Wunused-variable] 46 | static const char * hdrs_xapian[HDRS_NB] = { "Q", "S", "A", "XTO", "XCC", "XBCC", "XMID", "XLIST", "XBDY", "XCT", "XBDY" }; | ^~~~~~~~~~~ fts-xapian-plugin.h:45:21: warning: 'hdrs_emails' defined but not used [-Wunused-variable] 45 | static const char * hdrs_emails[HDRS_NB] = { "uid", "subject", "from", "to", "cc", "bcc", "messageid", "listid", "body", "contenttype", "" }; | ^~~~~~~~~~~ make[2]: *** [Makefile:572: fts-xapian-plugin.lo] Error 1 make[2]: Leaving directory '/home/cmouse/projects/fts-xapian/src' make[1]: *** [Makefile:504: all-recursive] Error 1 make[1]: Leaving directory '/home/cmouse/projects/fts-xapian' make: *** [Makefile:426: all] Error 2
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative
173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE)
| ^
/home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE'
182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~
/home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE'
80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE'
90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT'
31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings)
| ^~~~~~~~~~~~~~~~~~~~~~
fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF'
37 | DEF(UINT, verbose),
is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki
Not sure I understand
verbose is an int
On 2025-02-15 23:05, Aki Tuomi wrote:
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^ /home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE' 182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE' 80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE' 90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT' 31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings) | ^~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF' 37 | DEF(UINT, verbose),is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki
Yes, well, UINT means unsigned int.
Aki
On 15/02/2025 17:10 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Not sure I understand
verbose is an int
On 2025-02-15 23:05, Aki Tuomi wrote:
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^ /home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE' 182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE' 80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE' 90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT' 31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings) | ^~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF' 37 | DEF(UINT, verbose),is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
ouch...
Why this complexity to change all the org and now, to redefine the standard C/C++ formats ?
On 2025-02-15 23:21, Aki Tuomi wrote:
Yes, well, UINT means unsigned int.
Aki
On 15/02/2025 17:10 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Not sure I understand
verbose is an int
On 2025-02-15 23:05, Aki Tuomi wrote:
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^ /home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE' 182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE' 80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE' 90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT' 31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings) | ^~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF' 37 | DEF(UINT, verbose),is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Now, I get
In file included from fts-xapian-plugin.h:22, from fts-xapian-plugin.c:3: /usr/include/dovecot/settings.h:14:6: error: redeclaration of 'enum setting_type' 14 | enum setting_type { | ^~~~~~~~~~~~ In file included from fts-xapian-plugin.h:21: /usr/include/dovecot/settings-parser.h:20:6: note: originally defined here 20 | enum setting_type {
There are actually 3 similar files
settings.h
fts-settings.h
settings-parser.h
Which one is the right one ?
Thank you
On 2025-02-15 23:22, Joan Moreau wrote:
ouch...
Why this complexity to change all the org and now, to redefine the standard C/C++ formats ?
On 2025-02-15 23:21, Aki Tuomi wrote: Yes, well, UINT means unsigned int.
Aki
On 15/02/2025 17:10 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Not sure I understand
verbose is an int
On 2025-02-15 23:05, Aki Tuomi wrote:
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^ /home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE' 182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE' 80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE' 90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT' 31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings) | ^~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF' 37 | DEF(UINT, verbose),is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
I think your Dovecot install must be somehow broken, I only have enum setting_type {
in one file.
$ grep "enum setting_type {" /dovecot/include/dovecot/* /dovecot/include/dovecot/settings-parser.h:enum setting_type {
Aki
On 15/02/2025 17:25 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Now, I get
In file included from fts-xapian-plugin.h:22, from fts-xapian-plugin.c:3: /usr/include/dovecot/settings.h:14:6: error: redeclaration of 'enum setting_type' 14 | enum setting_type { | ^~~~~~~~~~~~ In file included from fts-xapian-plugin.h:21: /usr/include/dovecot/settings-parser.h:20:6: note: originally defined here 20 | enum setting_type {
There are actually 3 similar files
settings.h
fts-settings.h
settings-parser.h
Which one is the right one ?
Thank you
On 2025-02-15 23:22, Joan Moreau wrote:
ouch...
Why this complexity to change all the org and now, to redefine the standard C/C++ formats ?
On 2025-02-15 23:21, Aki Tuomi wrote: Yes, well, UINT means unsigned int.
Aki
On 15/02/2025 17:10 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Not sure I understand
verbose is an int
On 2025-02-15 23:05, Aki Tuomi wrote:
/home/cmouse/dovecot/include/dovecot/macros.h:173:21: error: size of unnamed array is negative 173 | (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) > 0 ? FALSE : FALSE) | ^ /home/cmouse/dovecot/include/dovecot/macros.h:182:9: note: in expansion of macro 'COMPILE_ERROR_IF_TRUE' 182 | COMPILE_ERROR_IF_TRUE(
| ^~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:80:34: note: in expansion of macro 'COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE' 80 | { .type = (_enum_type) + COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/cmouse/dovecot/include/dovecot/settings-parser.h:90:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_TYPE' 90 | SETTING_DEFINE_STRUCT_TYPE(SET_UINT, 0, unsigned int, key, name, struct_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:31:9: note: in expansion of macro 'SETTING_DEFINE_STRUCT_UINT' 31 | SETTING_DEFINE_STRUCT_##type("fts_xapian_"#name, name, struct fts_xapian_settings) | ^~~~~~~~~~~~~~~~~~~~~~ fts-xapian-plugin.c:37:9: note: in expansion of macro 'DEF' 37 | DEF(UINT, verbose),is the root cause, verbose is not compatible with SET_UINT.
Aki
On 15/02/2025 16:55 EET Joan Moreau via dovecot <dovecot@dovecot.org> wrote:
Yes
https://github.com/grosjo/fts-xapian/commit/e183253be394cad07f17885600d9a652...
On 2025-02-15 22:47, Aki Tuomi wrote:
Do you have the code somewhere pushed?
Aki _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (4)
-
Aki Tuomi
-
Bjoern Franke
-
Joan Moreau
-
Timo Sirainen