Bro fails on clean checkout

After doing:
git clone --recursive git://git.bro-ids.org/bro
./configure --with-libmagic=/usr/local/Cellar/libmagic/5.04/

I get the following errors when building:
/Users/katrina/test-bro/bro/src/IP.cc: In function ‘VectorVal* BuildOptionsVal(const u_char*, int)’:
/Users/katrina/test-bro/bro/src/IP.cc:46: error: invalid use of incomplete type ‘const struct ip6_opt’
/Users/katrina/test-bro/bro/src/IP.cc:44: error: forward declaration of ‘const struct ip6_opt’

(they continue for subsequent lines in IP.cc)

I see similar errors when trying to merge my branch with master. Am I doing something dumb?

Thanks,
Katrina

I'm working with someone else right now who has packages installed through homebrew and he's seeing really weird errors too. I'm still not sure what's going on. At the moment I suspect it has something to do with a package or packages installed through homebrew.

I don't have any answers yet, but please let us know if you figure out the problem.

Thanks!
  .Seth

Not that this is necessarily helpful, but the problem occurred recently. Previous merges/checkouts have always worked fine for me, even with homebrew-installed packages.

Are you having the problem with the released version of Bro 2.0 too? The other person I'm working with is having odd failures for that too.

  .Seth

I get the following errors when building:
/Users/katrina/test-bro/bro/src/IP.cc: In function ‘VectorVal* BuildOptionsVal(const u_char*, int)’:
/Users/katrina/test-bro/bro/src/IP.cc:46: error: invalid use of incomplete type ‘const struct ip6_opt’
/Users/katrina/test-bro/bro/src/IP.cc:44: error: forward declaration of ‘const struct ip6_opt’

I get the ip6_opt type from my <netinet/ip6.h>. On OS X 10.7.3:

/* IPv6 options: common part */
struct ip6_opt {
    u_int8_t ip6o_type;
    u_int8_t ip6o_len;
} __attribute__((__packed__));

If that's not a standard type, we might add a configure-time check to see if it exists and define it if not. Or we might just always define our own type. I'll look more into what standard ways of defining the IPv6 header structures are.

+Jon

Nope, the released version builds fine (configured the same way)

On OS X 10.6.8, I don't have netinet/ip6.h, and I don't see the struct defined in any other file (in particular, in none of the .h files in netinet or netinet6)

On OS X 10.6.8, I don't have netinet/ip6.h, and I don't see the struct defined in any other file (in particular, in none of the .h files in netinet or netinet6)

Strange, I went to an old 10.5.8 machine it even has netinet/ip6.h, though it's missing the ip6_opt struct. I thought that was would be the difference between conforming to RFC 2292 instead of newer 3542. I'll try to add enough so the missing netinet/ip6.h case works, too.

+Jon

On OS X 10.6.8, I don't have netinet/ip6.h, and I don't see the struct defined in any other file (in particular, in none of the .h files in netinet or netinet6)

Can you try the `topic/jsiwek/ipv6-configure-checks` branch in `bro` and `cmake` repos and tell me what errors you still get, if any?

Also, do you have a <netinet/icmp6.h> ?

+Jon

Can you try the `topic/jsiwek/ipv6-configure-checks` branch in `bro` and `cmake` repos and tell me what errors you still get, if any?

None!

Also, do you have a <netinet/icmp6.h> ?

No, but apparently I was blind before (sorry!); netinet/ip6.h exists, it just doesn't contain the correct struct.