ClamAV PCRE support
Hi,
I am adding ClamAV to our custom image and have added the following to our main .bb file:
IMAGE_INSTALL += " clamav clamav-daemon clamav-clamdscan"
When I run clamscan on our board I get a number of errors of the form "logical signature for ... uses PCREs but support is disabled, skipping" so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
PACKAGECONFIG_append_pn-clamav = " pcre"
and have also added " libpcre2" before "clamav" in the IMAGE_INSTALL as above.
Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at <builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-r0/recipe-sysroot/usr/lib
I have attempted to solve this by creating a .bbappend file in my layer containing the following to try and force it to build libpcre first
DEPENDS += " libpcre2"
however this has no effect on the error, I assume this may not be the way to solve the dependency problem.
Can anyone please advise what additional configuration is required to enable building of support for PCRE into ClamAV
Thanks in advance for your assistance!
Regards,
Tom Gibson
C Software Limited
Quoted 8 lines · Tom Gibson
Hi,
I am adding ClamAV to our custom image and have added the following to our main .bb file:
Are you using the recipe from meta-security ?
- Armin
Quoted 69 lines
IMAGE_INSTALL+= “ clamav clamav-daemon clamav-clamdscan”When I run clamscan on our board I get a number of errors of the form “logical signature for … uses PCREs but support is disabled, skipping” so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
PACKAGECONFIG_append_pn-clamav = “ pcre”
and have also added “ libpcre2” before “clamav” in the
IMAGE_INSTALLas above.Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at <builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-r0/recipe-sysroot/usr/lib
I have attempted to solve this by creating a .bbappend file in my layer containing the following to try and force it to build libpcre first
DEPENDS += “ libpcre2”
however this has no effect on the error, I assume this may not be the way to solve the dependency problem.
Can anyone please advise what additional configuration is required to enable building of support for PCRE into ClamAV
Thanks in advance for your assistance!
Regards,
Tom Gibson
C Software Limited
Yes, I am using the recipe from meta-security. I have just double-checked this with "bitbake-layers show-recipes".
Regards,
Tom Gibson
C Software Limited
From: akuster808 <[email protected]>
Sent: 27 March 2018 16:04
To: Tom Gibson <[email protected]>; [email protected]
Subject: Re: [yocto] ClamAV PCRE support
On 03/27/2018 07:42 AM, Tom Gibson wrote:
Hi,
I am adding ClamAV to our custom image and have added the following to our main .bb file:
Are you using the recipe from meta-security ?
- Armin
IMAGE_INSTALL += " clamav clamav-daemon clamav-clamdscan"
When I run clamscan on our board I get a number of errors of the form "logical signature for ... uses PCREs but support is disabled, skipping" so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
PACKAGECONFIG_append_pn-clamav = " pcre"
and have also added " libpcre2" before "clamav" in the IMAGE_INSTALL as above.
Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at <builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-r0/recipe-sysroot/usr/lib
I have attempted to solve this by creating a .bbappend file in my layer containing the following to try and force it to build libpcre first
DEPENDS += " libpcre2"
however this has no effect on the error, I assume this may not be the way to solve the dependency problem.
Can anyone please advise what additional configuration is required to enable building of support for PCRE into ClamAV
Thanks in advance for your assistance!
Regards,
Tom Gibson
C Software Limited
Hi,
Does anyone have any ideas for how I might fix this bitbake error?
Also is there an example initscript to start clamd?
Thanks in advance.
Regards,
Tom Gibson
C Software Limited
From: Tom Gibson
Sent: 27 March 2018 16:28
To: 'akuster808' <[email protected]>; [email protected]
Subject: RE: [yocto] ClamAV PCRE support
Yes, I am using the recipe from meta-security. I have just double-checked this with "bitbake-layers show-recipes".
Regards,
Tom Gibson
C Software Limited
From: akuster808 <[email protected]>
Sent: 27 March 2018 16:04
To: Tom Gibson <[email protected]>; [email protected]
Subject: Re: [yocto] ClamAV PCRE support
On 03/27/2018 07:42 AM, Tom Gibson wrote:
Hi,
I am adding ClamAV to our custom image and have added the following to our main .bb file:
Are you using the recipe from meta-security ?
- Armin
IMAGE_INSTALL += " clamav clamav-daemon clamav-clamdscan"
When I run clamscan on our board I get a number of errors of the form "logical signature for ... uses PCREs but support is disabled, skipping" so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
PACKAGECONFIG_append_pn-clamav = " pcre"
and have also added " libpcre2" before "clamav" in the IMAGE_INSTALL as above.
Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at <builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-r0/recipe-sysroot/usr/lib
I have attempted to solve this by creating a .bbappend file in my layer containing the following to try and force it to build libpcre first
DEPENDS += " libpcre2"
however this has no effect on the error, I assume this may not be the way to solve the dependency problem.
Can anyone please advise what additional configuration is required to enable building of support for PCRE into ClamAV
Thanks in advance for your assistance!
Regards,
Tom Gibson
C Software Limited
Hi Tom,
Quoted 7 lines · Tom Gibson
When I run clamscan on our board I get a number of errors of the form “logical signature for … uses PCREs but support is disabled, skipping” so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
Quoted 8 lines
PACKAGECONFIG_append_pn-clamav = “ pcre”
and have also added “ libpcre2” before “clamav” in the
IMAGE_INSTALLas above.
This shouldn't be necessary, PACKAGECONFIG adds DEPENDS on libpcre when pcre is enabled and only of two should be required.
Quoted 11 lines
Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at <builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-r0/recipe-sysroot/usr/lib
This is happening because clamav is looking for pcre-config (uses it to find pcre paths) and it's not able to locate it ...
Even if you do get around this error by passing the path to configure, using binconfig files to evaluate paths has been disabled in OE-core layer.
So, you will have to fix the configure/pcre.m4 file in clamav to do this using .pc file from libpcre instead.
Thanks,
Anuj
Hi Anuj
Thanks for your e-mail.
Quoted 19 lines
-----Original Message-----
From: Anuj Mittal <[email protected]>
Sent: 30 March 2018 11:16
To: Tom Gibson <[email protected]>; [email protected]
Subject: Re: [yocto] ClamAV PCRE supportQuoted 13 lines
When I run clamscan on our board I get a number of errors of the form "logical signature for ... uses PCREs but support is disabled, skipping" so the solution would appear to be to add PCRE support. In the ClamAV bitbake recipe I see there is a PACKAGECONFIG variable for PCRE, so to test if this is the solution I have added the following to my local.conf:
PACKAGECONFIG_append_pn-clamav = " pcre"
Quoted 6 lines
Quoted 2 lines
and have also added " libpcre2" before "clamav" in the
IMAGE_INSTALLas above.This shouldn't be necessary, PACKAGECONFIG adds DEPENDS on libpcre when pcre is enabled and only of two should be required.
I have removed the reference to "libpcre2" in the IMAGE_INSTALL variable, I assume I should still include the reference to "pcre" in packageconfig as above.
Quoted 15 lines
Quoted 11 lines
Unfortunately when I run bitbake I now get a configure error similar to the following:
configure: error: cannot locate libpcre2 or libpcre at
<builddir>/tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.3-
r0/re
Quoted 2 lines
cipe-sysroot/usr/lib
Quoted 9 lines
This is happening because clamav is looking for pcre-config (uses it to find pcre paths) and it's not able to locate it ...
Even if you do get around this error by passing the path to configure, using binconfig files to evaluate paths has been disabled in OE-core layer.
So, you will have to fix the configure/pcre.m4 file in clamav to do this using .pc file from libpcre instead.
Sorry, I'm not clear on which file needs fixing? I can only find pcre.m4 at
<builddir>tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.2-r0/git/m4/reorganization/libs/pcre.m4
Isn't this generated during build? I'm sorry I'm also not clear on what needs changing, where can I find the correct .pc file for libpcre?
Thanks for your help.
Regards,
Tom
Hi Tom,
I never tried to get clamav to run, but please see my comments below.
Quoted 13 lines · Tom Gibson
Hi Anuj
Quoted 10 lines
This is happening because clamav is looking for pcre-config (uses it to find pcre paths) and it's not able to locate it ...
Even if you do get around this error by passing the path to configure, using binconfig files to evaluate paths has been disabled in OE-core layer.
So, you will have to fix the configure/pcre.m4 file in clamav to do this using .pc file from libpcre instead.
Quoted 5 lines
Sorry, I'm not clear on which file needs fixing? I can only find pcre.m4 at
<builddir>tmp/work/armv7a-neon-poky-linux-gnueabi/clamav/0.99.2-r0/git/m4/reorganization/libs/pcre.m4Isn't this generated during build? I'm sorry I'm also not clear on what needs changing, where can I find the correct .pc file for libpcre?
I guess Anuj has a much better understanding about ClamAv and friends, but in general:
.pc files are for the pkg-config utility[1][2].
You might want to try to compile libpcre and clamav natively on your target board. From there I would try to "steal" the relevant information and feed it back into the recipe(s).
[1] https://linux.die.net/man/1/pkg-config
[2] https://en.wikipedia.org/wiki/Pkg-config
Also I guess that the file you need to fix is:
./m4/reorganization/libs/pcre.m4
with the input of whatever libpcre has in the libpcre.pc... or so file.
Quoted 7 lines
Thanks for your help.
Regards,
Tom
Happy hunting,
Robert