Bug 940896

Summary: libnetfilter_queue and libnfnetlink library header files are not located correctly
Product: [openSUSE] openSUSE Distribution Reporter: James Moe <jimoe>
Component: InstallationAssignee: Jan Engelhardt <jengelh>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ancor, Greg.Freemyer
Version: 13.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description James Moe 2015-08-06 22:29:33 UTC
The header files for libraries libnetfilter_queue and libnfnetlink are not located in /usr/include/ is such a way that can be compiled.

I was building suricata v2.0.8 (same for 2.0.7) with the "--enable-nfqueue" option. The option expects to find libnetfilter_queue.h in </usr/include/libnetfilter_queue/>. However, YaST installed it in <libnetfilter_queue-1.0.2/libnetfilter_queue/>. (Further, "configure" for suricata is broken for indicating an alternate directory for libnetfilter_queue, a suricata prolem.)

<libnfnetlink/libnfnetlink.h> is included by libnetfilter_queue.h; the "libnfnetlink" headers are installed in <libnfnetlink-1.0.1/libnfnetlink/>. Even if <libnetfilter_queue/> is located as expected, a compilation fails because libnfnetlink.h cannot be found.

Possibly some symlinks were meant to resolve the folder locations?

I manually moved those two folders from the versioned folders to </usr/include/> to workaround the issue.
Comment 1 Ancor Gonzalez Sosa 2015-08-07 08:00:43 UTC
Reassigning to libnetfilter_queue bugowner.
Comment 2 Jan Engelhardt 2015-08-07 09:30:48 UTC
Suricata ought to use pkg-config.

*** This bug has been marked as a duplicate of bug 795968 ***
Comment 3 James Moe 2015-08-07 18:56:32 UTC
How does modifying pkg-config for "libnetfilter_queue" help with the "libnfnetlink" aspect?
Comment 4 Jan Engelhardt 2015-08-07 19:40:14 UTC
Many libraries require that a library-using program use pkg-config to discover the compiler and linker location flags of the library, and this is true for many a package in openSUSE, including libnetfilter_queue, libnfnetlink, libnftnl, and other non-Netfilter projects.
Comment 5 Greg Freemyer 2016-10-08 15:27:21 UTC
I know this is closed, but Suricata 3.1.2 is now in server:monitoring.

The "fix" was to use the correct configure statement:

%configure --enable-nfqueue \
           --with-libnetfilter_queue-includes=`pkg-config libnetfilter_queue --variable=includedir` \
           --with-libnetfilter_log-includes=`pkg-config libnetfilter_log --variable=includedir` \
           --with-libnfnetlink-includes=`pkg-config libnfnetlink --variable=includedir` \
           --enable-prelude \
           --enable-gccprotect \
           --enable-old-barnyard2 \
           --enable-non-bundled-htp \
           --enable-geoip \
           --enable-lua \
           --enable-hiredis