Help creating a recipe for bro (zeek)
Hi all,
I am creating recipe for the bro version 2.5.5.
==============================================================================
SUMMARY = "Passive network traffic analyzer"
HOMEPAGE = "http://www.bro.org"
LICENSE = "GPL-2.0"LIC_FILES_CHKSUM = "file://COPYING;md5=7ffedb422684eb346c1fb5bb8fc5fe45"
inherit debian-package
require recipes-debian/sources/bro.inc inherit autotools cmake pythonnative DEBIAN_UNPACK_DIR = "${WORKDIR}/bro-${PV}-minimal" S = "${WORKDIR}/bro-${PV}-minimal"
#It will look for and find the binary in sysroot bin directory. OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH" EXTRA_OECMAKE += "-DOPENSSL_CORRECT_VERSION_NUMBER=TRUE "
DEPENDS += "bind binpac-native openssl libpcap swig-native bison-native flex-native zlib sed-native"
RDEPENDS_${PN} += "bash bind libpcap openssl zlib python"
BBCLASSEXTEND = "native nativesdk"
==============================================================================
I got the below error while building:
==============================================================================
| DEBUG: Executing shell function do_compile | NOTE: VERBOSE=1 cmake --build /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build --target all -- -j 4 | [1/785] [BIFCL] Processing event.bif | FAILED: src/event.bif.func_def src/event.bif.func_h src/event.bif.func_init src/event.bif.netvar_def src/event.bif.netvar_h src/event.bif.netvar_init scripts/base/bif/event.bif.bro | cd /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src && bifcl /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/bro-2.5.5-minimal/src/event.bif || ( rm -f /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_def /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_h /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_init /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_def /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_h /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_init && exit 1 ) && /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/recipe-sysroot-native/usr/bin/cmake -E copy event.bif.bro /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/scripts/base/bif/event.bif.bro && /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/recipe-sysroot-native/usr/bin/cmake -E remove -f event.bif.bro | /bin/sh: 1: bifcl: not found
==============================================================================
I did not get why 'bifcl' is not foud, i have checked inside folder 'build/src/' the binary is present.
I have debugged with command bitbake -d devshell bro
even there i have got the same error even the binary file is exist
also checked the 'file bifcl' inside devshell, below is the output
bifcl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9165d27cdaa9bfe77fb8a72081302b0469feda72, with debug_info, not stripped
can any one has suggestion for me?
Thanks
seshu
Quoted 29 lines · On Thu, Oct 1, 2020 at 5:25 AM <[email protected]> wrote:
Hi all,
I am creating recipe for the bro version 2.5.5.
==============================================================================
SUMMARY = "Passive network traffic analyzer"
HOMEPAGE = "http://www.bro.org"LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM= "file://COPYING;md5=7ffedb422684eb346c1fb5bb8fc5fe45"inherit debian-package
require recipes-debian/sources/bro.inc inherit autotools cmake pythonnativeDEBIAN_UNPACK_DIR= "${WORKDIR}/bro-${PV}-minimal" S = "${WORKDIR}/bro-${PV}-minimal"#It will look for and find the binary in sysroot bin directory.
OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM= "BOTH"EXTRA_OECMAKE+= "-DOPENSSL_CORRECT_VERSION_NUMBER=TRUE "DEPENDS += "bind binpac-native openssl libpcap swig-native bison-native flex-native zlib sed-native"
RDEPENDS_${PN} += "bash bind libpcap openssl zlib python"
BBCLASSEXTEND = "native nativesdk"
==============================================================================
Quoted 8 lines
I got the below error while building:
==============================================================================| DEBUG: Executing shell function do_compile | NOTE: VERBOSE=1 cmake --build /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build --target all -- -j 4 | [1/785] [BIFCL] Processing event.bif | FAILED: src/event.bif.func_def src/event.bif.func_h src/event.bif.func_init src/event.bif.netvar_def src/event.bif.netvar_h src/event.bif.netvar_init scripts/base/bif/event.bif.bro | cd /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src && bifcl /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/bro-2.5.5-minimal/src/event.bif || ( rm -f /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_def /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_h /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.func_init /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_def /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_h /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/src/event.bif.netvar_init && exit 1 ) && /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/recipe-sysroot-native/usr/bin/cmake -E copy event.bif.bro /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/build/scripts/base/bif/event.bif.bro && /work/build/tmp/work/core2-64-deby-linux/bro/2.5.5-r0/recipe-sysroot-native/usr/bin/cmake -E remove -f event.bif.bro | /bin/sh: 1: bifcl: not found
you need bifcl compiler perhaps cross compiler, so you might need to build bro-native and add bro-native to depends for bro recipe.
Quoted 14 lines
==============================================================================
I did not get why 'bifcl' is not foud, i have checked inside folder 'build/src/' the binary is present.
I have debugged with commandbitbake -d devshell bro
even there i have got the same error even the binary file is exist
also checked the 'file bifcl' inside devshell, below is the output
bifcl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9165d27cdaa9bfe77fb8a72081302b0469feda72, withdebug_info, not strippedcan any one has suggestion for me?
Thanks
seshu