All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libusbgx: fix build with glibc
@ 2018-08-22  7:20 Gwenhael Goavec-Merou
  2018-08-22 11:13 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Gwenhael Goavec-Merou @ 2018-08-22  7:20 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Without sys/sysmacros.h and with glibc build fails with error like:
libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `minor'
libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `major'
libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `makedev'

backport and adapt pr #28 (https://github.com/libusbgx/libusbgx/pull/28)

fix:
http://autobuild.buildroot.net/results/872e2ab084c0c9bf466265d2f66140fbba692ee6/

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 .../0001-Add-include-of-sys-sysmacro.h.patch       | 94 ++++++++++++++++++++++
 1 file changed, 94 insertions(+)
 create mode 100644 package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch

diff --git a/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch b/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch
new file mode 100644
index 0000000000..997cbf9a12
--- /dev/null
+++ b/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch
@@ -0,0 +1,94 @@
+Add include of sys/sysmacro.h.
+
+Without sys/sysmacros.h and with glibc build fails with error like:
+
+libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `minor'
+libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `major'
+libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `makedev'
+
+Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
+Signed-off-by: Sid Spry <R030t1@gmail.com>
+---
+ examples/gadget-acm-ecm.c              | 1 +
+ examples/gadget-import.c               | 1 +
+ examples/gadget-ms.c                   | 1 +
+ examples/show-gadgets.c                | 1 +
+ examples/show-udcs.c                   | 1 +
+ include/usbg/usbg_internal_libconfig.h | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
+index 1c5e2ca..29360da 100644
+--- a/examples/gadget-acm-ecm.c
++++ b/examples/gadget-acm-ecm.c
+@@ -20,6 +20,7 @@
+ 
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <linux/usb/ch9.h>
+ #include <usbg/usbg.h>
+ 
+diff --git a/examples/gadget-import.c b/examples/gadget-import.c
+index e684fdb..63df449 100644
+--- a/examples/gadget-import.c
++++ b/examples/gadget-import.c
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <usbg/usbg.h>
+ 
+ int main(int argc, char **argv)
+diff --git a/examples/gadget-ms.c b/examples/gadget-ms.c
+index 478c370..a5c6681 100644
+--- a/examples/gadget-ms.c
++++ b/examples/gadget-ms.c
+@@ -23,6 +23,7 @@
+ 
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <linux/usb/ch9.h>
+ #include <usbg/usbg.h>
+ #include <usbg/function/ms.h>
+diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c
+index 707d448..a2a21c8 100644
+--- a/examples/show-gadgets.c
++++ b/examples/show-gadgets.c
+@@ -21,6 +21,7 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/sysmacros.h>
+ #include <netinet/ether.h>
+ #include <usbg/usbg.h>
+ #include <usbg/function/ms.h>
+diff --git a/examples/show-udcs.c b/examples/show-udcs.c
+index 66e950f..2f5cc45 100644
+--- a/examples/show-udcs.c
++++ b/examples/show-udcs.c
+@@ -23,6 +23,7 @@
+ 
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <usbg/usbg.h>
+ 
+ int main(void)
+diff --git a/include/usbg/usbg_internal_libconfig.h b/include/usbg/usbg_internal_libconfig.h
+index ac51758..3fa55c0 100644
+--- a/include/usbg/usbg_internal_libconfig.h
++++ b/include/usbg/usbg_internal_libconfig.h
+@@ -12,6 +12,7 @@
+ #ifndef USBG_INTERNAL_LIBCONFIG_H
+ #define USBG_INTERNAL_LIBCONFIG_H
+ 
++#include <sys/sysmacros.h>
+ #include <libconfig.h>
+ #ifdef __cplusplus
+ extern "C" {
+-- 
+2.16.4
+
-- 
2.16.4

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

* [Buildroot] [PATCH] libusbgx: fix build with glibc
  2018-08-22  7:20 [Buildroot] [PATCH] libusbgx: fix build with glibc Gwenhael Goavec-Merou
@ 2018-08-22 11:13 ` Thomas Petazzoni
  2018-08-22 13:48   ` Gwenhael Goavec-Merou
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-22 11:13 UTC (permalink / raw)
  To: buildroot

Hello Gwenhael,

On Wed, 22 Aug 2018 09:20:02 +0200, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> Without sys/sysmacros.h and with glibc build fails with error like:
> libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `minor'
> libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `major'
> libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to `makedev'
> 
> backport and adapt pr #28 (https://github.com/libusbgx/libusbgx/pull/28)
> 
> fix:
> http://autobuild.buildroot.net/results/872e2ab084c0c9bf466265d2f66140fbba692ee6/
> 
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

This error only happened once so far, on the next branch. Is it related
to the bump of glibc 2.28 or is it also needed with older glibc
versions ?

I'm trying to figure out if this fix should be applied to the next
branch (where we have updated glibc to 2.28) or to master (where we
have glibc 2.27).

I would suspect it is related to glibc 2.28, otherwise the problem
would have already popped up on master. If that is the case, then the
commit log should say it's related to glibc 2.28.

Thanks,

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

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

* [Buildroot] [PATCH] libusbgx: fix build with glibc
  2018-08-22 11:13 ` Thomas Petazzoni
@ 2018-08-22 13:48   ` Gwenhael Goavec-Merou
  0 siblings, 0 replies; 3+ messages in thread
From: Gwenhael Goavec-Merou @ 2018-08-22 13:48 UTC (permalink / raw)
  To: buildroot

Hello,
On Wed, 22 Aug 2018 13:13:39 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello Gwenhael,
> 
> On Wed, 22 Aug 2018 09:20:02 +0200, Gwenhael Goavec-Merou wrote:
> > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> > 
> > Without sys/sysmacros.h and with glibc build fails with error like:
> > libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference to
> > `minor' libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined reference
> > to `major' libusbgx-libusbgx-v0.2.0/src/.libs/libusbgx.so: undefined
> > reference to `makedev'
> > 
> > backport and adapt pr #28 (https://github.com/libusbgx/libusbgx/pull/28)
> > 
> > fix:
> > http://autobuild.buildroot.net/results/872e2ab084c0c9bf466265d2f66140fbba692ee6/
> > 
> > Signed-off-by: Gwenhael Goavec-Merou
> > <gwenhael.goavec-merou@trabucayre.com>  
> 
> This error only happened once so far, on the next branch. Is it related
> to the bump of glibc 2.28 or is it also needed with older glibc
> versions ?
> 
> I'm trying to figure out if this fix should be applied to the next
> branch (where we have updated glibc to 2.28) or to master (where we
> have glibc 2.27).
> 
> I would suspect it is related to glibc 2.28, otherwise the problem
> would have already popped up on master. If that is the case, then the
> commit log should say it's related to glibc 2.28.
> 
True, I've forgot to specify branch. It's on next (ie glibc-2.28).
> Thanks,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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

end of thread, other threads:[~2018-08-22 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22  7:20 [Buildroot] [PATCH] libusbgx: fix build with glibc Gwenhael Goavec-Merou
2018-08-22 11:13 ` Thomas Petazzoni
2018-08-22 13:48   ` Gwenhael Goavec-Merou

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.