[Oisf-users] Hyperscan 4.2 released
justin.viiret at intel.com
Fri Jun 3 00:59:27 UTC 2016
> I've tested Suricata 3.0.1 and 3.1dev with Hyperscan 4.2 and I've encountered
> no regressions.
> Do we still need "cmake -DBUILD_STATIC_AND_SHARED=1 ../" ?
> That is how I have it now:
We had a shot at fixing this particular issue in the 4.2 release, which now adds the C++ standard library to the Libs.private line in the pkg-config file distributed with Hyperscan.
However, it seems that if you build just the Hyperscan static library, Suricata's configure script doesn't pick it up; this is because the autoconf PKG_CHECK_MODULES macro doesn't pass --static to pkg-config and pick up the private libs as well.
There's some more detail in this pkg-config bug:
However, the PKG_CHECK_MODULES_STATIC macro they have added is comparatively recent, I think, and suggests that you always want static linkage, which is not quite right -- we want to pick up whichever version of the library is present.
So, my suggestion is that right now, you configure Hyperscan with:
cmake -DBUILD_SHARED_LIBS=1 ..
which will build just the shared library, and the current Suricata configure script will pick that up just fine.
If we want to be more ambitious and handle cases where the user may have either the static or shared libraries installed, it might be possible to write the autoconf glue (or a wrapper macro) that tries PKG_CHECK_MODULES first, then falls back to PKG_CHECK_MODULES_STATIC.
More information about the Oisf-users