Userspace issue with DVB driver includes
Hello! I think it was the change from asm/types.h to linux/types.h: -#include asm/types.h +#include linux/types.h ...which somehow broke the VDR build with recent DVB driver releases (see snippet A below). The common workaround/solution to this seems to be to add a -D__KERNEL_STRICT_NAMES. But this feels wrong to me. Reordering the includes and making sure sys/* is included before linux/* solves this issue too. But ideally the include order shouldn't matter at all. So my question is: How to deal with this? What's the recommended way for userspace applications to include linux/dvb headers? Here's a small example, that fails to compile with 2.6.29: // #include sys/types.h // #define __KERNEL_STRICT_NAMES #include linux/dvb/frontend.h #include linux/dvb/video.h int main() { return 0; } Two workarounds to this problem are to define __KERNEL_STRICT_NAMES or including sys/* before the linux/dvb includes. Any comments, suggestions? Please see also: http://www.linuxtv.org/pipermail/linux-dvb/2009-March/031934.html bye, Tobias --- snippet A --- In file included from /usr/include/netinet/in.h:24, from /usr/include/arpa/inet.h:23, from config.h:13, from channels.h:13, from device.h:13, from dvbdevice.h:15, from dvbdevice.c:10: /usr/include/stdint.h:41: error: conflicting declaration 'typedef long int int64_t' /usr/include/linux/types.h:98: error: 'int64_t' has a previous declaration as 'typedef __s64 int64_t' /usr/include/stdint.h:56: error: conflicting declaration 'typedef long unsigned int uint64_t' /usr/include/linux/types.h:96: error: 'uint64_t' has a previous declaration as 'typedef __u64 uint64_t' -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
On Thu, 09 Apr 2009 09:17:20 +0200 Tobi listacco...@e-tobi.net wrote: Hello! I think it was the change from asm/types.h to linux/types.h: -#include asm/types.h +#include linux/types.h ...which somehow broke the VDR build with recent DVB driver releases (see snippet A below). The common workaround/solution to this seems to be to add a -D__KERNEL_STRICT_NAMES. But this feels wrong to me. Reordering the includes and making sure sys/* is included before linux/* solves this issue too. But ideally the include order shouldn't matter at all. So my question is: How to deal with this? What's the recommended way for userspace applications to include linux/dvb headers? Here's a small example, that fails to compile with 2.6.29: // #include sys/types.h // #define __KERNEL_STRICT_NAMES #include linux/dvb/frontend.h #include linux/dvb/video.h int main() { return 0; } Two workarounds to this problem are to define __KERNEL_STRICT_NAMES or including sys/* before the linux/dvb includes. Any comments, suggestions? Hi Tobi, I suspect that this were the upstream change that affected your work, right? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b852d36b86902abb272b0f2dd7a56dd2d17ea88c There are two changesets that will likely fix this issue: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85efde6f4e0de9577256c5f0030088d3fd4347c1 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9adfbfb611307060db54691bc7e6d53fdc12312b Could you please try to apply they on 2.6.29 and see if those will solve the issue? If so, then we should probably add those on 2.6.29.2. Anyway, in order to keep v4l-dvb aligned with upstream, I'll backport the above changesets into the development tree. Please see also: http://www.linuxtv.org/pipermail/linux-dvb/2009-March/031934.html bye, Tobias --- snippet A --- In file included from /usr/include/netinet/in.h:24, from /usr/include/arpa/inet.h:23, from config.h:13, from channels.h:13, from device.h:13, from dvbdevice.h:15, from dvbdevice.c:10: /usr/include/stdint.h:41: error: conflicting declaration 'typedef long int int64_t' /usr/include/linux/types.h:98: error: 'int64_t' has a previous declaration as 'typedef __s64 int64_t' /usr/include/stdint.h:56: error: conflicting declaration 'typedef long unsigned int uint64_t' /usr/include/linux/types.h:96: error: 'uint64_t' has a previous declaration as 'typedef __u64 uint64_t' -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Cheers, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
Hi Mauro, Mauro Carvalho Chehab wrote: I suspect that this were the upstream change that affected your work, right? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b852d36b86902abb272b0f2dd7a56dd2d17ea88c Yes, at least I thought so. There are two changesets that will likely fix this issue: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85efde6f4e0de9577256c5f0030088d3fd4347c1 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9adfbfb611307060db54691bc7e6d53fdc12312b Could you please try to apply they on 2.6.29 and see if those will solve the issue? If so, then we should probably add those on 2.6.29.2. I've applied both patches to 2.6.29.1, but the problem still remains. It's hard to figure out, who to blame for this. Tobias -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
On Thu, 09 Apr 2009 18:32:01 +0200 Tobi listacco...@e-tobi.net wrote: Hi Mauro, Mauro Carvalho Chehab wrote: I suspect that this were the upstream change that affected your work, right? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b852d36b86902abb272b0f2dd7a56dd2d17ea88c Yes, at least I thought so. There are two changesets that will likely fix this issue: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=85efde6f4e0de9577256c5f0030088d3fd4347c1 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9adfbfb611307060db54691bc7e6d53fdc12312b Could you please try to apply they on 2.6.29 and see if those will solve the issue? If so, then we should probably add those on 2.6.29.2. I've applied both patches to 2.6.29.1, but the problem still remains. It's hard to figure out, who to blame for this. If you're compiling with a new kernel, you'll be expected to have installed the new kernel headers at /usr/include/linux. This is done by using make headers_install at the kernel tree. Could you please try to do make headers_install and see if the problem persists? If the problem will still persist, then the better procedure is to open a bugzilla at bugzilla.kernel.org, and post an email about this at LKML, keeping LMML c/c, for us to follow the discussions. Cheers, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
Tobi wrote: I've applied both patches to 2.6.29.1, but the problem still remains. It's hard to figure out, who to blame for this. The root of the problem seems to be a clash between linux/types.h which defines some POSIX types also defined in glibc's stdint.h. I'm not sure, who to blame for this glibc or the kernel... The problem seems not to be restricted to the DVB drivers, so this is probably the wrong list, but any comments are welcome! Tobias -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
Mauro Carvalho Chehab wrote: If you're compiling with a new kernel, you'll be expected to have installed the new kernel headers at /usr/include/linux. Of course I've installed the kernel headers. After all these headers are causing the trouble. The change from asm/types.h to linux/types.h causes some POSIX types beeing declared, which are also defined in glibc's stdint.h. persists? If the problem will still persist, then the better procedure is to open a bugzilla at bugzilla.kernel.org, and post an email about this at LKML, keeping As soon as I've decided whether it is a glibc or kernel issue, I'll do so. Thanks for your help! Tobias -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Userspace issue with DVB driver includes
Mauro Carvalho Chehab wrote: persists? If the problem will still persist, then the better procedure is to open a bugzilla at bugzilla.kernel.org, and post an email about this at LKML, keeping LMML c/c, for us to follow the discussions. Just for the record: Arnd Bergmann already prepared a patch for this, which unfortunately didn't made it into 2.6.29. The changesets you suggested were from Arnd Bergmann's patchset, but I think at least these changes would be required too: http://git.kernel.org/?p=linux/kernel/git/jaswinder/linux-2.6-tip.git;a=commit;h=3a471cbc081b6bf2b58a48db13d734ecd3b0d437 (haven't tested it yet with just those three changesets) See: http://lkml.indiana.edu/hypermail/linux/kernel/0902.3/index.html#00955 http://git.kernel.org/?p=linux/kernel/git/jaswinder/linux-2.6-tip.git;a=shortlog;h=core/header-fixes I've just applied the whole patchset from the core/header-fixes branch and it works fine. (Thx to Anssi Hannula for pointing me into the right direction: http://lkml.indiana.edu/hypermail/linux/kernel/0902.3/00411.html) Tobias -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html