Source: dvd+rw-tools Version: 7.1-13 Severity: serious Tags: patch ftbfs Justification: fails to build from source (but built successfully in the past) User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu disco ubuntu-patch
Dear Maintainer, dvd+rw-tools currently fails to build from source with glibc 2.28 because they changed the way the 'major' and 'minor' macros can be accessed. [1] Specifically: * The macros 'major', 'minor', and 'makedev' are now only available from the header <sys/sysmacros.h>; not from <sys/types.h> or various other headers that happen to include <sys/types.h>. These macros are rarely used, not part of POSIX nor XSI, and their names frequently collide with user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for further explanation. <sys/sysmacros.h> is a GNU extension. Portable programs that require these macros should first include <sys/types.h>, and then include <sys/sysmacros.h> if __GNU_LIBRARY__ is defined. We saw the following errors while building in Ubuntu accordingly: growisofs.o growisofs_mmc.o -lpthread -o growisofs /usr/bin/ld: growisofs.o: in function `find_raw_device': ./growisofs.c:658: undefined reference to `major' /usr/bin/ld: ./growisofs.c:659: undefined reference to `minor' /usr/bin/ld: growisofs.o: in function `grab_sg': ./growisofs.c:704: undefined reference to `minor' collect2: error: ld returned 1 exit status This is reproducible in sid as well. In Ubuntu, the attached patch was applied to achieve the following: * debian/patches/glibc-2.28.patch: Fix FTBFS with glibc >= 2.28. Thanks for considering the patch. Logan Rosen [1] https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html -- System Information: Debian Release: buster/sid APT prefers cosmic-updates APT policy: (500, 'cosmic-updates'), (500, 'cosmic-security'), (500, 'cosmic'), (400, 'cosmic-proposed'), (100, 'cosmic-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.18.0-12-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru dvd+rw-tools-7.1/debian/patches/glibc-2.28.patch dvd+rw-tools-7.1/debian/patches/glibc-2.28.patch --- dvd+rw-tools-7.1/debian/patches/glibc-2.28.patch 1969-12-31 19:00:00.000000000 -0500 +++ dvd+rw-tools-7.1/debian/patches/glibc-2.28.patch 2018-12-11 23:42:00.000000000 -0500 @@ -0,0 +1,26 @@ +--- a/growisofs.c ++++ b/growisofs.c +@@ -444,6 +444,10 @@ + #include <assert.h> + #include "mp.h" + ++#if defined(__GNU_LIBRARY__) ++# include <sys/sysmacros.h> ++#endif ++ + #if defined(__unix) || defined(__unix__) + # include <unistd.h> + # include <sys/time.h> +--- a/transport.hxx ++++ b/transport.hxx +@@ -53,6 +53,10 @@ + #define ENV_LOCALE ".OCP" + #endif + ++#if defined(__GNU_LIBRARY__) ++# include <sys/sysmacros.h> ++#endif ++ + #include "asctable.h" + + #define CREAM_ON_ERRNO_NAKED(s) \ diff -Nru dvd+rw-tools-7.1/debian/patches/series dvd+rw-tools-7.1/debian/patches/series --- dvd+rw-tools-7.1/debian/patches/series 2018-10-09 10:05:01.000000000 -0400 +++ dvd+rw-tools-7.1/debian/patches/series 2018-12-11 23:38:51.000000000 -0500 @@ -10,3 +10,4 @@ ignore_pseudo_overwrite.patch 10-blue-ray-bug713016.patch fix_burning_bd-r_discs.patch +glibc-2.28.patch