* [Buildroot] [PATCH] libusb: fix clock_gettime librt dependency check
@ 2018-06-05 11:42 Baruch Siach
2018-06-05 16:49 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2018-06-05 11:42 UTC (permalink / raw)
To: buildroot
The detection of the librt dependency of clock_gettime in glibc before
2.17 is broken. We do not support glibc older than 2.17 for target, but
we still need to support hosts using old glibc. Add a patch fixing that.
Should fix (host-imx-usb-loader):
http://autobuild.buildroot.net/results/0a1/0a156449e5f38a6092ab9c88e3e3f5ea9abc0f03/
http://autobuild.buildroot.net/results/347/347f1b9bce2f0854e8ca6d49b9a9b3fa55de24b1/
http://autobuild.buildroot.net/results/f6a/f6a3a62909ccb500ca122ec3f03119d7706fb88a/
Cc: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
...x-detection-of-clock_gettime-library.patch | 36 +++++++++++++++++++
package/libusb/libusb.mk | 2 ++
2 files changed, 38 insertions(+)
create mode 100644 package/libusb/0001-configure.ac-fix-detection-of-clock_gettime-library.patch
diff --git a/package/libusb/0001-configure.ac-fix-detection-of-clock_gettime-library.patch b/package/libusb/0001-configure.ac-fix-detection-of-clock_gettime-library.patch
new file mode 100644
index 000000000000..89b89bb5960a
--- /dev/null
+++ b/package/libusb/0001-configure.ac-fix-detection-of-clock_gettime-library.patch
@@ -0,0 +1,36 @@
+From 7cc67ed294ad8566f2877d6f71649f1bd36f69a4 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 5 Jun 2018 14:22:21 +0300
+Subject: [PATCH] configure.ac: fix detection of clock_gettime library
+
+glibc before 2.17 requires link with librt for clock_gettime(). The
+AC_SEARCH_LIBS check in configure.ac should detect this dependency.
+Unfortunately commit cb77a25e51 (configure.ac: Remove obsolete AC_ERROR
+and make formatting consistent) inadvertently renamed to clock_gettime2,
+thus breaking librt detection.
+
+Restore the correct clock_gettime() name.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/libusb/libusb/pull/439
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5b16c6825d4b..63590d1351a4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -107,7 +107,7 @@ case $backend in
+ linux)
+ AC_DEFINE(OS_LINUX, 1, [Linux backend])
+ AC_SUBST(OS_LINUX)
+- AC_SEARCH_LIBS([clock_gettime2], [rt], [], [], [-pthread])
++ AC_SEARCH_LIBS([clock_gettime], [rt], [], [], [-pthread])
+ AC_ARG_ENABLE([udev],
+ [AC_HELP_STRING([--enable-udev], [use udev for device enumeration and hotplug support (recommended) [default=yes]])],
+ [], [enable_udev=yes])
+--
+2.17.1
+
diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk
index 8d7aed1619cc..aee3622f8d8f 100644
--- a/package/libusb/libusb.mk
+++ b/package/libusb/libusb.mk
@@ -12,6 +12,8 @@ LIBUSB_LICENSE = LGPL-2.1+
LIBUSB_LICENSE_FILES = COPYING
LIBUSB_DEPENDENCIES = host-pkgconf
LIBUSB_INSTALL_STAGING = YES
+# Patching configure.ac
+LIBUSB_AUTORECONF = YES
# Avoid the discovery of udev for the host variant
HOST_LIBUSB_CONF_OPTS = --disable-udev
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] libusb: fix clock_gettime librt dependency check
2018-06-05 11:42 [Buildroot] [PATCH] libusb: fix clock_gettime librt dependency check Baruch Siach
@ 2018-06-05 16:49 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-06-05 16:49 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 5 Jun 2018 14:42:10 +0300, Baruch Siach wrote:
> The detection of the librt dependency of clock_gettime in glibc before
> 2.17 is broken. We do not support glibc older than 2.17 for target, but
> we still need to support hosts using old glibc. Add a patch fixing that.
>
> Should fix (host-imx-usb-loader):
> http://autobuild.buildroot.net/results/0a1/0a156449e5f38a6092ab9c88e3e3f5ea9abc0f03/
> http://autobuild.buildroot.net/results/347/347f1b9bce2f0854e8ca6d49b9a9b3fa55de24b1/
> http://autobuild.buildroot.net/results/f6a/f6a3a62909ccb500ca122ec3f03119d7706fb88a/
>
> Cc: Adam Duskett <aduskett@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> ...x-detection-of-clock_gettime-library.patch | 36 +++++++++++++++++++
> package/libusb/libusb.mk | 2 ++
> 2 files changed, 38 insertions(+)
> create mode 100644 package/libusb/0001-configure.ac-fix-detection-of-clock_gettime-library.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-05 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 11:42 [Buildroot] [PATCH] libusb: fix clock_gettime librt dependency check Baruch Siach
2018-06-05 16:49 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox