MITRECND / bro-http2

Plugin for Zeek/Bro which provides http2 decoder/analyzer
Other
30 stars 21 forks source link

Installation / build fails #1

Closed swedishmike closed 6 years ago

swedishmike commented 6 years ago

I've tried to install this both using the bro-pkg way ( bro-pkg install https://github.com/MITRECND/bro-http2 ) and the manual install and both fails.

I've double checked the prereqs and the ./configure portion doesn't seem to complain about something either.

When I run the 'make' step I get the following output.

(base) root@abn-brodev1:~/test/bro-http2# make Makefile:11: recipe for target 'build-it' failed make: [build-it] Error 1 (ignored) ( cd build && make ) make[1]: Entering directory '/root/test/bro-http2/build' make[2]: Entering directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target bif-plugin-mitrecnd_HTTP2-events.bif make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' [ 5%] [BIFCL] Processing src/events.bif make[3]: Leaving directory '/root/test/bro-http2/build' [ 5%] Built target bif-plugin-mitrecnd_HTTP2-events.bif make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target bif-plugin-mitrecnd_HTTP2-http2.bif make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' [ 10%] [BIFCL] Processing src/http2.bif make[3]: Leaving directory '/root/test/bro-http2/build' [ 10%] Built target bif-plugin-mitrecnd_HTTP2-http2.bif make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target bro-plugin-mitrecnd_HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' [ 15%] Creating bro_plugin__ for mitrecnd::HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' [ 15%] Built target bro-plugin-mitrecnd_HTTP2 make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target copy-scripts-mitrecnd_HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' make[3]: Leaving directory '/root/test/bro-http2/build' [ 15%] Built target copy-scripts-mitrecnd_HTTP2 make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target copy-bif-mitrecnd_HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' [ 20%] Creating build/lib/bif for mitrecnd::HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' [ 20%] Built target copy-bif-mitrecnd_HTTP2 make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target generate_outputs make[3]: Leaving directory '/root/test/bro-http2/build' [ 20%] Built target generate_outputs make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target bif-init-mitrecnd_HTTP2 make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' make[3]: Leaving directory '/root/test/bro-http2/build' [ 20%] Built target bif-init-mitrecnd_HTTP2 make[3]: Entering directory '/root/test/bro-http2/build' Scanning dependencies of target mitrecnd-HTTP2.linux-x86_64 make[3]: Leaving directory '/root/test/bro-http2/build' make[3]: Entering directory '/root/test/bro-http2/build' [ 25%] Building CXX object CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/Plugin.cc.o [ 30%] Building CXX object CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_Frame.cc.o [ 35%] Building CXX object CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_FrameReassembler.cc.o [ 40%] Building CXX object CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_HeaderStorage.cc.o [ 45%] Building CXX object CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_Stream.cc.o /root/test/bro-http2/src/HTTP2_Stream.cc: In member function ‘bool analyzer::mitrecnd::HTTP2_HalfStream::processHeaders(uint8_t**, uint32_t&, bool, std::cxx11::string&, std::__cxx11::string&)’: /root/test/bro-http2/src/HTTP2_Stream.cc:70:50: error: ‘nghttp2_hd_inflate_hd2’ was not declared in this scope endHeaders); ^ CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/build.make:194: recipe for target 'CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_Stream.cc.o' failed make[3]: [CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/src/HTTP2_Stream.cc.o] Error 1 make[3]: Leaving directory '/root/test/bro-http2/build' CMakeFiles/Makefile2:270: recipe for target 'CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/all' failed make[2]: [CMakeFiles/mitrecnd-HTTP2.linux-x86_64.dir/all] Error 2 make[2]: Leaving directory '/root/test/bro-http2/build' Makefile:149: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/root/test/bro-http2/build' Makefile:11: recipe for target 'build-it' failed make: [build-it] Error 2

I'm running this on a fully patched Ubuntu 16.04.

Mraoul commented 6 years ago

Could you post what version of nghttp2 is installed?

swedishmike commented 6 years ago

Sure.

<- Cut -> root@abn-brodev1:~/test/bro-http2# apt list libnghttp2-dev Listing... Done libnghttp2-dev/xenial,now 1.7.1-1 amd64 [installed] <- Cut ->

Mraoul commented 6 years ago

Unfortunately, it looks like the version that's in the apt repo is too old -- this code uses the nghttp2_hd_inflate_hd2 function that was introduced in version 1.11.0.

It looks like folks using Ubuntu will have to compile the library from source. I'll update the build instructions and see if I can add a version check to the cmake process.

swedishmike commented 6 years ago

Cool - I'll give that a go instead.

Thanks for looking into this!

swedishmike commented 6 years ago

That worked better. I cloned the nghttp2 repo and followed their instructions to compile it.

To keep it lightweight(ish) I just ran

./configure --enable-lib-only
make
make install
ldconfig -v

before re-trying this install.

Do you want to keep this open as a reference until the Docs been updated?

Mraoul commented 6 years ago

Yeah, I'll close this out when the docs are updated.