From: Duncan Roe <duncan_roe@optusnet.com.au>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Development <netfilter-devel@vger.kernel.org>
Subject: Building libnetfilter_queue has required kernel headers for some time
Date: Sat, 12 Oct 2024 12:30:14 +1100 [thread overview]
Message-ID: <ZwnRJreuOMiQqU0A@slk15.local.net> (raw)
Hi Pablo,
Just to clear up a misconception:
On Tue, Aug 10, 2021 at 06:09:06PM +0200, Pablo Neira Ayuso wrote:
> To ensure that a project compiles standalone (without the need for the
> system kernel header files), you can cache a copy of the header in
> your software tree (we use this trick for a while in userspace
> netfilter software).
The concept of a standalone build without kernel headers might have been valid
once, but is invalid nowadays.
I tried uninstalling the `kernel-headers` package and building.
I got the following 2 errors from multiple source files:
| In file included from /usr/include/errno.h:28,
| from libnetfilter_queue.c:29:
| /usr/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
| 26 | # include <linux/errno.h>
| | ^~~~~~~~~~~~~~~
| In file included from /usr/include/sys/socket.h:33,
| from /usr/include/netinet/in.h:23,
| from /usr/include/arpa/inet.h:22,
| from nlmsg.c:9:
| /usr/include/bits/socket.h:354:11: fatal error: asm/socket.h: No such file or directory
| 354 | # include <asm/socket.h>
| | ^~~~~~~~~~~~~~
To see if an older version of glibc didn't use kernel headers, I tried a build
from my Slackware 14.2 VM (2016-06-30). It failed in ./configure:
| checking how to run the C preprocessor... /lib/cpp
| configure: error: in `/dimstar/usr/src/libnetfilter_queue':
| configure: error: C preprocessor "/lib/cpp" fails sanity check
| See `config.log' for more details
config.log shows:
| | /* end confdefs.h. */
| | #ifdef __STDC__
| | # include <limits.h>
| | #else
| | # include <assert.h>
| | #endif
| | Syntax error
| configure:8489: /lib/cpp conftest.c
| In file included from /usr/include/bits/posix1_lim.h:160:0,
| from /usr/include/limits.h:143,
| from /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/include-fixed/limits.h:168,
| from /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/include-fixed/syslimits.h:7,
| from /usr/lib64/gcc/x86_64-slackware-linux/5.3.0/include-fixed/limits.h:34,
| from conftest.c:12:
| /usr/include/bits/local_lim.h:38:26: fatal error: linux/limits.h: No such file or directory
Cheers ... Duncan.
next reply other threads:[~2024-10-12 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 1:30 Duncan Roe [this message]
2024-10-12 13:42 ` Building libnetfilter_queue has required kernel headers for some time Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZwnRJreuOMiQqU0A@slk15.local.net \
--to=duncan_roe@optusnet.com.au \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.