Mailing List Archive

0.101.5 (and .4), make check and gcc 9
Hello.

"make check" fails with multiple errors when I use gcc 9. Is ClamAV
adapted to build by gcc 9?

For example:

In file included from check_clamav.c:11:
check_clamav.c: In function 'test_cl_free_fn':
check_clamav.c:43:12: error: storage class specified for parameter 'test_cl_dup_fn'
43 | START_TEST(test_cl_dup)
| ^~~~~~~~~~~

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: 0.101.5 (and .4), make check and gcc 9 [ In reply to ]
On Monday 25 November 2019, Sergey wrote:

> "make check" fails with multiple errors when I use gcc 9. Is ClamAV
> adapted to build by gcc 9?
>
> For example:
>
> In file included from check_clamav.c:11:
> check_clamav.c: In function 'test_cl_free_fn':
> check_clamav.c:43:12: error: storage class specified for parameter 'test_cl_dup_fn'
> ? ?43 | START_TEST(test_cl_dup)
> ? ? ? | ? ? ? ? ? ?^~~~~~~~~~~

This is not a problem with gcc9. This is caused by replacing libcheck
from 0.12.0 to 0.13.0.

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: 0.101.5 (and .4), make check and gcc 9 [ In reply to ]
Hi Sergey,

Thanks for investigating. I believe that test_cl_dup() and a few others in there are completely empty. I looked at them a few days ago and thought to myself, "Is this even allowed?". Perhaps maybe it isn't (anymore). I imagine if all references to test_cl_dup and the other empty tests are removed, it may work.

Micah

?On 11/26/19, 8:04 AM, "clamav-devel on behalf of Sergey" <clamav-devel-bounces@lists.clamav.net on behalf of a_s_y@sama.ru> wrote:

On Monday 25 November 2019, Sergey wrote:

> "make check" fails with multiple errors when I use gcc 9. Is ClamAV
> adapted to build by gcc 9?
>
> For example:
>
> In file included from check_clamav.c:11:
> check_clamav.c: In function 'test_cl_free_fn':
> check_clamav.c:43:12: error: storage class specified for parameter 'test_cl_dup_fn'
> 43 | START_TEST(test_cl_dup)
> | ^~~~~~~~~~~

This is not a problem with gcc9. This is caused by replacing libcheck
from 0.12.0 to 0.13.0.

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml


_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: 0.101.5 (and .4), make check and gcc 9 [ In reply to ]
On Tuesday 26 November 2019, Micah Snyder (micasnyd) wrote:

> Hi Sergey,
>
> Thanks for investigating. I believe that test_cl_dup() and a few others
> in there are completely empty. I looked at them a few days ago and
> thought to myself, "Is this even allowed?". Perhaps maybe it isn't
> (anymore). I imagine if all references to test_cl_dup and the other
> empty tests are removed, it may work.

It helps. I removed

START_TEST(test_cl_retdbdir)
fail_unless(!strcmp(DATADIR, cl_retdbdir()), "cl_retdbdir");
END_TEST

also. It cause the error

In file included from check_clamav.c:11:
check_clamav.c:51:13: error: expected declaration specifiers or '...' before '!' token
51 | fail_unless(!strcmp(DATADIR, cl_retdbdir()), "cl_retdbdir");
| ^

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: 0.101.5 (and .4), make check and gcc 9 [ In reply to ]
I wonder if they made a backwards incompatible change with fail_unless, or removed fail_unless? It appears fail_unless is deprecated: http://check.sourceforge.net/doc/check_html/check_4.html

I'll try and reproduce the issue to investigate a little later.

-Micah

?On 11/26/19, 8:52 AM, "clamav-devel on behalf of Sergey" <clamav-devel-bounces@lists.clamav.net on behalf of a_s_y@sama.ru> wrote:

On Tuesday 26 November 2019, Micah Snyder (micasnyd) wrote:

> Hi Sergey,
>
> Thanks for investigating. I believe that test_cl_dup() and a few others
> in there are completely empty. I looked at them a few days ago and
> thought to myself, "Is this even allowed?". Perhaps maybe it isn't
> (anymore). I imagine if all references to test_cl_dup and the other
> empty tests are removed, it may work.

It helps. I removed

START_TEST(test_cl_retdbdir)
fail_unless(!strcmp(DATADIR, cl_retdbdir()), "cl_retdbdir");
END_TEST

also. It cause the error

In file included from check_clamav.c:11:
check_clamav.c:51:13: error: expected declaration specifiers or '...' before '!' token
51 | fail_unless(!strcmp(DATADIR, cl_retdbdir()), "cl_retdbdir");
| ^

--
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml


_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml