<div dir="ltr">OK, have built a statically linked suricata, except for libpcre, which is dynaloaded ('cause I don't have a static one handy):<div><br></div><div><div>../libhtp/htp/.libs/libhtp.a /usr/lib/x86_64-linux-gnu/libmagic.a /usr/local/lib/libcap-ng.a /usr/local/lib/libpcap.a /usr/lib/x86_64-linux-gnu/libnet.a /usr/local/lib/libnetfilter_queue.a /usr/local/lib/libnfnetlink.a /usr/lib/x86_64-linux-gnu/libjansson.a /usr/lib/x86_64-linux-gnu/libpthread.a /usr/local/lib/libyaml.a -lpcre /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/libc.a -static</div><div><br></div><div>root@fw:/usr/local/src/suricata-3.2.2/src# file .libs/suricata</div><div>.libs/suricata: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=2753a65e3e621f46ef1316369bfaf7a946e17966, not stripped<br></div></div><div><div><br></div><div>root@fw:/usr/local/src/suricata-3.2.2/src# ll .libs/suricata</div><div>-rwxr-xr-x 1 root root 24227424 Jun 28 14:33 .libs/suricata*</div><div><br></div></div><div>and it loads the rules, will try it inline later:</div><div><br></div><div><br></div><div><div>root@fw:/usr/local/src/suricata-3.2.2/src# .libs/suricata -T</div><div>28/6/2017 -- 14:40:26 - <Info> - Running suricata under test mode</div><div>28/6/2017 -- 14:40:26 - <Info> - Configuration node 'unix-command' redefined.</div><div>28/6/2017 -- 14:40:26 - <Notice> - This is Suricata version 3.2.2 RELEASE</div><div>28/6/2017 -- 14:40:28 - <Notice> - Configuration provided was successfully loaded. Exiting.</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 7:29 AM, Jason Ish <span dir="ltr"><<a href="mailto:lists@ish.cx" target="_blank">lists@ish.cx</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 27/06/17 11:05 AM, Victor Julien wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 27-06-17 13:43, Breno Silva wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just tried to play with C|LD|FLAGS (defining -static) and using .a<br>
version of the libraries (pcre, yaml, etc).<br>
However suricata binary is always dynamic. There is no error.<br>
<br>
Anything you think i should try ?<br>
</blockquote>
<br>
I don't know. Never tried it :)<br>
<br>
Anyone else have an idea?<br>
</blockquote>
<br>
I haven't tried with Suricata yet myself, but I used to build another app statically, and I found I had to remove the shared libraries so they wouldn't be found at all - a container helped here. Or copy the .a's into a directory and make sure that dir is on the library path before any standard location. But I find it far from trivial on modern Linux.<br>
<br>
Jason<br>
<br>
<br>
______________________________<wbr>_________________<br>
Suricata IDS Devel mailing list: <a href="mailto:oisf-devel@openinfosecfoundation.org" target="_blank">oisf-devel@openinfosecfoundati<wbr>on.org</a><br>
Site: <a href="http://suricata-ids.org" rel="noreferrer" target="_blank">http://suricata-ids.org</a> | Participate: <a href="http://suricata-ids.org/participate/" rel="noreferrer" target="_blank">http://suricata-ids.org/partic<wbr>ipate/</a><br>
List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-devel" rel="noreferrer" target="_blank">https://lists.openinfosecfound<wbr>ation.org/mailman/listinfo/<wbr>oisf-devel</a><br>
Redmine: <a href="https://redmine.openinfosecfoundation.org/" rel="noreferrer" target="_blank">https://redmine.openinfosecfou<wbr>ndation.org/</a><br>
<br>
</blockquote></div><br></div>