Suricata library

Hello Jason, I looked at libsuricata - v4.3 by jasonish · Pull Request #5847 · OISF/suricata · GitHub and I see as part of that some code was committed in 4.4 to make Suricata C code as library (libsuricata.a and support. Commands like “make”, “make install-library” etc. was provided. But that is not seen in latest code base. Was that removed intentionally due to some reason? Can that still work with latest 6.0.2/6.0.3 code? I tried integrating the commit to 6…0.2 but seems not working. After integrating the commit, I get “No rule to make target `’” message always. Could you please help me to understand was that commit to create C static and shared library from C code base in Suricata and will it work with latest suricata code? If yes, is there any document to help to understand this flow?

1 Like

Hi @Parag,

Git master still has the make targets install-library, and if shared library support is enabled (and you’re on Linux) make is there as well. Note that you need to be in the src/ directory make make to work.

I don’t think there is a simple way to backport this to 6.0 with cherry-picks and its been a bit of a progression of various tidbits all done post 6.0 with no plans for re-integration.

So you’re best way to experiment with libsuricata is by following git master at this time. Happy to answer any questions specific to its use in git master.