* [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors
@ 2017-01-14 21:28 Linus Lüssing
2017-01-15 0:50 ` Ben Hutchings
0 siblings, 1 reply; 4+ messages in thread
From: Linus Lüssing @ 2017-01-14 21:28 UTC (permalink / raw)
To: ben; +Cc: b.a.t.m.a.n, Daniel Borkmann, debian-kernel
Hi Ben and others,
Recently we stumbled upon some compile errors when trying to build
a backport version of the batman-adv kernel module for a 4.5 kernel [0]:
"implicit declaration of function ‘G_TC_AT’"
It seems VirtualBox has stumbled over this issue, too [1].
When trying to find the cause of these errors we noticed that the
headers directory created via "$ make-kpkg kernel_headers" for 4.5
kernel resulted in two differing header files with the same guard,
namely __LINUX_PKT_CLS_H:
https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4.5.0%2b/include/uapi/linux/pkt_cls.h
https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4.5.0%2b/include/linux/pkt_cls.h
The latter, the non-uapi version, has the "#ifdef __KERNEL__"
section stripped, causing the compile issue if it is included
before the uapi variant.
Removing this non-uapi version from the unpacked
linux-headers .deb package manually afterwards lets
a batman-adv compilation succeed again.
Daniel (CC) has helped a lot with debugging so far and he
expressed the suspicion that maybe make-kpkg might install
"$ make headers_install" into the wrong directory?
Regards, Linus
[0]: https://www.open-mesh.org/issues/322
[1]: https://www.virtualbox.org/ticket/15327
PS: make-kpkg was invoked on a Debian Jessie (kernel-package
13.014+nmu1).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors
2017-01-14 21:28 [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors Linus Lüssing
@ 2017-01-15 0:50 ` Ben Hutchings
2017-01-16 9:25 ` Daniel Borkmann
2017-04-24 19:27 ` Linus Lüssing
0 siblings, 2 replies; 4+ messages in thread
From: Ben Hutchings @ 2017-01-15 0:50 UTC (permalink / raw)
To: Linus Lüssing
Cc: b.a.t.m.a.n, Manoj Srivastava, Daniel Borkmann, debian-kernel
[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]
kernel-package is maintained by Manoj Srivastava (cc'd), not the kernel
team.
Ben.
On Sat, 2017-01-14 at 22:28 +0100, Linus Lüssing wrote:
> Hi Ben and others,
>
> Recently we stumbled upon some compile errors when trying to build
> a backport version of the batman-adv kernel module for a 4.5 kernel
> [0]:
>
> "implicit declaration of function ‘G_TC_AT’"
>
> It seems VirtualBox has stumbled over this issue, too [1].
>
> When trying to find the cause of these errors we noticed that the
> headers directory created via "$ make-kpkg kernel_headers" for 4.5
> kernel resulted in two differing header files with the same guard,
> namely __LINUX_PKT_CLS_H:
>
> https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
> .5.0%2b/include/uapi/linux/pkt_cls.h
> https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
> .5.0%2b/include/linux/pkt_cls.h
>
> The latter, the non-uapi version, has the "#ifdef __KERNEL__"
> section stripped, causing the compile issue if it is included
> before the uapi variant.
>
> Removing this non-uapi version from the unpacked
> linux-headers .deb package manually afterwards lets
> a batman-adv compilation succeed again.
>
> Daniel (CC) has helped a lot with debugging so far and he
> expressed the suspicion that maybe make-kpkg might install
> "$ make headers_install" into the wrong directory?
>
> Regards, Linus
>
> [0]: https://www.open-mesh.org/issues/322
> [1]: https://www.virtualbox.org/ticket/15327
>
> PS: make-kpkg was invoked on a Debian Jessie (kernel-package
> 13.014+nmu1).
--
Ben Hutchings
Hoare's Law of Large Problems:
Inside every large problem is a small problem struggling to get
out.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors
2017-01-15 0:50 ` Ben Hutchings
@ 2017-01-16 9:25 ` Daniel Borkmann
2017-04-24 19:27 ` Linus Lüssing
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2017-01-16 9:25 UTC (permalink / raw)
To: Ben Hutchings, Linus Lüssing
Cc: b.a.t.m.a.n, Manoj Srivastava, debian-kernel
On 01/15/2017 01:50 AM, Ben Hutchings wrote:
> kernel-package is maintained by Manoj Srivastava (cc'd), not the kernel
> team.
>
> Ben.
>
> On Sat, 2017-01-14 at 22:28 +0100, Linus Lüssing wrote:
>> Hi Ben and others,
>>
>> Recently we stumbled upon some compile errors when trying to build
>> a backport version of the batman-adv kernel module for a 4.5 kernel
>> [0]:
>>
>> "implicit declaration of function ‘G_TC_AT’"
>>
>> It seems VirtualBox has stumbled over this issue, too [1].
>>
>> When trying to find the cause of these errors we noticed that the
>> headers directory created via "$ make-kpkg kernel_headers" for 4.5
>> kernel resulted in two differing header files with the same guard,
>> namely __LINUX_PKT_CLS_H:
>>
>> https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
>> .5.0%2b/include/uapi/linux/pkt_cls.h
>> https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
>> .5.0%2b/include/linux/pkt_cls.h
>>
>> The latter, the non-uapi version, has the "#ifdef __KERNEL__"
>> section stripped, causing the compile issue if it is included
>> before the uapi variant.
>>
>> Removing this non-uapi version from the unpacked
>> linux-headers .deb package manually afterwards lets
>> a batman-adv compilation succeed again.
>>
>> Daniel (CC) has helped a lot with debugging so far and he
>> expressed the suspicion that maybe make-kpkg might install
>> "$ make headers_install" into the wrong directory?
Just to elaborate why I think it's strange, from above link the
include/linux/ directory contains the normal kernel headers we
have in the source tree, and the include/uapi/linux/ the expected
uapi headers. However, the post-processed uapi header files can
also be found in include/linux/. For example, if there's a name
collision (bpf.h as one example), then the post-processed uapi
header was not installed into include/linux/ and the normal kernel
header can still be seen there. If there was no naming collision
like in pkt_cls.h case, then it gets installed into include/linux/
as well. That seems at least rather strange to me, unless there's
a good reason for doing that which I'm not aware of.
>> Regards, Linus
>>
>> [0]: https://www.open-mesh.org/issues/322
>> [1]: https://www.virtualbox.org/ticket/15327
>>
>> PS: make-kpkg was invoked on a Debian Jessie (kernel-package
>> 13.014+nmu1).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors
2017-01-15 0:50 ` Ben Hutchings
2017-01-16 9:25 ` Daniel Borkmann
@ 2017-04-24 19:27 ` Linus Lüssing
1 sibling, 0 replies; 4+ messages in thread
From: Linus Lüssing @ 2017-04-24 19:27 UTC (permalink / raw)
To: Ben Hutchings, Manoj Srivastava
Cc: b.a.t.m.a.n, debian-kernel, Daniel Borkmann, Dmitry V. Levin
Hi Ben,
Due to the missing response we went for a workaround in the
out-of-tree backports version of batman-adv for now.
However, it seems a similar issue now popped up with 4.11-rc1
again: [0] ("fatal error: sys/socket.h: No such file or directory")
Second try: Manoj, do you see a chance to fix these two issues
([0][1]) in kernel-package or is this package currently
unmaintained?
Anything I can help with for further debugging in kernel-package?
Regards, Linus
[0]: https://www.open-mesh.org/issues/333
[1]: https://www.open-mesh.org/issues/322
On Sun, Jan 15, 2017 at 12:50:52AM +0000, Ben Hutchings wrote:
> kernel-package is maintained by Manoj Srivastava (cc'd), not the kernel
> team.
>
> Ben.
>
> On Sat, 2017-01-14 at 22:28 +0100, Linus Lüssing wrote:
> > Hi Ben and others,
> >
> > Recently we stumbled upon some compile errors when trying to build
> > a backport version of the batman-adv kernel module for a 4.5 kernel
> > [0]:
> >
> > "implicit declaration of function ‘G_TC_AT’"
> >
> > It seems VirtualBox has stumbled over this issue, too [1].
> >
> > When trying to find the cause of these errors we noticed that the
> > headers directory created via "$ make-kpkg kernel_headers" for 4.5
> > kernel resulted in two differing header files with the same guard,
> > namely __LINUX_PKT_CLS_H:
> >
> > https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
> > .5.0%2b/include/uapi/linux/pkt_cls.h
> > https://metameute.de/~tux/batman-adv/net-sched-issues/linux-headers-4
> > .5.0%2b/include/linux/pkt_cls.h
> >
> > The latter, the non-uapi version, has the "#ifdef __KERNEL__"
> > section stripped, causing the compile issue if it is included
> > before the uapi variant.
> >
> > Removing this non-uapi version from the unpacked
> > linux-headers .deb package manually afterwards lets
> > a batman-adv compilation succeed again.
> >
> > Daniel (CC) has helped a lot with debugging so far and he
> > expressed the suspicion that maybe make-kpkg might install
> > "$ make headers_install" into the wrong directory?
> >
> > Regards, Linus
> >
> > [0]: https://www.open-mesh.org/issues/322
> > [1]: https://www.virtualbox.org/ticket/15327
> >
> > PS: make-kpkg was invoked on a Debian Jessie (kernel-package
> > 13.014+nmu1).
> --
> Ben Hutchings
> Hoare's Law of Large Problems:
> Inside every large problem is a small problem struggling to get
> out.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-24 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-14 21:28 [B.A.T.M.A.N.] Duplicate #include guards with make-kpkg / out-of-tree compile errors Linus Lüssing
2017-01-15 0:50 ` Ben Hutchings
2017-01-16 9:25 ` Daniel Borkmann
2017-04-24 19:27 ` Linus Lüssing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).