* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
@ 2018-06-17 17:51 Dan Walkes
2018-06-17 18:07 ` Baruch Siach
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Dan Walkes @ 2018-06-17 17:51 UTC (permalink / raw)
To: buildroot
Hidapi source uses iconv_open UTF-16 conversion [1] which requires
gconv libararies when buiding with glibc in order to successfully
find serial number, manufacturer and product strings [2].
Use select in the config file to autmatically select gconv libararies
for inclusion on the target when building with glibc
Tested with ./utils/test-pkg -c hidapi.cfg -p hidapi and hidapi.cfg file
contents:
BR2_PACKAGE_HIDAPI=y
BR2_PACKAGE_EUDEV=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_USE_MMU=y
BR2_USE_WCHAR=y
Also tested on x86-64 build target with application using hidapi
[1]: https://github.com/signal11/hidapi/blob/a6a622ffb680c55da0de787ff93b80280498330f/libusb/hid.c#L446
[2]: https://www.silabs.com/community/interface/forum.topic.html/cp2114_linux_sta-RtWg
Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
Tested-by: Dan Walkes <danwalkes@trellis-logic.com>
---
package/hidapi/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
index f6a31ba..d02ec23 100644
--- a/package/hidapi/Config.in
+++ b/package/hidapi/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_HIDAPI
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBGUDEV
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+ select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support
help
HIDAPI is a multi-platform library which allows an application
to interface with USB and Bluetooth HID-Class devices on
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
2018-06-17 17:51 [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy Dan Walkes
@ 2018-06-17 18:07 ` Baruch Siach
2018-06-17 18:32 ` Dan Walkes
2018-06-17 18:39 ` Thomas Petazzoni
2018-06-26 21:34 ` Thomas Petazzoni
2018-07-19 9:41 ` Peter Korsgaard
2 siblings, 2 replies; 6+ messages in thread
From: Baruch Siach @ 2018-06-17 18:07 UTC (permalink / raw)
To: buildroot
Hi Dan,
On Sun, Jun 17, 2018 at 05:51:53PM +0000, Dan Walkes wrote:
> Hidapi source uses iconv_open UTF-16 conversion [1] which requires
> gconv libararies when buiding with glibc in order to successfully
> find serial number, manufacturer and product strings [2].
>
> Use select in the config file to autmatically select gconv libararies
> for inclusion on the target when building with glibc
>
> Tested with ./utils/test-pkg -c hidapi.cfg -p hidapi and hidapi.cfg file
> contents:
> BR2_PACKAGE_HIDAPI=y
> BR2_PACKAGE_EUDEV=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_USE_MMU=y
> BR2_USE_WCHAR=y
>
> Also tested on x86-64 build target with application using hidapi
>
> [1]: https://github.com/signal11/hidapi/blob/a6a622ffb680c55da0de787ff93b80280498330f/libusb/hid.c#L446
> [2]: https://www.silabs.com/community/interface/forum.topic.html/cp2114_linux_sta-RtWg
>
> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
> Tested-by: Dan Walkes <danwalkes@trellis-logic.com>
> ---
> package/hidapi/Config.in | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
> index f6a31ba..d02ec23 100644
> --- a/package/hidapi/Config.in
> +++ b/package/hidapi/Config.in
> @@ -5,6 +5,7 @@ config BR2_PACKAGE_HIDAPI
> select BR2_PACKAGE_LIBUSB
> select BR2_PACKAGE_LIBGUDEV
> select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
> + select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support
This does not work for external toolchains.
Maybe just add a comment in the help text saying that fully featured build
requires BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY.
> help
> HIDAPI is a multi-platform library which allows an application
> to interface with USB and Bluetooth HID-Class devices on
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
2018-06-17 18:07 ` Baruch Siach
@ 2018-06-17 18:32 ` Dan Walkes
2018-06-17 18:39 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Dan Walkes @ 2018-06-17 18:32 UTC (permalink / raw)
To: buildroot
Hi Baruch,
>> diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
>> index f6a31ba..d02ec23 100644
>> --- a/package/hidapi/Config.in
>> +++ b/package/hidapi/Config.in
>> @@ -5,6 +5,7 @@ config BR2_PACKAGE_HIDAPI
>> select BR2_PACKAGE_LIBUSB
>> select BR2_PACKAGE_LIBGUDEV
>> select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
>> + select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support
>
> This does not work for external toolchains.
>
> Maybe just add a comment in the help text saying that fully featured build
> requires BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY.
>
>> help
>> HIDAPI is a multi-platform library which allows an application
>> to interface with USB and Bluetooth HID-Class devices on
>
Sure, I could resubmit the patch with this text in addition:
---
diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
index d02ec23..7d79dab 100644
--- a/package/hidapi/Config.in
+++ b/package/hidapi/Config.in
@@ -11,6 +11,9 @@ config BR2_PACKAGE_HIDAPI
to interface with USB and Bluetooth HID-Class devices on
Windows, Linux, and Mac OS X.
+ When using an external toolchain configuration
BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY must be configured
+ to support parsing of USB string descriptors.
+
http://www.signal11.us/oss/hidapi/
comment "hidapi needs udev /dev management and a toolchain w/ NPTL threads"
---
Should I also add this comment to the kodi/Config.in at [1] as I used
this as the example?
[1]: https://github.com/buildroot/buildroot/commit/48a717343deabbf9aa8b09f0c2b6944bcb5a81d9
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
2018-06-17 18:07 ` Baruch Siach
2018-06-17 18:32 ` Dan Walkes
@ 2018-06-17 18:39 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-06-17 18:39 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 17 Jun 2018 21:07:09 +0300, Baruch Siach wrote:
> > diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in
> > index f6a31ba..d02ec23 100644
> > --- a/package/hidapi/Config.in
> > +++ b/package/hidapi/Config.in
> > @@ -5,6 +5,7 @@ config BR2_PACKAGE_HIDAPI
> > select BR2_PACKAGE_LIBUSB
> > select BR2_PACKAGE_LIBGUDEV
> > select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
> > + select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support
>
> This does not work for external toolchains.
Why ?
The TOOLCHAIN_GLIBC_COPY_GCONV_LIBS hook is called for both internal
and external toolchains, and the BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY
option exists for both internal and external toolchains.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
2018-06-17 17:51 [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy Dan Walkes
2018-06-17 18:07 ` Baruch Siach
@ 2018-06-26 21:34 ` Thomas Petazzoni
2018-07-19 9:41 ` Peter Korsgaard
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-06-26 21:34 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 17 Jun 2018 17:51:53 +0000, Dan Walkes wrote:
> Hidapi source uses iconv_open UTF-16 conversion [1] which requires
> gconv libararies when buiding with glibc in order to successfully
> find serial number, manufacturer and product strings [2].
>
> Use select in the config file to autmatically select gconv libararies
> for inclusion on the target when building with glibc
>
> Tested with ./utils/test-pkg -c hidapi.cfg -p hidapi and hidapi.cfg file
> contents:
> BR2_PACKAGE_HIDAPI=y
> BR2_PACKAGE_EUDEV=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_USE_MMU=y
> BR2_USE_WCHAR=y
>
> Also tested on x86-64 build target with application using hidapi
>
> [1]: https://github.com/signal11/hidapi/blob/a6a622ffb680c55da0de787ff93b80280498330f/libusb/hid.c#L446
> [2]: https://www.silabs.com/community/interface/forum.topic.html/cp2114_linux_sta-RtWg
>
> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
> Tested-by: Dan Walkes <danwalkes@trellis-logic.com>
> ---
> package/hidapi/Config.in | 1 +
> 1 file changed, 1 insertion(+)
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] 6+ messages in thread
* [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy
2018-06-17 17:51 [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy Dan Walkes
2018-06-17 18:07 ` Baruch Siach
2018-06-26 21:34 ` Thomas Petazzoni
@ 2018-07-19 9:41 ` Peter Korsgaard
2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-07-19 9:41 UTC (permalink / raw)
To: buildroot
>>>>> "Dan" == Dan Walkes <danwalkes@trellis-logic.com> writes:
> Hidapi source uses iconv_open UTF-16 conversion [1] which requires
> gconv libararies when buiding with glibc in order to successfully
> find serial number, manufacturer and product strings [2].
> Use select in the config file to autmatically select gconv libararies
> for inclusion on the target when building with glibc
> Tested with ./utils/test-pkg -c hidapi.cfg -p hidapi and hidapi.cfg file
> contents:
> BR2_PACKAGE_HIDAPI=y
> BR2_PACKAGE_EUDEV=y
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_USE_MMU=y
> BR2_USE_WCHAR=y
> Also tested on x86-64 build target with application using hidapi
> [1]: https://github.com/signal11/hidapi/blob/a6a622ffb680c55da0de787ff93b80280498330f/libusb/hid.c#L446
> [2]: https://www.silabs.com/community/interface/forum.topic.html/cp2114_linux_sta-RtWg
> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
> Tested-by: Dan Walkes <danwalkes@trellis-logic.com>
Committed to 2018.02.x and 2018.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-19 9:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-17 17:51 [Buildroot] [PATCH 1/1] package/hidapi: select glibc gconv libs copy Dan Walkes
2018-06-17 18:07 ` Baruch Siach
2018-06-17 18:32 ` Dan Walkes
2018-06-17 18:39 ` Thomas Petazzoni
2018-06-26 21:34 ` Thomas Petazzoni
2018-07-19 9:41 ` Peter Korsgaard
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.