Bug 264447 - mail/cyrus-imapd34 compilation error for managesieve.c with lang/perl5.36 installed
Summary: mail/cyrus-imapd34 compilation error for managesieve.c with lang/perl5.36 ins...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-04 09:40 UTC by Henri Hennebert
Modified: 2022-06-07 11:41 UTC (History)
2 users (show)

See Also:


Attachments
Add correction from uptream (1.03 KB, patch)
2022-06-06 18:18 UTC, Henri Hennebert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Hennebert 2022-06-04 09:40:18 UTC
Here is the output:

gmake[4]: Entering directory '/usr/ports/mail/cyrus-imapd34/work-basic/cyrus-imapd-3.4.3/perl/sieve/managesieve'
Makefile:364: warning: ignoring prerequisites on suffix rule definition
Makefile:364: warning: ignoring prerequisites on suffix rule definition
cp managesieve.pm blib/lib/Cyrus/SIEVE/managesieve.pm
Running Mkbootstrap for managesieve ()
chmod 644 "managesieve.bs"
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- managesieve.bs blib/arch/auto/Cyrus/SIEVE/managesieve/managesieve.bs 644
"/usr/local/bin/perl" "/usr/local/lib/perl5/5.36/ExtUtils/xsubpp"  -typemap '/usr/local/lib/perl5/5.36/ExtUtils/typemap' -typemap '/usr/ports/mail/cyrus-imapd34/work-basic/cyrus-imapd-3.4.3/perl/sieve/managesieve/typemap'  managesieve.xs > managesieve.xsc && mv managesieve.xsc managesieve.c
cc -c  -I../../../lib -I../../../perl/sieve -I../../../perl/sieve/lib -I/usr/local/include -I/usr/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.36/mach/CORE"  -DPERL_POLLUTE managesieve.c
In file included from managesieve.xs:46:
In file included from /usr/local/lib/perl5/5.36/mach/CORE/perl.h:7243:
/usr/local/lib/perl5/5.36/mach/CORE/sv_inline.h:468:13: error: expected ')'
            Zero(new_body, type_details->body_size, char);
            ^
/usr/local/lib/perl5/5.36/mach/CORE/handy.h:2792:22: note: expanded from macro 'Zero'
#define Zero(d,n,t)     (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
                         ^
/usr/local/lib/perl5/5.36/mach/CORE/handy.h:2680:49: note: expanded from macro 'MEM_WRAP_CHECK_'
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
                                                ^
/usr/local/lib/perl5/5.36/mach/CORE/sv_inline.h:468:13: note: to match this '('
/usr/local/lib/perl5/5.36/mach/CORE/handy.h:2792:21: note: expanded from macro 'Zero'
#define Zero(d,n,t)     (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
                        ^
1 error generated.

What I find:

/usr/local/lib/perl5/5.36/mach/CORE/perl.h include assert.h which is found in ../../../lib and used in /usr/local/lib/perl5/5.36/mach/CORE/sv_inline.h

If I rename ../../../lib/assert.h to ../../../lib/Assert.h compilation is OK.

If I add -I/usr/include in front of -I../../../lib it don't work :-O I'm lost here...

there is a conflict between the cyrus-imap assert.h and the system assert.h but I can't find a solution.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-06-05 14:31:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fa4386ac7a44bd35f81df851903cc66e6b86c616

commit fa4386ac7a44bd35f81df851903cc66e6b86c616
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2022-06-05 14:28:28 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2022-06-05 14:30:18 +0000

    mail/cyrus-imapd34: Mark IGNORE when build with Perl 5.36

    PR:             264447

 mail/cyrus-imapd34/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 2 Hajimu UMEMOTO freebsd_committer freebsd_triage 2022-06-05 14:34:37 UTC
Thank you for letting me know it.
I've committed to mark IGNORE when build with Perl 5.36.
I'll fix it when this problem was fixed in uptream.
Comment 3 Henri Hennebert 2022-06-06 18:18:49 UTC
Created attachment 234494 [details]
Add correction from uptream

Update files/patch-lib_assert.h
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-06-07 11:41:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=de9d336f38c82081c69bcb1487a253d432509368

commit de9d336f38c82081c69bcb1487a253d432509368
Author:     Hajimu UMEMOTO <ume@FreeBSD.org>
AuthorDate: 2022-06-07 11:33:38 +0000
Commit:     Hajimu UMEMOTO <ume@FreeBSD.org>
CommitDate: 2022-06-07 11:40:54 +0000

    mail/cyrus-imapd34: Fix build with perl 5.36.

    PR:             264447
    Obtained from:  https://github.com/omniosorg/omnios-extra/pull/1120

 mail/cyrus-imapd34/Makefile                                |  8 +-------
 .../files/{patch-lib_assert.h => patch-lib__assert.h}      | 14 +++++++++-----
 2 files changed, 10 insertions(+), 12 deletions(-)