* Building libnetfilter_queue has required kernel headers for some time
@ 2024-10-12 1:30 Duncan Roe
2024-10-12 13:42 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Duncan Roe @ 2024-10-12 1:30 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Netfilter Development
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Building libnetfilter_queue has required kernel headers for some time
2024-10-12 1:30 Building libnetfilter_queue has required kernel headers for some time Duncan Roe
@ 2024-10-12 13:42 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2024-10-12 13:42 UTC (permalink / raw)
To: Netfilter Development
On Sat, Oct 12, 2024 at 12:30:14PM +1100, Duncan Roe wrote:
> 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 am referring to netlink uapi files...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-12 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 1:30 Building libnetfilter_queue has required kernel headers for some time Duncan Roe
2024-10-12 13:42 ` Pablo Neira Ayuso
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.