Discussion:
[vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Martin Gansser
2018-09-28 08:21:39 UTC
Permalink
Hi,

i am trying to compile vdr-2.4.0 for Fedora 30 on the Fedora rpm build server, but this fails with the following error message [1]:

g++ -O3 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Werror=overloaded-virtual -Wno-parentheses -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/builddir/build/BUILD/vdr-2.4.0/include -c -DPLUGIN_NAME_I18N='"dvbhddevice"' -o dvbhdffdevice.o dvbhdffdevice.c
make: Leaving directory '/builddir/build/BUILD/vdr-2.4.0/PLUGINS/src/dvbhddevice'
dvbhdffdevice.c: In member function 'virtual int64_t cDvbHdFfDevice::GetSTC()':
dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
^~~~~~~~~~~~~
dvbhdffdevice.c:569:33: note: suggested alternative: 'VIDEO_GET_PTS'
if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
^~~~~~~~~~~~~
VIDEO_GET_PTS
make: *** [Makefile:64: dvbhdffdevice.o] Error 1

[1] https://kojipkgs.fedoraproject.org//work/tasks/6531/29936531/build.log

thanks
Martin
Martin Gansser
2018-09-28 09:04:44 UTC
Permalink
ok, the Fedora30 package [1] kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm contains the file /usr/include/linux/dvb/audio.h,
but definition
#define AUDIO_GET_PTS _IOR('o', 19, __u64)
fehlt.

[1] https://kojipkgs.fedoraproject.org//packages/kernel-headers/4.19.0/0.rc5.git2.1.fc30/x86_64/kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm
 
I don't know what to do, write to the packager, so he can put in this definition again ?
or is there a other solution ?

thanks
Martin

Gesendet: Freitag, 28. September 2018 um 10:45 Uhr
Von: "Klaus Schmidinger" <***@tvdr.de>
An: ***@linuxtv.org
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Post by Martin Gansser
...
dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
^~~~~~~~~~~~~
dvbhdffdevice.c:569:33: note: suggested alternative: 'VIDEO_GET_PTS'
if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
^~~~~~~~~~~~~
VIDEO_GET_PTS
AUDIO_GET_PTS is defined in /usr/include/linux/dvb/audio.h.
Maybe this isn't included correctly, or you have a wrong version of it?

Klaus

_______________________________________________
vdr mailing list
***@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Alexander Grothe
2018-09-28 10:02:42 UTC
Permalink
It seems this definition has been removed upstream, because it was
considered to be "unused":
https://github.com/torvalds/linux/commit/d21c249b26311dd193b100e65fc9e7ae96233d40#diff-56193b27b16cac28881a16f295c6ff3cL133

Am Fr., 28. Sep. 2018 um 11:22 Uhr schrieb Klaus Schmidinger <
Post by Martin Gansser
Post by Martin Gansser
ok, the Fedora30 package [1]
kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm contains the file
/usr/include/linux/dvb/audio.h,
Post by Martin Gansser
but definition
#define AUDIO_GET_PTS _IOR('o', 19, __u64)
fehlt.
[1]
https://kojipkgs.fedoraproject.org//packages/kernel-headers/4.19.0/0.rc5.git2.1.fc30/x86_64/kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm
Post by Martin Gansser
I don't know what to do, write to the packager, so he can put in this
definition again ?
The question is: why did he remove it in the first place?
Post by Martin Gansser
or is there a other solution ?
You could put it back in yourself ;-).
Or take the header file from a previous version, where it still worked.
Klaus
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Martin Gansser
2018-09-28 10:54:58 UTC
Permalink
I have opened a fedora ticket [1]

https://bugzilla.redhat.com/show_bug.cgi?id=1633979

thanks
Martin
 

Gesendet: Freitag, 28. September 2018 um 12:02 Uhr
Von: "Alexander Grothe" <***@googlemail.com>
An: "VDR Mailing List" <***@linuxtv.org>
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope

It seems this definition has been removed upstream, because it was considered to be "unused": https://github.com/torvalds/linux/commit/d21c249b26311dd193b100e65fc9e7ae96233d40#diff-56193b27b16cac28881a16f295c6ff3cL133 
Post by Martin Gansser
ok, the Fedora30 package [1] kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm contains the file /usr/include/linux/dvb/audio.h,
but definition
#define AUDIO_GET_PTS              _IOR('o', 19, __u64)
fehlt.
[1] https://kojipkgs.fedoraproject.org//packages/kernel-headers/4.19.0/0.rc5.git2.1.fc30/x86_64/kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm[https://kojipkgs.fedoraproject.org//packages/kernel-headers/4.19.0/0.rc5.git2.1.fc30/x86_64/kernel-headers-4.19.0-0.rc5.git2.1.fc30.x86_64.rpm]
   
I don't know what to do, write to the packager, so he can put in this definition again ?
The question is: why did he remove it in the first place?
Post by Martin Gansser
or is there a other solution ?
You could put it back in yourself ;-).
Or take the header file from a previous version, where it still worked.

Klaus
Alexander Grothe
2018-09-28 14:58:31 UTC
Permalink
He tried to remove AUDIO_GET_PTS in 2011:
https://github.com/torvalds/linux/commit/fa24198897ff0e8d34876be0e61f9b35d3c0d467
and had to revert it:
https://github.com/torvalds/linux/commit/7a2b66b1bd26d717763985bad401410665fa0672

Alexander
Post by Alexander Grothe
It seems this definition has been removed upstream, because it was
https://github.com/torvalds/linux/commit/d21c249b26311dd193b100e65fc9e7ae96233d40#diff-56193b27b16cac28881a16f295c6ff3cL133
...quite the expert, apparently ;-).
Klaus
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Jasmin J.
2018-09-28 18:05:04 UTC
Permalink
Hi!

This is obsolete since Kernel 4.8:
https://www.kernel.org/doc/html/v4.8/media/uapi/dvb/audio-get-pts.html
So VDR would already have needed to be changed quite some time ago.
I guess it is time to do it now.

In this particular case I would also suggest to create a patch for VDR 2.4.0,
so that people with the stable VDR version can still compile it with recent
Kernels.

BR,
Jasmin

*************************************************************************
Post by Martin Gansser
It seems this definition has been removed upstream, because it was considered
https://github.com/torvalds/linux/commit/d21c249b26311dd193b100e65fc9e7ae96233d40#diff-56193b27b16cac28881a16f295c6ff3cL133
...quite the expert, apparently ;-).
Klaus
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Jasmin J.
2018-09-30 10:47:53 UTC
Permalink
Hello!
Any idea why it was necessary to break these things?
No, I just used Google to find it.
BTW: I always thought that Linux kernel policy is not to allow userspace
applications to break. Apparently this is no longer the case :-(.
In general Kernel APIs do not change, but sometimes this happened in the past.
In the particular case the ioctl implementation within the Kernel was
completely removed long time ago thus they decided to remove the definition.
This define was even not used in Kernel 2.6.19.7! So this symbol is 11 years
depreciated/not existent already.

When an API is depreciated for so long time, it was time enough for application
developers to remove it. In fact it should have returned "ENOIOCTLCMD" since
ages.

Now with Kernel 4.19 it is gone, because they thought it was enough time for
all applications to remove it, I guess.
This is also an example, that User Space developers don't care about
depreciated APIs. So removing an API after 11 years is a good method to force
developers to do their homework, when they are not reading the documentation.
At least this is my opinion on that.

Best practice would be to print a warning in a logfile if an API returns, that
it is no longer existing. With that it shows up early and the developer will
be informed and can react.

BR,
Jasmin
Martin Gansser
2018-10-09 08:27:16 UTC
Permalink
Hello Klaus,

will you provide a kernel> = 4.8 patch or will I need to contact the kernel developer for this?

Martin

Gesendet: Sonntag, 30. September 2018 um 11:36 Uhr
Von: "Klaus Schmidinger" <***@tvdr.de>
An: ***@linuxtv.org
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Post by Jasmin J.
Hi!
https://www.kernel.org/doc/html/v4.8/media/uapi/dvb/audio-get-pts.html
So VDR would already have needed to be changed quite some time ago.
I guess it is time to do it now.
BTW: I always thought that Linux kernel policy is not to allow userspace applications
to break. Apparently this is no longer the case :-(.

Klaus

_______________________________________________
vdr mailing list
***@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr[https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr]
Jasmin Jessich
2018-10-09 09:23:51 UTC
Permalink
Hello Martin!

The Kernel maintainers removed it on purpose and in my opinion this was correct.
So asking the maintainers is useless at all.

BR,
Jasmin
Martin,
just in case you missed it, that is obviously an issue of
vdr-plugin-dvbhddevice and not core VDR, maintained by Klaus ...
Cheers
Frank
-----UrsprÃŒngliche Nachricht-----
Gesendet: Dienstag, 9. Oktober 2018 10:27
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was
not declared in this scope
Hello Klaus,
will you provide a kernel> = 4.8 patch or will I need to contact the
kernel developer for this?
Martin
Gesendet: Sonntag, 30. September 2018 um 11:36 Uhr
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was
Post by Jasmin J.
Hi!
https://www.kernel.org/doc/html/v4.8/media/uapi/dvb/audio-get-pts.html
Post by Jasmin J.
So VDR would already have needed to be changed quite some time ago.
I guess it is time to do it now.
BTW: I always thought that Linux kernel policy is not to allow
userspace applications to break. Apparently this is no longer the case
:-(.
Klaus
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr[https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr]
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
_______________________________________________
vdr mailing list
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Martin Gansser
2018-10-09 10:57:08 UTC
Permalink
Hi Klaus,

I will contact him.
Many Thank

Martin

Gesendet: Dienstag, 09. Oktober 2018 um 11:31 Uhr
Von: "Klaus Schmidinger" <***@tvdr.de>
An: ***@linuxtv.org
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Post by Martin Gansser
Hello Klaus,
will you provide a kernel> = 4.8 patch or will I need to contact the kernel developer for this?
Hello Martin,

please contact Andreas Regel <***@gmx.de> about this.
He maintains the dvbhddevice plugin.

Greetings
Klaus

_______________________________________________
vdr mailing list
***@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Martin Gansser
2018-10-10 09:46:29 UTC
Permalink
I have contacted Andreas.


On advice of Andreas, I have defined the IOCTL myself in the file dvbhdffdevice.h

this is the Patch: define_AUDIO_GET_PTS.patch
with this patch i get this warnings: [2]

--- vdr-2.4.0/PLUGINS/src/dvbhddevice/dvbhdffdevice.h.orig 2018-10-10 09:03:47.464147905 +0200
+++ vdr-2.4.0/PLUGINS/src/dvbhddevice/dvbhdffdevice.h 2018-10-10 09:04:59.353350738 +0200
@@ -4,6 +4,9 @@
* See the README file for copyright information and how to reach the author.
*/

+#ifndef AUDIO_GET_PTS _IOR('o', 19, __u64)
+#define AUDIO_GET_PTS _IOR('o', 19, __u64)
+#endif
#ifndef __DVBHDFFDEVICE_H
#define __DVBHDFFDEVICE_H


when the patch only have this line:
+#define AUDIO_GET_PTS _IOR('o', 19, __u64)
it compiles without warnings: [1]

[1] https://kojipkgs.fedoraproject.org//work/tasks/9241/30159241/build.log
[2] https://kojipkgs.fedoraproject.org//work/tasks/9649/30159649/build.log

what is correct ?

Thanks Martin
 

Gesendet: Dienstag, 09. Oktober 2018 um 11:31 Uhr
Von: "Klaus Schmidinger" <***@tvdr.de>
An: ***@linuxtv.org
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Post by Martin Gansser
Hello Klaus,
will you provide a kernel> = 4.8 patch or will I need to contact the kernel developer for this?
Hello Martin,

please contact Andreas Regel <***@gmx.de> about this.
He maintains the dvbhddevice plugin.

Greetings
Klaus

_______________________________________________
vdr mailing list
***@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Martin Gansser
2018-10-10 10:58:35 UTC
Permalink
Thanks for you help
Martin 

Gesendet: Mittwoch, 10. Oktober 2018 um 11:50 Uhr
Von: "Klaus Schmidinger" <***@tvdr.de>
An: ***@linuxtv.org
Betreff: Re: [vdr] dvbhdffdevice.c:569:33: error: 'AUDIO_GET_PTS' was not declared in this scope
Post by Martin Gansser
I have contacted Andreas.
On advice of Andreas, I have defined the IOCTL myself in the file dvbhdffdevice.h
this is the Patch: define_AUDIO_GET_PTS.patch
with this patch i get this warnings: [2]
--- vdr-2.4.0/PLUGINS/src/dvbhddevice/dvbhdffdevice.h.orig 2018-10-10 09:03:47.464147905 +0200
+++ vdr-2.4.0/PLUGINS/src/dvbhddevice/dvbhdffdevice.h 2018-10-10 09:04:59.353350738 +0200
@@ -4,6 +4,9 @@
* See the README file for copyright information and how to reach the author.
*/
+#ifndef AUDIO_GET_PTS _IOR('o', 19, __u64)
This should just be

#ifndef AUDIO_GET_PTS

Klaus

_______________________________________________
vdr mailing list
***@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Loading...