Libcaf errors

Hi,

Compiling Bro 2.4 with CAF 0.13.2 works fine. However, after updating to CAF 0.14.0, Bro fails to compile with error message:

Scanning dependencies of target broker
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[3]: Entering directory /usr/src/setup/bro/bro-2.4/build’
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/address.cc.o
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/broker.cc.o
In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:9:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/store/result_type_info.hh:5:53: fatal error: caf/detail/abstract_uniform_type_info.hpp: No such file or directory
#include <caf/detail/abstract_uniform_type_info.hpp>
^
compilation terminated.
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1

From the build, I can see this:

– Found Libcaf: /usr/local/lib/libcaf_core.so;/usr/local/lib/libcaf_io.so
– Found CAF version: 0.14.0

The path of the file “abstract_uniform_type_info.hpp” in CAF 0.14 is:

ls -l /usr/local/include/caf/abstract_uniform_type_info.hpp
-rw-r–r-- 1 root root 3600 Jul 10 05:15 /usr/local/include/caf/abstract_uniform_type_info.hpp

However, the path of the same file in CAF 0.13.2 is:

/usr/local/include/caf/detail/abstract_uniform_type_info.hpp

The directory “detail” is dropped in CAF 0.14.0

I tried configuring Bro again, this time adding --with-libcaf, but the same error persisted. Since the paths seemed different, I made changes to Bro code to look at the new path. This did not work. I also tried moving “abstract_uniform_type_info.hpp” inside “detail” to mimic CAF 0.13.2, and that also did not work. In both cases 1) code change, and 2) directory change, I ended up with the same error(s):

In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:11:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected template-name before ‘<’ token
class data_type_info : public caf::detail::abstract_uniform_type_info {
^
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected ‘{’ before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected unqualified-id before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:178:2: error: expected ‘}’ at end of input
}
^
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[2]: *** [aux/broker/CMakeFiles/broker.dir/all] Error 2 make[2]: Leaving directory /usr/src/setup/bro/bro-2.4/build’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/setup/bro/bro-2.4/build’
make: *** [all] Error 2

Actor Framework was configured with:

sudo ./configure --no-examples --no-unit-tests --no-qt-examples --no-protobuf-examples

Bro was configured with:

sudo ./configure --with-pcap=/usr/local/lib --enable-c++11 --enable-broker

and GCC version is

$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

I thought of checking with the list if anyone faced the same issue, or whether I should contact the Actor Framework maintainers.

Thanks.
MP

Sorry if this message is a duplicate. First one did not seem to make it.

Hi,

Compiling Bro 2.4 with CAF 0.13.2 works fine. However, after updating to CAF 0.14.0, Bro fails to compile with error message:

Scanning dependencies of target broker
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[3]: Entering directory /usr/src/setup/bro/bro-2.4/build’
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/address.cc.o
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/broker.cc.o
In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:9:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/store/result_type_info.hh:5:53: fatal error: caf/detail/abstract_uniform_type_info.hpp: No such file or directory
#include <caf/detail/abstract_uniform_type_info.hpp>
^
compilation terminated.
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1

From the build, I can see this:

– Found Libcaf: /usr/local/lib/libcaf_core.so;/usr/local/lib/libcaf_io.so
– Found CAF version: 0.14.0

The path of the file “abstract_uniform_type_info.hpp” in CAF 0.14 is:

ls -l /usr/local/include/caf/abstract_uniform_type_info.hpp
-rw-r–r-- 1 root root 3600 Jul 10 05:15 /usr/local/include/caf/abstract_uniform_type_info.hpp

However, the path of the same file in CAF 0.13.2 is:

/usr/local/include/caf/detail/abstract_uniform_type_info.hpp

The directory “detail” is dropped in CAF 0.14.0

I tried configuring Bro again, this time adding --with-libcaf, but the same error persisted. Since the paths seemed different, I made changes to Bro code to look at the new path. This did not work. I also tried moving “abstract_uniform_type_info.hpp” inside “detail” to mimic CAF 0.13.2, and that also did not work. In both cases 1) code change, and 2) directory change, I ended up with the same error(s):

In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:11:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected template-name before ‘<’ token
class data_type_info : public caf::detail::abstract_uniform_type_info {
^
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected ‘{’ before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected unqualified-id before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:178:2: error: expected ‘}’ at end of input
}
^
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[2]: *** [aux/broker/CMakeFiles/broker.dir/all] Error 2 make[2]: Leaving directory /usr/src/setup/bro/bro-2.4/build’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/setup/bro/bro-2.4/build’
make: *** [all] Error 2

Actor Framework was configured with:

sudo ./configure --no-examples --no-unit-tests --no-qt-examples --no-protobuf-examples

Bro was configured with:

sudo ./configure --with-pcap=/usr/local/lib --enable-c++11 --enable-broker

and GCC version is

$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

I thought of checking with the list if anyone faced the same issue, or whether I should contact the Actor Framework maintainers.

Thanks.
MP

Sorry if this message is a duplicate. First one did not seem to make it.

Hi,

Compiling Bro 2.4 with CAF 0.13.2 works fine. However, after updating to CAF 0.14.0, Bro fails to compile with error message:

Scanning dependencies of target broker
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[3]: Entering directory /usr/src/setup/bro/bro-2.4/build’
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/address.cc.o
[ 5%] Building CXX object aux/broker/CMakeFiles/broker.dir/src/broker.cc.o
In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:9:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/store/result_type_info.hh:5:53: fatal error: caf/detail/abstract_uniform_type_info.hpp: No such file or directory
#include <caf/detail/abstract_uniform_type_info.hpp>
^
compilation terminated.
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1

From the build, I can see this:

– Found Libcaf: /usr/local/lib/libcaf_core.so;/usr/local/lib/libcaf_io.so
– Found CAF version: 0.14.0

The path of the file “abstract_uniform_type_info.hpp” in CAF 0.14 is:

ls -l /usr/local/include/caf/abstract_uniform_type_info.hpp
-rw-r–r-- 1 root root 3600 Jul 10 05:15 /usr/local/include/caf/abstract_uniform_type_info.hpp

However, the path of the same file in CAF 0.13.2 is:

/usr/local/include/caf/detail/abstract_uniform_type_info.hpp

The directory “detail” is dropped in CAF 0.14.0

I tried configuring Bro again, this time adding --with-libcaf, but the same error persisted. Since the paths seemed different, I made changes to Bro code to look at the new path. This did not work. I also tried moving “abstract_uniform_type_info.hpp” inside “detail” to mimic CAF 0.13.2, and that also did not work. In both cases 1) code change, and 2) directory change, I ended up with the same error(s):

In file included from /usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:11:0:
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected template-name before ‘<’ token
class data_type_info : public caf::detail::abstract_uniform_type_info {
^
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected ‘{’ before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/data_type_info.hh:14:70: error: expected unqualified-id before ‘<’ token
/usr/src/setup/bro/bro-2.4/aux/broker/src/broker.cc:178:2: error: expected ‘}’ at end of input
}
^
make[3]: *** [aux/broker/CMakeFiles/broker.dir/src/broker.cc.o] Error 1
make[3]: Leaving directory /usr/src/setup/bro/bro-2.4/build' make[2]: *** [aux/broker/CMakeFiles/broker.dir/all] Error 2 make[2]: Leaving directory /usr/src/setup/bro/bro-2.4/build’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/setup/bro/bro-2.4/build’
make: *** [all] Error 2

Actor Framework was configured with:

sudo ./configure --no-examples --no-unit-tests --no-qt-examples --no-protobuf-examples

Bro was configured with:

sudo ./configure --with-pcap=/usr/local/lib --enable-c++11 --enable-broker

and GCC version is

$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

I thought of checking with the list if anyone faced the same issue, or whether I should contact the Actor Framework maintainers.

Thanks.
MP

As of CAF 0.14, caf::detail::abstract_uniform_type_info is no longer
considered an implementation detail and has therefore been hoisted to
the parent namespace.

I've pushed the necessary fixes to the branch topic/caf-0.14-fix (which
also get rid of the deprecated sb_actor warnings and a compile error on
OSX). Please give it a shot to see whether it works for you now.

Jon, if that looks fine to you, feel free to merge.

    Matthias

Thank you Matthias for quickly jumping into this.

Is the branch pushed already? I am not able to locate it yet. I will wait some time and try again and will update with my results.

Thanks again.
MP

Is the branch pushed already? I am not able to locate it yet. I will wait
some time and try again and will update with my results.

Yes, I pushed it immediately:

    https://github.com/bro/broker/tree/topic/caf-0.14-fix

Let me know how it works.

    Matthias

> Is the branch pushed already? I am not able to locate it yet. I will wait
> some time and try again and will update with my results.

Yes, I pushed it immediately:

    https://github.com/bro/broker/tree/topic/caf-0.14-fix

Ah, it is under Bro's repo; I was looking in the Actor Framework repo.
Thanks for pointing this out.

Let me know how it works.

Bro compiled successfully with the fix you provided. Here is what I did for
sanity checking and as a reference if somebody else faces the same issue.

1. Cloned the Actor Frame (0.14.0) again and deleted the old one (0.13.2)

2. Cloned Broker and merged the caf-0.14-fix branch:

   git clone GitHub - bro/broker: Bro's Messaging Library
   git pull origin topic/caf-0.14-fix

3. Copied the contents of the just cloned/merged broker fix branch into
Bro's broker directory (this and step 2 could have been done directly using
git, but not sure how :slight_smile: ):

    cp -r broker/* bro-2.4/aux/broker/

4. Compile Bro successfully.

    ldd /usr/local/bro/bon/bro

   ...
   libcaf_io.so.0.14.0 => /usr/local/lib/libcaf_io.so.0.14.0
(0x00007fcccc6fb000)
   ...

    Matthias

Thank you Matthias.
MP

Bro compiled successfully with the fix you provided.

Good to know, we'll integrate the fix then.

3. Copied the contents of the just cloned/merged broker fix branch into
Bro's broker directory (this and step 2 could have been done directly using
git, but not sure how :slight_smile: ):

Once we've updated the submodules in the Bro repo, this will no longer
be necessary. (Instead of copying, another ad-hoc fix would simply
involve changing the SHA of the broker submodule and then update your
submodules again.)

    Matthias