All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+
@ 2018-11-14  0:02 Alexander Sverdlin
  2018-11-14  2:40 ` Carlos Santos
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Sverdlin @ 2018-11-14  0:02 UTC (permalink / raw)
  To: buildroot

When building with glibc 2.23+, the "major", "minor" and "makedev"
functions are defined in "sys/sysmacros.h". The patch
"extlinux: pull in sys/sysmacros.h for major/minor/makedev",
applied to Syslinux during 2016Apr, should help. Please note that not
only Syslinux is affected by this change in glibc.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://www.syslinux.org/wiki/index.php?title=Building
---
 ...-sysmacros-h-for-major-minor-makedev.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch

diff --git a/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch b/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
new file mode 100644
index 0000000000..beba5cc245
--- /dev/null
+++ b/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
@@ -0,0 +1,34 @@
+From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 19 Apr 2016 06:50:31 -0400
+Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
+
+These functions are defined in sys/sysmacros.h, so add the include to
+main.c.  This is already handled correctly in mountinfo.c.  Otherwise
+we get build failures like:
+
+main.o: In function 'find_device_sysfs':
+extlinux/main.c:1131: undefined reference to 'minor'
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
+Signed-off-by: Alexander Sverdlin <alexader.sverdlin@gmail.com>
+---
+ extlinux/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/extlinux/main.c b/extlinux/main.c
+index a7ebd49..ebff7ea 100644
+--- a/extlinux/main.c
++++ b/extlinux/main.c
+@@ -38,6 +38,7 @@
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/vfs.h>
+-- 
+2.10.5.GIT
+
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+
  2018-11-14  0:02 [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+ Alexander Sverdlin
@ 2018-11-14  2:40 ` Carlos Santos
  2018-11-14  6:03 ` Baruch Siach
  2018-11-14  7:50 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Carlos Santos @ 2018-11-14  2:40 UTC (permalink / raw)
  To: buildroot

> From: "Alexander Sverdlin" <alexander.sverdlin@gmail.com>
> To: "buildroot" <buildroot@buildroot.org>
> Cc: "Alexander Sverdlin" <alexander.sverdlin@gmail.com>, "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>, "DATACOM"
> <casantos@datacom.com.br>
> Sent: Ter?a-feira, 13 de novembro de 2018 22:02:05
> Subject: [PATCH] boot/syslinux: Fix build with glibc 2.23+

> When building with glibc 2.23+, the "major", "minor" and "makedev"
> functions are defined in "sys/sysmacros.h". The patch
> "extlinux: pull in sys/sysmacros.h for major/minor/makedev",
> applied to Syslinux during 2016Apr, should help. Please note that not
> only Syslinux is affected by this change in glibc.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Link: https://www.syslinux.org/wiki/index.php?title=Building
> ---
> ...-sysmacros-h-for-major-minor-makedev.patch | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
> create mode 100644
> boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
> 
> diff --git
> a/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
> b/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
> new file mode 100644
> index 0000000000..beba5cc245
> --- /dev/null
> +++ b/boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch
> @@ -0,0 +1,34 @@
> +From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
> +From: Mike Frysinger <vapier@gentoo.org>
> +Date: Tue, 19 Apr 2016 06:50:31 -0400
> +Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
> +
> +These functions are defined in sys/sysmacros.h, so add the include to
> +main.c.  This is already handled correctly in mountinfo.c.  Otherwise
> +we get build failures like:
> +
> +main.o: In function 'find_device_sysfs':
> +extlinux/main.c:1131: undefined reference to 'minor'
> +
> +Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> +Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
> +Signed-off-by: Alexander Sverdlin <alexader.sverdlin@gmail.com>
> +---
> + extlinux/main.c | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/extlinux/main.c b/extlinux/main.c
> +index a7ebd49..ebff7ea 100644
> +--- a/extlinux/main.c
> ++++ b/extlinux/main.c
> +@@ -38,6 +38,7 @@
> + #include <sysexits.h>
> + #include <sys/ioctl.h>
> + #include <sys/stat.h>
> ++#include <sys/sysmacros.h>
> + #include <sys/types.h>
> + #include <sys/mount.h>
> + #include <sys/vfs.h>
> +--
> +2.10.5.GIT
> +
> --
> 2.19.1

Tested-by: Carlos Santos <casantos@datacom.com.br>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+
  2018-11-14  0:02 [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+ Alexander Sverdlin
  2018-11-14  2:40 ` Carlos Santos
@ 2018-11-14  6:03 ` Baruch Siach
  2018-11-14  7:50 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2018-11-14  6:03 UTC (permalink / raw)
  To: buildroot

Hi Alexander,

On Wed, Nov 14, 2018 at 01:02:05AM +0100, Alexander Sverdlin wrote:
> When building with glibc 2.23+, the "major", "minor" and "makedev"

Should be "glibc 2.28+". Ditto for the subject line.

> functions are defined in "sys/sysmacros.h". The patch
> "extlinux: pull in sys/sysmacros.h for major/minor/makedev",
> applied to Syslinux during 2016Apr, should help. Please note that not
> only Syslinux is affected by this change in glibc.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Link: https://www.syslinux.org/wiki/index.php?title=Building

This line should be above the sign-off as part of the commit log.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+
  2018-11-14  0:02 [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+ Alexander Sverdlin
  2018-11-14  2:40 ` Carlos Santos
  2018-11-14  6:03 ` Baruch Siach
@ 2018-11-14  7:50 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-14  7:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 14 Nov 2018 01:02:05 +0100, Alexander Sverdlin wrote:
> When building with glibc 2.23+, the "major", "minor" and "makedev"

It is really since glibc 2.28 that there is a build issue related to
this. Prior to glibc 2.28, <sys/sysmacros.h> was implicitly included by
another header that was very commonly included, "hiding" the issue.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-14  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14  0:02 [Buildroot] [PATCH] boot/syslinux: Fix build with glibc 2.23+ Alexander Sverdlin
2018-11-14  2:40 ` Carlos Santos
2018-11-14  6:03 ` Baruch Siach
2018-11-14  7:50 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.