pigeonhole-0.5.16 compilation error?
Hello Dovecot folks ... In response to the recent announcement of Dovecot-2.3.16 and pigeonhole-0.5.16, we decided to update our installation (full disclosure: this is really an update from dovecot-1.2.x in progress; we're working on a development system where we already had dovecot-2.3.x installed and running). The update of dovecot itself (compiled from source), to version 2.3.16 was quite uneventful, and I can report that it's working. We're seeing some behaviour with indexing that will need attention, but I suspect that that's a matter of configuration, and is completely unrelated to what I'm reporting. More disclosure: we've never used nor compiled pigeonhole on our systems before. We've been using procmail for decades, but are now looking into potentially switching to sieve, and as I understand it, that means installing pigeonhole. I downloaded dovecot-2.3-pigeonhole-0.5.16 at the same time that I downloaded dovecot-2.3.16, a few days ago. My build-time configure and make for pigeonhole is relatively simple, but fails to build: ./configure --prefix=/local/pkg/pigeonhole-0.5.16/root \ --sbindir=/local/pkg/pigeonhole-0.5.16/root/bin \ --localstatedir=/var \ --mandir=/local/pkg/pigeonhole-0.5.16/root/man \ --with-dovecot=/local/pkg/dovecot-CURRENT/root/lib/dovecot make -j2 "/local/pkg/dovecot-CURRENT/root/lib/dovecot" is correct for us, if I understand the installation instructions correctly: -rw-r--r-- 1 root root 1324 Aug 3 14:03 /local/pkg/dovecot-CURRENT/root/lib/dovecot/dovecot-config The make fails, while compiling sieve-extprograms-common.c: sieve-extprograms-common.c: In function ‘sieve_extprogram_run’: sieve-extprograms-common.c:639:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_INTERNAL_FAILURE’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_INTERNAL_FAILURE: ^ sieve-extprograms-common.c:639:7: note: each undeclared identifier is reported only once for each function it appears in sieve-extprograms-common.c:641:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_FAILURE’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_FAILURE: ^ sieve-extprograms-common.c:643:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_SUCCESS’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_SUCCESS: ^ I decided to check against dovecot-2.3-pigeonhole-0.5.15, figuring that problems compiling that version likely would have been reported already, and sure enough I find the following difference in this file: --- ./dovecot-2.3-pigeonhole-0.5.15/src/plugins/sieve-extprograms/sieve-extprograms-common.c 2021-06-14 09:41:29.000000000 -0400 +++ ./dovecot-2.3-pigeonhole-0.5.16/src/plugins/sieve-extprograms/sieve-extprograms-common.c 2021-08-06 05:26:46.000000000 -0400 @@ -635,6 +635,14 @@ int sieve_extprogram_set_input_mail int sieve_extprogram_run(struct sieve_extprogram *sprog) { - return program_client_run(sprog->program_client); + switch (program_client_run(sprog->program_client)) { + case PROGRAM_CLIENT_EXIT_STATUS_INTERNAL_FAILURE: + return -1; + case PROGRAM_CLIENT_EXIT_STATUS_FAILURE: + return 0; + case PROGRAM_CLIENT_EXIT_STATUS_SUCCESS: + return 1; + } + i_unreached(); } ... and no mention of these PROGRAM_CLIENT_EXIT_STATUS_* constants anywhere else in the code, in either version. Have I stumbled onto an omission in the packaged sources, or is there some other package missing on my system, or is there perhaps even some other explanation for what I'm seeing? I've checked the mailing list archive and found no mention of anyone else having the same (or similar) problem, so I do think it's possible that I'm just missing something ... Thanks in advance for any insight folks might be able to give me ... -- ---------------------------------------------------------------------- Sylvain Robitaille syl@encs.concordia.ca Systems analyst / AITS Concordia University Faculty of Engineering and Computer Science Montreal, Quebec, Canada ----------------------------------------------------------------------
(following up to my own message ...)
On Tue, 10 Aug 2021, I wrote:
My build-time configure and make for pigeonhole is relatively simple, but fails to build:
./configure --prefix=/local/pkg/pigeonhole-0.5.16/root
--sbindir=/local/pkg/pigeonhole-0.5.16/root/bin
--localstatedir=/var
--mandir=/local/pkg/pigeonhole-0.5.16/root/man
--with-dovecot=/local/pkg/dovecot-CURRENT/root/lib/dovecot make -j2"/local/pkg/dovecot-CURRENT/root/lib/dovecot" is correct for us, if I understand the installation instructions correctly:
-rw-r--r-- 1 root root 1324 Aug 3 14:03 /local/pkg/dovecot-CURRENT/root/lib/dovecot/dovecot-config
The make fails, while compiling sieve-extprograms-common.c:
sieve-extprograms-common.c: In function ‘sieve_extprogram_run’: sieve-extprograms-common.c:639:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_INTERNAL_FAILURE’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_INTERNAL_FAILURE: ^ sieve-extprograms-common.c:639:7: note: each undeclared identifier is reported only once for each function it appears in sieve-extprograms-common.c:641:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_FAILURE’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_FAILURE: ^ sieve-extprograms-common.c:643:7: error: ‘PROGRAM_CLIENT_EXIT_STATUS_SUCCESS’ undeclared (first use in this function) case PROGRAM_CLIENT_EXIT_STATUS_SUCCESS: ^
Just after I sent that, a colleague found the string in /local/pkg/dovecot-2.3.16/root/include/dovecot/program-client.h; Ok, great, but that's why we want to point to dovecot-config, so this can be found ... except:
: lust[syl] ~; grep -w include /local/pkg/dovecot-CURRENT/root/lib/dovecot/dovecot-config
LIBDOVECOT_INCLUDE=-I/local/pkg/dovecot-2.3.15/root/include/dovecot
dovecot_pkgincludedir=/local/pkg/dovecot-2.3.15/root/include/dovecot
Well that explains the compilation error on pigeonhole. No I need only to figure out why dovecot-config is pointing to the old version ...
(for the record, I suspect my "dovecot-CURRENT" symlink wasn't correctly updated ... sorry for the noise ...)
--
Sylvain Robitaille syl@encs.concordia.ca
Systems analyst / AITS Concordia University Faculty of Engineering and Computer Science Montreal, Quebec, Canada
participants (1)
-
Sylvain Robitaille