Bug#964220: vdr: FTBFS with glibc 2.31 (uses removed stime function)
control: tag -1 + pending Dear maintainer, On 2020-07-13 23:41, Aurelien Jarno wrote: > control: severity -1 serious > > On 2020-07-03 22:12, Aurelien Jarno wrote: > > Source: vdr > > Version: 2.4.1-4 > > Severity: important > > Tags: patch upstream > > > > Dear maintainer, > > > > vdr fail to build from source with glibc 2.31: > > > > | g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 > > -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat > > -Werror=format-security -fPIC -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 > > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY > > -DLIRC_DEVICE=\"/var/run/lirc/lircd\" -DVIDEODIR=\"/var/lib/video\" > > -DCONFDIR=\"/var/lib/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" > > -DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" > > -DPLUGINDIR=\"/usr/lib/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" > > -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -o > > eitscan.o eitscan.c > > | eit.c: In constructor ‘cTDT::cTDT(const u_char*)’: > > | eit.c:394:13: error: ‘stime’ was not declared in this scope; did you mean > > ‘ctime’? > > | 394 | if (stime() == 0) > > | | ^ > > | | ctime > > | make[2]: *** [Makefile:135: eit.o] Error 1 > > | make[2]: *** Waiting for unfinished jobs > > | make[2]: Leaving directory '/<>' > > | dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" > > PREFIX=/usr VIDEODIR=/var/lib/video LIBDIR=/usr/lib/vdr/plugins SDNOTIFY=1 > > VERBOSE=1 returned exit code 2 > > | make[1]: *** [debian/rules:17: override_dh_auto_build] Error 25 > > | make[1]: Leaving directory '/<>' > > | make: *** [debian/rules:14: build] Error 2 > > | dpkg-buildpackage: error: debian/rules build subprocess returned exit > > status 2 > > > > The full build log is available there: > > http://qa-logs.debian.net/2020/06/24/vdr_2.4.1-4_unstable_glibc-exp.log > > > > The stime function has been marked as obsolete for some time, and since > > glibc 2.31 it is no longer available to newly linked binaries. The > > clock_settime function should be used instead. > > > > You will find attached a patch fixing that. It would be nice if it can > > be fixed relatively soon so that we can start the transition. > > Note that glibc 2.31 is now in unstable. I am therefore increasing the > severity to serious. I have prepared an NMU for vdr (versioned as 2.4.1-4.), fixing the build issue with glibc 2.31. You will find the diff attached. I have uploaded it to DELAYED/7. Please feel free to tell me if I should delay it longer or cancel it altogether. Regards, Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net diff -Nru vdr-2.4.1/debian/changelog vdr-2.4.1/debian/changelog --- vdr-2.4.1/debian/changelog 2019-11-01 12:11:11.0 + +++ vdr-2.4.1/debian/changelog 2020-07-19 17:22:51.0 + @@ -1,3 +1,11 @@ +vdr (2.4.1-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add a patch to replace the obsolete stime function (removed in glibc 2.31) +by clock_settime. (Closes: #964220) + + -- Aurelien Jarno Sun, 19 Jul 2020 19:22:51 +0200 + vdr (2.4.1-4) unstable; urgency=medium * Dropped python build dependency - not actually used in build diff -Nru vdr-2.4.1/debian/patches/glibc-stime.patch vdr-2.4.1/debian/patches/glibc-stime.patch --- vdr-2.4.1/debian/patches/glibc-stime.patch 1970-01-01 00:00:00.0 + +++ vdr-2.4.1/debian/patches/glibc-stime.patch 2020-07-19 17:22:51.0 + @@ -0,0 +1,15 @@ +The obsolete stime function is no longer available to newly linked binaries +since glibc 2.31. Replace it by clock_settime. + +--- a/eit.c b/eit.c +@@ -391,7 +391,8 @@ cTDT::cTDT(const u_char *Data) + if (abs(diff) > MAX_TIME_DIFF) { + mutex.Lock(); + if (abs(diff) > MAX_ADJ_DIFF) { +-if (stime() == 0) ++struct timespec ts = { .tv_sec = dvbtim }; ++if (clock_settime(CLOCK_REALTIME, ) == 0) +isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(dvbtim), dvbtim); + else +esyslog("ERROR while setting system time: %m"); diff -Nru vdr-2.4.1/debian/patches/series vdr-2.4.1/debian/patches/series --- vdr-2.4.1/debian/patches/series 2019-11-01 12:11:11.0 + +++ vdr-2.4.1/debian/patches/series 2020-07-19 17:22:51.0 + @@ -6,3 +6,4 @@ allow-verbose-libsi-build.patch use-cpp-flags.patch configurable-pkg-config.patch +glibc-stime.patch
Bug#964220: vdr: FTBFS with glibc 2.31 (uses removed stime function)
control: severity -1 serious On 2020-07-03 22:12, Aurelien Jarno wrote: > Source: vdr > Version: 2.4.1-4 > Severity: important > Tags: patch upstream > > Dear maintainer, > > vdr fail to build from source with glibc 2.31: > > | g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 > -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat > -Werror=format-security -fPIC -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 > -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY > -DLIRC_DEVICE=\"/var/run/lirc/lircd\" -DVIDEODIR=\"/var/lib/video\" > -DCONFDIR=\"/var/lib/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" > -DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" > -DPLUGINDIR=\"/usr/lib/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" > -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -o > eitscan.o eitscan.c > | eit.c: In constructor ‘cTDT::cTDT(const u_char*)’: > | eit.c:394:13: error: ‘stime’ was not declared in this scope; did you mean > ‘ctime’? > | 394 | if (stime() == 0) > | | ^ > | | ctime > | make[2]: *** [Makefile:135: eit.o] Error 1 > | make[2]: *** Waiting for unfinished jobs > | make[2]: Leaving directory '/<>' > | dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" > PREFIX=/usr VIDEODIR=/var/lib/video LIBDIR=/usr/lib/vdr/plugins SDNOTIFY=1 > VERBOSE=1 returned exit code 2 > | make[1]: *** [debian/rules:17: override_dh_auto_build] Error 25 > | make[1]: Leaving directory '/<>' > | make: *** [debian/rules:14: build] Error 2 > | dpkg-buildpackage: error: debian/rules build subprocess returned exit > status 2 > > The full build log is available there: > http://qa-logs.debian.net/2020/06/24/vdr_2.4.1-4_unstable_glibc-exp.log > > The stime function has been marked as obsolete for some time, and since > glibc 2.31 it is no longer available to newly linked binaries. The > clock_settime function should be used instead. > > You will find attached a patch fixing that. It would be nice if it can > be fixed relatively soon so that we can start the transition. Note that glibc 2.31 is now in unstable. I am therefore increasing the severity to serious. Regards, Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net
Bug#964220: vdr: FTBFS with glibc 2.31 (uses removed stime function)
Source: vdr Version: 2.4.1-4 Severity: important Tags: patch upstream Dear maintainer, vdr fail to build from source with glibc 2.31: | g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DSDNOTIFY -DLIRC_DEVICE=\"/var/run/lirc/lircd\" -DVIDEODIR=\"/var/lib/video\" -DCONFDIR=\"/var/lib/vdr\" -DARGSDIR=\"/etc/vdr/conf.d\" -DCACHEDIR=\"/var/cache/vdr\" -DRESDIR=\"/usr/share/vdr\" -DPLUGINDIR=\"/usr/lib/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -o eitscan.o eitscan.c | eit.c: In constructor ‘cTDT::cTDT(const u_char*)’: | eit.c:394:13: error: ‘stime’ was not declared in this scope; did you mean ‘ctime’? | 394 | if (stime() == 0) | | ^ | | ctime | make[2]: *** [Makefile:135: eit.o] Error 1 | make[2]: *** Waiting for unfinished jobs | make[2]: Leaving directory '/<>' | dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" PREFIX=/usr VIDEODIR=/var/lib/video LIBDIR=/usr/lib/vdr/plugins SDNOTIFY=1 VERBOSE=1 returned exit code 2 | make[1]: *** [debian/rules:17: override_dh_auto_build] Error 25 | make[1]: Leaving directory '/<>' | make: *** [debian/rules:14: build] Error 2 | dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 The full build log is available there: http://qa-logs.debian.net/2020/06/24/vdr_2.4.1-4_unstable_glibc-exp.log The stime function has been marked as obsolete for some time, and since glibc 2.31 it is no longer available to newly linked binaries. The clock_settime function should be used instead. You will find attached a patch fixing that. It would be nice if it can be fixed relatively soon so that we can start the transition. Regards, Aurelien diff -Nru vdr-2.4.1/debian/patches/glibc-stime.patch vdr-2.4.1/debian/patches/glibc-stime.patch --- vdr-2.4.1/debian/patches/glibc-stime.patch 1970-01-01 00:00:00.0 + +++ vdr-2.4.1/debian/patches/glibc-stime.patch 2020-07-03 18:47:22.0 + @@ -0,0 +1,15 @@ +The obsolete function stime is no longer available to newly linked binaries +since glibc 2.31. Replace it by clock_settime. + +--- a/eit.c b/eit.c +@@ -391,7 +391,8 @@ cTDT::cTDT(const u_char *Data) + if (abs(diff) > MAX_TIME_DIFF) { + mutex.Lock(); + if (abs(diff) > MAX_ADJ_DIFF) { +-if (stime() == 0) ++struct timespec ts = { .tv_sec = dvbtim }; ++if (clock_settime(CLOCK_REALTIME, ) == 0) +isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(dvbtim), dvbtim); + else +esyslog("ERROR while setting system time: %m"); diff -Nru vdr-2.4.1/debian/patches/series vdr-2.4.1/debian/patches/series --- vdr-2.4.1/debian/patches/series 2019-11-01 12:11:11.0 + +++ vdr-2.4.1/debian/patches/series 2020-07-03 18:45:29.0 + @@ -6,3 +6,4 @@ allow-verbose-libsi-build.patch use-cpp-flags.patch configurable-pkg-config.patch +glibc-stime.patch