[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
Re: [Bro-Dev] bro 2.1 vs clang
On Fri, Sep 20, 2013 at 22:11 -0700, you wrote: > /home/ports/security/bro/work/bro-2.1/src/Expr.cc:2392:9: error: > reference to 'is_assignable' is ambiguous clang will be happy if you change it to this: + if ( ! ::is_assignable(op->Type()) ) I've actually fixed that in a branch, thanks for reminding me to merge it in for 2.2. :-) Robin -- Robin Sommer * Phone +1 (510) 722-6541 * ro...@icir.org ICSI/LBNL* Fax +1 (510) 666-2956 * www.icir.org/robin ___ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev