forked from intel/hyperscan
-
Notifications
You must be signed in to change notification settings - Fork 57
Installation from source
Konstantinos Margaritis edited this page Nov 19, 2023
·
6 revisions
The build system has recently been refactored to be more modular and easier to extend. For that reason, some small but necessary changes were made that might break compatibility with how Hyperscan was built.
In order to build on Debian/Ubuntu make sure you install the following build-dependencies
$ sudo apt build-essential cmake ragel pkg-config libsqlite3-dev libpcap-dev
TBD
Assuming an existing HomeBrew installation:
% brew install boost cmake gcc libpcap pkg-config ragel sqlite
In order to configure with cmake
first create and cd into a build directory:
$ mkdir build
$ cd build
Then call cmake
from inside the build
directory:
$ cmake ../
Common options for Cmake are:
-
-DBUILD_STATIC_LIBS=[On|Off]
Build static libraries -
-DBUILD_SHARED_LIBS=[On|Off]
Build shared libraries (if none are set static libraries are built by default) -
-DCMAKE_BUILD_TYPE=[Release|Debug|RelWithDebInfo|MinSizeRel]
Configure build type and determine optimizations and certain features. -
-DUSE_CPU_NATIVE=[On|Off]
Native CPU detection is off by default, however it is possible to build a performance-oriented non-fat library tuned to your CPU -
-DFAT_RUNTIME=[On|Off]
Fat Runtime is only available for X86 32-bit/64-bit and AArch64 architectures and only on Linux. It is incompatible withDebug
type andUSE_CPU_NATIVE
.
-
-DBUILD_AVX2=[On|Off]
Enable code for AVX2. -
-DBUILD_AVX512=[On|Off]
Enable code for AVX512. ImpliesBUILD_AVX2
. -
-DBUILD_AVX512VBMI=[On|Off]
Enable code for AVX512 with VBMI extension. ImpliesBUILD_AVX512
.
-
-DBUILD_SVE=[On|Off]
Enable code for SVE, like on AWS Graviton3 CPUs. Not much code is ported just for SVE , but enabling SVE code production, does improve code generation, see Benchmarks. -
-DBUILD_SVE2=[On|Off]
Enable code for SVE2, impliesBUILD_SVE
. Most non-Neon code is written for SVE2 -
-DBUILD_SVE2_BITPERM=[On|Off]
Enable code for SVE2_BITPERM harwdare feature, impliesBUILD_SVE2
.
If cmake
has completed successfully you can run make
in the same directory, if you have a multi-core system with N
cores, running
$ make -j <N>
will speed up the process. If all goes well, you should have the vectorscan library compiled.