You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Dan Mahoney (Gushi)" <da...@prime.gushi.org> on 2023/02/10 05:10:32 UTC

warnings with sa-compile?

Hey there all.

We're only using two real rulesets: core and kam.cf

Our nightly sa-update/sa-compile run is throwing warnings like the 
following.  So, these are only warnings, and the compile continues, but 
they're making my cron jobs noisy.

The questions:

1) Are these known issues.

2) Is it worth filing a bug?

OS is FreeBSD 12.4, and I think these are using the on-box c compiler 
(clang), not gcc.

-Dan

cc -c    -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=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC 
"-I/usr/local/lib/perl5/5.32/mach/CORE"   body_0.c
In file included from body_0.xs:2:
In file included from /usr/local/lib/perl5/5.32/mach/CORE/perl.h:3921:
In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv.h:663:
In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv_func.h:35:
In file included from /usr/local/lib/perl5/5.32/mach/CORE/sbox32_hash.h:4:
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: '(' 
and '{' tokens introducing statement expression appear in different macro 
expansion contexts [-Wcompound-token-split-by-macro]
    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:38: note: expanded 
from macro 'ZAPHOD32_SCRAMBLE32'
#define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                     ^~~~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/perl.h:666:29: note: expanded from 
macro 'STMT_START'
#   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
                              ^
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: '{' token 
is here
    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:49: note: expanded 
from macro 'ZAPHOD32_SCRAMBLE32'
#define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                                ^
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: '}' 
and ')' tokens terminating statement expression appear in different macro 
expansion contexts [-Wcompound-token-split-by-macro]
    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:87:41: note: expanded 
from macro 'ZAPHOD32_SCRAMBLE32'
    v ^= (v>>23);                       \
                                        ^
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: ')' token 
is here
    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:88:3: note: expanded 
from macro 'ZAPHOD32_SCRAMBLE32'
} STMT_END
  ^~~~~~~~
/usr/local/lib/perl5/5.32/mach/CORE/perl.h:667:21: note: expanded from 
macro 'STMT_END'
#   define STMT_END     )
                        ^



-- 

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------


Re: [sa-list] [External] warnings with sa-compile?

Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2023-02-11 at 09:31:53 UTC-0500 (Sat, 11 Feb 2023 06:31:53 -0800 
(PST))
Dan Mahoney (Gushi) <da...@prime.gushi.org>
is rumored to have said:

> On Fri, 10 Feb 2023, Kevin A. McGrail wrote:
>
>> Does this still occur after a change I made yesterday?  I had a 
>> regex that some versions of perl handle and others didn't.
>
> Still ongoing as of a few minutes ago.  If you want full output, let 
> me know.
>
> If there's a way to force sa-compile to use gcc or something, that 
> would also be useful to know.

Not sure if this is a purely historical point, but for a long while it 
was necessary to compile any compiled addons to Perl with the same 
compiler that built the main Perl executable. I'm not sure how operative 
that is with modern Perl on modern OSs, but it has caused substantial 
angst in the MacPorts community fairly recently because prebuilt 
binaries and the most common user toolchains on some platforms weren't 
consistent.

My point being: if you manage to get sa-compile to use gcc instead of 
clang and not generate those weird warnings, you need to be sure that 
what you get out of it actually works with your Perl.

Or, particularly with 4.0, you could skip precompiling the rules 
altogether. I don't believe that it still provides enough performance 
savings to be worth doing on a modern system without memory pressure.

-- 
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Re: [sa-list] Re: [External] warnings with sa-compile?

Posted by "Dan Mahoney (Gushi)" <da...@prime.gushi.org>.
On Fri, 10 Feb 2023, Kevin A. McGrail wrote:

> Does this still occur after a change I made yesterday?  I had a regex that 
> some versions of perl handle and others didn't.

Still ongoing as of a few minutes ago.  If you want full output, let me 
know.

If there's a way to force sa-compile to use gcc or something, that would 
also be useful to know.

-Dan

-- 

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------

Re: [External] warnings with sa-compile?

Posted by "Kevin A. McGrail" <km...@apache.org>.
Does this still occur after a change I made yesterday?  I had a regex 
that some versions of perl handle and others didn't.

Regards,

KAM

On 2/10/2023 12:10 AM, Dan Mahoney (Gushi) wrote:
> RAPTOR REMARK: Alert! Please be careful! This email is from an 
> EXTERNAL sender. Be aware of impersonation and credential theft.
>
> Hey there all.
>
> We're only using two real rulesets: core and kam.cf
>
> Our nightly sa-update/sa-compile run is throwing warnings like the 
> following.  So, these are only warnings, and the compile continues, 
> but they're making my cron jobs noisy.
>
> The questions:
>
> 1) Are these known issues.
>
> 2) Is it worth filing a bug?
>
> OS is FreeBSD 12.4, and I think these are using the on-box c compiler 
> (clang), not gcc.
>
> -Dan
>
> cc -c    -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=\"1.0\" 
> -DXS_VERSION=\"1.0\" -DPIC -fPIC 
> "-I/usr/local/lib/perl5/5.32/mach/CORE"   body_0.c
> In file included from body_0.xs:2:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/perl.h:3921:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv.h:663:
> In file included from /usr/local/lib/perl5/5.32/mach/CORE/hv_func.h:35:
> In file included from 
> /usr/local/lib/perl5/5.32/mach/CORE/sbox32_hash.h:4:
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: 
> '(' and '{' tokens introducing statement expression appear in 
> different macro expansion contexts [-Wcompound-token-split-by-macro]
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:38: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
>                                     ^~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/perl.h:666:29: note: expanded from 
> macro 'STMT_START'
> #   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
>                              ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: '{' 
> token is here
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:80:49: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
>                                                ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: warning: 
> '}' and ')' tokens terminating statement expression appear in 
> different macro expansion contexts [-Wcompound-token-split-by-macro]
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:87:41: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
>    v ^= (v>>23);                       \
>                                        ^
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:150:5: note: ')' 
> token is here
>    ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/zaphod32_hash.h:88:3: note: 
> expanded from macro 'ZAPHOD32_SCRAMBLE32'
> } STMT_END
>  ^~~~~~~~
> /usr/local/lib/perl5/5.32/mach/CORE/perl.h:667:21: note: expanded from 
> macro 'STMT_END'
> #   define STMT_END     )
>                        ^
>
>
>
-- 
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: warnings with sa-compile?

Posted by Matt Anton via users <us...@spamassassin.apache.org>.
On 10 Feb 2023, at 13:28, Matt Anton via users wrote:

> According to a thread on FreeBSD’s forums[1] and perl GitHub’s own 
> tracker[2], perl is currently not friendly with clang-11 and above 
> which was introduced on ≥12.2 and ≥13.1.

Err, I meant "not friendly with clang-13"...

-- 
matt [at] lv223.org
GPG key ID: 7D91A8CA

Re: warnings with sa-compile?

Posted by Matt Anton via users <us...@spamassassin.apache.org>.
On 10 Feb 2023, at 6:10, Dan Mahoney (Gushi) wrote:

> Hey there all.

Hello Dan,

> We're only using two real rulesets: core and kam.cf
>
> Our nightly sa-update/sa-compile run is throwing warnings like the following.  So, these are only warnings, and the compile continues, but they're making my cron jobs noisy.
>
> The questions:
>
> 1) Are these known issues.

We’re currently having here the same warnings too on 12.4 and 13.1 boxes.

According to a thread on FreeBSD’s forums[1] and perl GitHub’s own tracker[2], perl is currently not friendly with clang-11 and above which was introduced on ≥12.2 and ≥13.1.

> 2) Is it worth filing a bug?

Not worth it imho as these are currently warnings and should be fixed upstream on the perl side.

> OS is FreeBSD 12.4, and I think these are using the on-box c compiler (clang), not gcc.

Yep. No warnings are generated on clang ≤11.x (you also get those when building/upgrading perl5).


Cheers,

[1] <https://forums.freebsd.org/threads/sa-compile-throws-multiple-warnings.87500/>
[2] <https://github.com/Perl/perl5/issues/18780>


-- 
matt [at] lv223.org
GPG key ID: 7D91A8CA

Re: warnings with sa-compile?

Posted by Andrea Venturoli <ml...@netfence.it>.
On 2/10/23 06:10, Dan Mahoney (Gushi) wrote:
> Hey there all.

Hello.

> 1) Are these known issues.

Not sure, but I have the same problem.

> 2) Is it worth filing a bug?

I guess so, but I'm not sure if this is something worth reporting here; 
maybe to FreeBSD.
I've been wanting to look into this, but, alas, time is always too scarce :(

  bye
	av.

Re: warnings with sa-compile?

Posted by Benny Pedersen <me...@junc.eu>.
Dan Mahoney (Gushi) skrev den 2023-02-10 06:10:

> 2) Is it worth filing a bug?

in spamassassin terms its more likely just that it miss to depricate 
5.32 perl version, in gentoo we have perl 5.36 now without any issues

please if its just that filling a bug in spamassassassin and on freebsd 
ports to upgrade perl

> OS is FreeBSD 12.4, and I think these are using the on-box c compiler
> (clang), not gcc.

i can maybe still install freebsd from 2 1440 kb floppy disk ? :)

had 4.9 when i did this