[Bro-Dev] Building bro 2.6 with static broker/caf libraries
I've read up on cmake variable scope but I can't figure out how to build bro with static libraries. The bro-bundled caf already has CAF_BUILD_STATIC_ONLY which I'm pretty sure works but I'm unable to turn it on when building caf as part of a bro build. For example I'd like is to optionally (i.e. from a -D argument to cmake itself) be able to turn on CAF_BUILD_STATIC_ONLY for aux/broker/3rdparty/caf/CMakeLists.txt but nothing I've tried in the top level CMakeLists.txt is seen when the caf CMakeLists.txt is being evaluated. (I'm working on updating the FreeBSD port to 2.6 and can't install things like libcaf_io.so in /usr/local/lib because they conflict with libraries potentially installed by the devel/caf port.) Craig ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
[Bro-Dev] Building Bro with openssl 1.1.1
The FreeBSD security/bro port does not build under the latest FreeBSD 12.0 alpha due to compile errors in the X509 module. I verified that this is due to openssl 1.1.1 by building on 11.2-RELEASE with the openssl111 port. I've attached an example failing build log. Is openssl 1.1.1 support on the roadmap? Craig bro-2.5.5.log.gz Description: application/gzip ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
Re: [Bro-Dev] Broker & CAF includes
This all makes sense to me; what you describe as the current situation (two packages defining the same data structure) seems broken to me. And I see caf/config.hpp defines CAF_VERSION so you're set if broker now or in the future requires a minimum version of caf. Craig ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
Re: [Bro-Dev] current_time() vs network_time()
On 11/18/2015 10:58 AM, Aashish Sharma wrote: > So, I am trying to have bro send me report/alerts at specific timeslots. > > Given current_time is the wall-clock time, I am relying on current_time() > function to get time and then, my code is : if (hh:mm:ss == desired time), > run a report. My recommendation for how to implement this would be to calculate a unix timestamp (seconds since 1970) that corresponds to the next time you want send a report and then poll for when time() is >= this value. After sending the report, calculate the next timestamp. I'm not sure what you have available but to generate the unix timestamp I would use localtime() or gmtime() (using gmtime() avoids daylight saving time issues) to break out the fields, set the H, M and S to the desired values and then use mktime() (or timegm()) to convert back to a unix timestamp. Craig ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
Re: [Bro-Dev] Fwd: [REL - 10amd64-default][security/bro] Failed for bro-2.2 in build
On 12/03/13 08:09, Robin Sommer wrote: > Which clang version is this? I've tried it with a recent version of > the clang 3.4 release branch, and that works fine for me. > > But based on the error message, I'm attaching a patch; does that help > by any chance? I submitted a PR with your patch and it worked (thanks!). Here's some feedback: > - The SQLite.cc change also needs to be applied to >src/input/readers/Raw.cc and src/input/readers/SQLite.cc. Please >upstream that as you see fit. > - You didn't manage to reproduce the build failures locally because >it's an issue caused by libc++, not clang. If you build with clang >but still use libstdc++, everything works as expected. Craig ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
Re: [Bro-Dev] Fwd: [REL - 10amd64-default][security/bro] Failed for bro-2.2 in build
On 12/03/13 08:09, Robin Sommer wrote: > Which clang version is this? I've tried it with a recent version of > the clang 3.4 release branch, and that works fine for me. I dunno, I've asked them them to include the clang version before; I'll ask again. > But based on the error message, I'm attaching a patch; does that help > by any chance? I'll see if I can get someone to test it. Thanks! Craig ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
[Bro-Dev] Fwd: [REL - 10amd64-default][security/bro] Failed for bro-2.2 in build
Sounds like FreeBSD has upgraded to a newer version of clang and it doesn't like to build /src/logging/writers/SQLite.cc anymore. It's the last few lines of the attached message that shows the problem, is there an obvious fix? Thanks! Craig --- Begin Message --- You are receiving this mail as a port that you maintain is failing to build on the FreeBSD package build server. Please investigate the failure and submit a PR to fix build. Maintainer: le...@ee.lbl.gov Last committer: jada...@freebsd.org Ident: $FreeBSD: head/security/bro/Makefile 334597 2013-11-22 15:02:56Z jadawin $ Log URL: http://beefy2.isc.freebsd.org/bulk/10amd64-default/2013-11-29_16h08m05s/logs/bro-2.2.log Build URL: http://beefy2.isc.freebsd.org/bulk/10amd64-default/2013-11-29_16h08m05s Log: >> Building security/bro build started at Sat Nov 30 07:55:51 UTC 2013 port directory: /usr/ports/security/bro building for: FreeBSD 10amd64-default-job-21 10.0-BETA1 FreeBSD 10.0-BETA1 r256420 amd64 maintained by: le...@ee.lbl.gov Makefile ident: $FreeBSD: head/security/bro/Makefile 334597 2013-11-22 15:02:56Z jadawin $ Poudriere version: 3.1-pre ---Begin Environment--- OSVERSION=1000500 UNAME_v=FreeBSD 10.0-BETA1 r256420 UNAME_r=10.0-BETA1 BLOCKSIZE=K MAIL=/var/mail/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin STATUS=1 MASTERMNT=/usr/local/poudriere/data/build/10amd64-default/ref PKG_EXT=txz tpid=20843 POUDRIERE_BUILD_TYPE=bulk PKGNG=1 PKGNAME=bro-2.2 PKG_DELETE=/usr/local/sbin/pkg-static delete -y -f PKG_ADD=/usr/local/sbin/pkg-static add PWD=/root MASTERNAME=10amd64-default USER=root HOME=/root POUDRIERE_VERSION=3.1-pre LOCALBASE=/usr/local PACKAGE_BUILDING=yes PKG_VERSION=/poudriere/pkg-static version PKG_BIN=/usr/local/sbin/pkg-static ---End Environment--- ---Begin OPTIONS List--- ===> The following configuration options are available for bro-2.2: BROCCOLI=on: Build support for libbroccoli communications BROCTL=on: Build BroControl support (requires BROCCOLI) DEBUG=off: Compile in debugging mode IPSUMDUMP=on: Enables traffic summaries LBL_CF=on: Unix time to formated time/date filter support LBL_HF=on: Address to hostname filter support PERFTOOLS=off: Use Perftools to improve memory & CPU usage ===> Use 'make config' to modify these settings ---End OPTIONS List--- --CONFIGURE_ARGS-- --End CONFIGURE_ARGS-- --CONFIGURE_ENV-- TMPDIR="/tmp" PYTHON="/usr/local/bin/python2.7" TMPDIR="/tmp" TMPDIR="/tmp" SHELL=/bin/sh CONFIG_SHELL=/bin/sh --End CONFIGURE_ENV-- --MAKE_ENV-- TMPDIR="/tmp" TMPDIR="/tmp" TMPDIR="/tmp" SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local LIBDIR="/usr/lib" CC="cc" CFLAGS="-O2 -pipe -fno-strict-aliasing" CPP="cpp" CPPFLAGS="" LDFLAGS="" CXX="c++" CXXFLAGS="-O2 -pipe -fno-strict-aliasing" MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -o root -g wheel -m 555" BSD_INSTALL_LIB="install -s -o root -g wheel -m 444" BSD_INSTALL_SCRIPT="install -o root -g wheel -m 555" BSD_INSTALL_DATA="install -o root -g wheel -m 444" BSD_INSTALL_MAN="install -o root -g wheel -m 444" --End MAKE_ENV-- --SUB_LIST-- PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/bro DOCSDIR=/usr/local/share/doc/bro EXAMPLESDIR=/usr/local/share/examples/bro WWWDIR=/usr/local/www/bro ETCDIR=/usr/local/etc/bro --End SUB_LIST-- ---Begin make.conf--- USE_PACKAGE_DEPENDS=yes BATCH=yes WRKDIRPREFIX=/wrkdirs PORTSDIR=/usr/ports PACKAGES=/packages DISTDIR=/distfiles /usr/local/etc/poudriere.d/make.conf WITH_PKGNG=yes NO_RESTRICTED=yes DISABLE_MAKE_JOBS=poudriere ---End make.conf--- ===> Cleaning for bro-2.2 === === === ===> bro-2.2 depends on file: /usr/local/sbin/pkg - not found ===>Verifying install for /usr/local/sbin/pkg in /usr/ports/ports-mgmt/pkg ===> Installing existing package /packages/All/pkg-1.2.1.txz Installing pkg-1.2.1... done If you are upgrading from the old package format, first run: # pkg2ng ===> Returning to build of bro-2.2 === === === === ===> License BSD accepted by the user ===> Fetching all distfiles required by bro-2.2 for building === === ===> License BSD accepted by the user ===> Fetching all distfiles required by bro-2.2 for building => SHA256 Checksum OK for bro-2.2.tar.gz. === =
[Bro-Dev] bro 2.1 vs clang
There's a FreeBSD ports bug report that says clang 3.3 doesn't like bro 2.1: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182127 /home/ports/security/bro/work/bro-2.1/src/Expr.cc:2392:9: error: reference to 'is_assignable' is ambiguous if ( ! is_assignable(op->Type()) ) ^ /home/ports/security/bro/work/bro-2.1/src/Type.h:645:12: note: candidate found by name lookup is 'is_assignable' extern int is_assignable(BroType* t); ^ /usr/include/c++/v1/type_traits:1407:8: note: candidate found by name lookup is 'std::__1::is_assignable' struct is_assignable ^ 1 error generated. I don't have a 10/CURRENT system handy but I built clang 3.3 on my 9.1-RELEASE system but bro built without errors. (There were errors which I've attached in case they'd be useful.) Rather than having to actually build a -CURRENT system to figure this out, is it obvious what the issue is and how to patch it? I'm now the maintainer of the FreeBSD bro port and I'm about to submit a PR to split broccoli out of the current bro port, make broctl a config option, etc. and would like to fix this as part of this update if possible. Craig ===> Building for bro-2.1_2 [ 0%] [BISON][BIFParser] Building parser with bison 2.7.12-4996 [ 0%] [FLEX][BIFScanner] Building scanner with flex /usr/bin/flex version 2.5.4 Scanning dependencies of target ftwire2bro Scanning dependencies of target binpac_lib Scanning dependencies of target adtrace Scanning dependencies of target rst Scanning dependencies of target capstats [ 0%] Swig source Scanning dependencies of target nfcollector [ 1%] [FLEX][PACScanner] Building scanner with flex /usr/bin/flex version 2.5.4 [ 1%] [BISON][PACParser] Building parser with bison 2.7.12-4996 [ 2%] Building C object aux/bro-aux/nftools/CMakeFiles/ftwire2bro.dir/ftwire2bro.c.o [ 7%] Building CXX object aux/binpac/lib/CMakeFiles/binpac_lib.dir/binpac_bytestring.cc.o [ 5%] Building CXX object aux/broctl/aux/capstats/CMakeFiles/capstats.dir/capstats.cc.o [ 5%] Building C object aux/bro-aux/adtrace/CMakeFiles/adtrace.dir/adtrace.c.o [ 5%] Building CXX object aux/binpac/lib/CMakeFiles/binpac_lib.dir/binpac_buffer.cc.o [ 5%] Building C object aux/bro-aux/rst/CMakeFiles/rst.dir/rst.c.o [ 7%] Building CXX object aux/broctl/aux/capstats/CMakeFiles/capstats.dir/version.cc.o [ 7%] Building C object aux/bro-aux/nftools/CMakeFiles/nfcollector.dir/nfcollector.c.o Scanning dependencies of target bifcl [ 7%] Building CXX object src/CMakeFiles/bifcl.dir/bif_arg.cc.o [ 7%] Building CXX object src/CMakeFiles/bifcl.dir/bif_parse.cc.o [ 7%] Building CXX object src/CMakeFiles/bifcl.dir/module_util.cc.o Linking C executable ftwire2bro Linking C executable adtrace Linking C executable rst Scanning dependencies of target binpac [ 7%] Built target ftwire2bro [ 7%] Built target rst Linking C executable nfcollector [ 10%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_analyzer.cc.o [ 8%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_action.cc.o [ 8%] Building CXX object src/CMakeFiles/bifcl.dir/bif_lex.cc.o [ 10%] Built target adtrace [ 10%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_array.cc.o [ 10%] Built target nfcollector [ 10%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_attr.cc.o [ 10%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_btype.cc.o Scanning dependencies of target _SubnetTree [ 10%] Building C object aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/patricia.c.o [ 10%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_case.cc.o /home/fun/u2/src/local/ports/lbl-bro/work/bro-2.1/aux/broctl/aux/pysubnettree/patricia.c:329:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (bitlen < 0 || bitlen > maxbitlen) ~~ ^ ~ Linking CXX static library libbinpac.a [ 10%] Building CXX object aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/SubnetTree.cc.o [ 10%] Building CXX object aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/SubnetTreePYTHON_wrap.cxx.o Linking CXX executable capstats [ 11%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_conn.cc.o 1 warning generated. [ 11%] Built target binpac_lib [ 11%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_context.cc.o [ 11%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_cstr.cc.o [ 11%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_datadep.cc.o [ 11%] Built target capstats [ 13%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_dataptr.cc.o [ 13%] Building CXX object aux/binpac/src/CMakeFiles/binpac.dir/pac_dataunit.cc.o /home/fun/u2/src/local/ports/lbl-bro/work/.build/aux/broctl/aux/pysubnettree/SubnetTreePYTHON_wrap.cxx:2390:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] [ 13%] Building CXX object aux/binpac/src/CMake