Bugzilla – Bug 795968
openSUSE:12.2/libnetfilter_queue: Bug
Last modified: 2023-12-27 14:35:42 UTC
why do you guys write the spec file "%configure --disable-static --includedir=%_includedir/%name-%version" with _includedir/%name-%version !!!!!!!!!!! the devel packages of netfilter series can't be used at all !!!!!!!!!!! the header file can't find the header file which they have included !!!! as well as the _libdir !!!!!!!!! why not just left the includedir as default! the "./configure"will do it well enough!!! this problem happens on all netfilter devel packages
It is there to detect when downstream users fail to use the result from pkgconfig.
(In reply to comment #1) > It is there to detect when downstream users fail to use the result from > pkgconfig. So,It is right?but I just program with libnetfilter-queue,and include the <libnetfilter_queue-1.0.1/libnetfilter_queue/libnetfilter_queue.h> it has #include <libnfnetlink/libnfnetlink.h>;but the libnfnetlink.h is in /usr/include/libnfnetlink-1.0.0+git35/libnfnetlink/
Users of the library (and that includes further libraries) are to use pkgconfig to determine the CPPFLAGS and LIBS of libnetfilter_queue as well as other packages. For autotools, use a recipe like #configure.ac PKG_CHECK_MODULES([libnetfilter_queue], [libnetfilter_queue >= 1.0]) #Makefile.am AM_CPPFLAGS = ${libnetfilter_queue_CFLAGS} bin_PROGRAMS = myprog myprog_LDADD = ${libnetfilter_queue_LIBS} For other build systems (like cmake), see their documentation on how to integrate pkgconfig. Because the CPPFLAGS as obtained via pkgconfig contain an -I flag with the correct location, the appropriate include line is in all cases #include <libnetfilter_queue/libnetfilter_queue.h>
(In reply to comment #3) > Users of the library (and that includes further libraries) are to use pkgconfig > to determine the CPPFLAGS and LIBS of libnetfilter_queue as well as other > packages. For autotools, use a recipe like > > #configure.ac > PKG_CHECK_MODULES([libnetfilter_queue], [libnetfilter_queue >= 1.0]) > > #Makefile.am > AM_CPPFLAGS = ${libnetfilter_queue_CFLAGS} > bin_PROGRAMS = myprog > myprog_LDADD = ${libnetfilter_queue_LIBS} > > For other build systems (like cmake), see their documentation on how to > integrate pkgconfig. > Because the CPPFLAGS as obtained via pkgconfig contain an -I flag with the > correct location, the appropriate include line is in all cases > > #include <libnetfilter_queue/libnetfilter_queue.h> Thank you~ :D, I will go and learn those,Sorry for waste your time.
*** Bug 940896 has been marked as a duplicate of this bug. ***
*** Bug 964612 has been marked as a duplicate of this bug. ***
I know this is closed, but Suricata 3.1.2 is now using these same packages. 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
(In reply to Greg Freemyer from comment #7) > I know this is closed, but Suricata 3.1.2 is now using these same packages. > > 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 [1] https://redmine.openinfosecfoundation.org/projects/suricata/wiki/OpenSuse_Installation [2] https://redmine.openinfosecfoundation.org/issues/1525 [3] https://redmine.openinfosecfoundation.org/issues/1687 [4] https://github.com/inliniac/suricata/pull/2147
From: [1] https://redmine.openinfosecfoundation.org/projects/suricata/wiki/OpenSuse_Installation -- CPPFLAGS="-I/usr/include/libnetfilter_queue-1.0.2 -I/usr/include/libnfnetlink-1.0.1" ./configure \ --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-nfqueue --enable-lua -- Not exactly portable, nor future proof. What happens when v1.0.2 is updated to v1.0.3, etc. Some other links imply Suricata itself is now using pkg-config in the autotools logic to get the -I parameter, but without the explicit parameters passed to ./configure, I still got errors. If there is a better way to address this that doesn't use hardcoded paths, I'd appreciate knowing. I hope to submit suricata to factory in the not too distant future. FYI: I assume hardcoded paths would be rejected in a SR to facotry.
Well, anywhere you see a hardcoded path you can mostly substitute $(pkg-config libnetfilter_foo --cflags).
> Some other links imply Suricata itself is now using pkg-config in the > autotools logic to get the -I parameter, but without the explicit parameters > passed to ./configure, I still got errors. Can you, please, file your error-reports on https://redmine.openinfosecfoundation.org/ ? It's really interesting to make Suricata installation easy on openSUSE, but there's one unpleasant moment, when everybody waits other side to make the fist step.
(In reply to Mikhail Kasimov from comment #11) > > Some other links imply Suricata itself is now using pkg-config in the > > autotools logic to get the -I parameter, but without the explicit parameters > > passed to ./configure, I still got errors. > > Can you, please, file your error-reports on > https://redmine.openinfosecfoundation.org/ ? It's really interesting to make > Suricata installation easy on openSUSE, but there's one unpleasant moment, > when everybody waits other side to make the fist step. first* :)
(In reply to Mikhail Kasimov from comment #12) > (In reply to Mikhail Kasimov from comment #11) > > > Some other links imply Suricata itself is now using pkg-config in the > > > autotools logic to get the -I parameter, but without the explicit parameters > > > passed to ./configure, I still got errors. > > > > Can you, please, file your error-reports on > > https://redmine.openinfosecfoundation.org/ ? It's really interesting to make > > Suricata installation easy on openSUSE, but there's one unpleasant moment, > > when everybody waits other side to make the fist step. > > first* :) Done See https://redmine.openinfosecfoundation.org/issues/1525#note-22 where I told them the original problem continues.
(In reply to Greg Freemyer from comment #13) > (In reply to Mikhail Kasimov from comment #12) > > (In reply to Mikhail Kasimov from comment #11) > > > > Some other links imply Suricata itself is now using pkg-config in the > > > > autotools logic to get the -I parameter, but without the explicit parameters > > > > passed to ./configure, I still got errors. > > > > > > Can you, please, file your error-reports on > > > https://redmine.openinfosecfoundation.org/ ? It's really interesting to make > > > Suricata installation easy on openSUSE, but there's one unpleasant moment, > > > when everybody waits other side to make the fist step. > > > > first* :) > > Done > > See https://redmine.openinfosecfoundation.org/issues/1525#note-22 where I > told them the original problem continues. Yes, I've got message about Suricata 1525, thanks. Waiting for Victor's reaction...
(In reply to Jan Engelhardt from comment #10) > Well, anywhere you see a hardcoded path you can mostly substitute > $(pkg-config libnetfilter_foo --cflags). Jan, Since you're a factory reviewer, do you think it is better to directly modify CPPFLAGS as they do in the Suricata howto: -- CPPFLAGS="-I/usr/include/libnetfilter_queue-1.0.2 -I/usr/include/libnfnetlink-1.0.1" ./configure \ --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-nfqueue --enable-lua -- vs passing it in via the configure statement as security:monitoring/suricata is doing now: %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 I don't see any reason to prefer one over the other.
The --with-xxx=... thing in suricata.spec is the optically and technically most pleasing one. Nothing needs to be done here.
*** Bug 1089831 has been marked as a duplicate of this bug. ***
*** Bug 1089910 has been marked as a duplicate of this bug. ***
*** Bug 1089905 has been marked as a duplicate of this bug. ***
*** Bug 1089906 has been marked as a duplicate of this bug. ***
*** Bug 1089907 has been marked as a duplicate of this bug. ***
*** Bug 1089908 has been marked as a duplicate of this bug. ***
*** Bug 1089909 has been marked as a duplicate of this bug. ***
*** Bug 1169684 has been marked as a duplicate of this bug. ***
*** Bug 1089911 has been marked as a duplicate of this bug. ***
*** Bug 1214172 has been marked as a duplicate of this bug. ***
*** Bug 1218411 has been marked as a duplicate of this bug. ***