[Oisf-devel] Steps to cross compile Suricata

Victor Julien victor at inliniac.net
Thu Mar 20 08:34:08 UTC 2014


On 03/20/2014 09:28 AM, Mahendra Ladhe wrote:
> Hi,
>    I'm trying to cross compile Suricata using a mips toolchain.
> After crossing some hurdles, now I'm stuck at the following point.
> 
> My configure command line is
> configure --enable-nfqueue --prefix=<path> --sysconfdir=<path>
> --localstatedir=<path> --host=<path> --with-libpcap-includes=<path>
> --with-libpcap-libraries=<path> --with-libpcre-includes=<path>
> --with-libpcre-libraries=<path>  --with-libyaml-includes=<path>
> --with-libyaml-libraries=<path> --with-libnfnetlink-includes=<path>
> --with-libnfnetlink-libraries=<path>
> --with-libnetfilter_queue-includes=<path>
> --with-libnetfilter_queue-libraries=<path>
> 
> As can be seen, I've already cross compiled and installed all the
> dependencies.
> 
> The configure script stops at the following.
> blah blah blah
> checking libnfnetlink/libnfnetlink.h usability... yes
> checking libnfnetlink/libnfnetlink.h presence... yes
> checking for libnfnetlink/libnfnetlink.h... yes
> checking for nfnl_fd in -lnfnetlink... yes
> checking libnetfilter_queue/libnetfilter_queue.h usability... yes
> checking libnetfilter_queue/libnetfilter_queue.h presence... yes
> checking for libnetfilter_queue/libnetfilter_queue.h... yes
> checking for nfq_open in -lnetfilter_queue... no
> checking for nfq_set_queue_maxlen in -lnetfilter_queue... no
> checking for nfq_set_verdict2 in -lnetfilter_queue... no
> checking for nfq_set_queue_flags in -lnetfilter_queue... no
> checking for signed nfq_get_payload payload argument... no
>   ERROR!  libnetfilter_queue library not found, go get it
>   from www.netfilter.org.
>   we automatically append libnetfilter_queue when searching
>   for headers etc. when the --with-libnfq-includes directive
>   is used

Your config.log should hold some clues to why it fails.

> I do have libnetfilter_queue library installed and its path passed to
> the configure script using --with-libnetfilter_queue-includes and
> --with-libnetfilter_queue-libraries options.
> (Please also notice the error in the error message: There is no
> --with-libnfq-includes directive in the configure script).
> 
> As of today, I've a feeling that Suricata developers didn't pay
> attention to cross compiling aspect and focused only on x86.
> On Internet, I can easily find step by step description of how to build
> Suricata on say Fedora/Ubuntu etc Linux, but am not finding any
> webpage describing the same for cross compiling.

This is correct. We've not encountered the need for it yet. I do
occasionally test mips and other platforms, but then I compile in the vm
itself, so no cross compiling.

> Could someone please clarify the steps for cross compiling Suricata ?

I think it would be good to document things on our wiki when you figure
them out.

-- 
---------------------------------------------
Victor Julien
http://www.inliniac.net/
PGP: http://www.inliniac.net/victorjulien.asc
---------------------------------------------




More information about the Oisf-devel mailing list