* [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention
@ 2015-01-12 21:26 Samuel Martin
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Samuel Martin @ 2015-01-12 21:26 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename package/libftdi/{libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} (100%)
diff --git a/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch b/package/libftdi/0001_pkgconfig_libusb.patch
similarity index 100%
rename from package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch
rename to package/libftdi/0001_pkgconfig_libusb.patch
--
2.2.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc
2015-01-12 21:26 [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Samuel Martin
@ 2015-01-12 21:26 ` Samuel Martin
2015-01-12 23:03 ` Yann E. MORIN
2015-01-13 13:15 ` Thomas Petazzoni
2015-01-12 23:00 ` [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Yann E. MORIN
2015-01-14 15:55 ` Thomas Petazzoni
2 siblings, 2 replies; 7+ messages in thread
From: Samuel Martin @ 2015-01-12 21:26 UTC (permalink / raw)
To: buildroot
This patch fixes libftdi pkg-config module, so that packages linking
against libftdi correctly have all needed CFLAGS and LIBS defined,
especially when running a static build.
Fixes:
http://autobuild.buildroot.org/results/e90/e90b4d5ad79d99487f21c9d18581e8eba7034501/
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
...di.pc.in-requires-libusb-fix-static-build.patch | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
diff --git a/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch b/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
new file mode 100644
index 0000000..7b0d9c7
--- /dev/null
+++ b/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
@@ -0,0 +1,25 @@
+From c0d957b08b46385da570d8ff2f728369822ad2c1 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Mon, 12 Jan 2015 22:10:49 +0100
+Subject: [PATCH] libftdi.pc.in: requires libusb (fix static build)
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ libftdi.pc.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libftdi.pc.in b/libftdi.pc.in
+index 2061b91..95eb491 100644
+--- a/libftdi.pc.in
++++ b/libftdi.pc.in
+@@ -6,6 +6,7 @@ includedir=@includedir@
+ Name: libftdi
+ Description: Library to program and control the FTDI USB controller
+ Requires:
++Requires.private: libusb
+ Version: @VERSION@
+ Libs: -L${libdir} -lftdi -lusb
+ Cflags: -I${includedir}
+--
+2.2.1
+
--
2.2.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention
2015-01-12 21:26 [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Samuel Martin
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
@ 2015-01-12 23:00 ` Yann E. MORIN
2015-01-14 15:55 ` Thomas Petazzoni
2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2015-01-12 23:00 UTC (permalink / raw)
To: buildroot
Samuel, All,
On 2015-01-12 22:26 +0100, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> ...libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} | 0
> 1 file changed, 0 insertions(+), 0 deletions(-)
> rename package/libftdi/{libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} (100%)
>
> diff --git a/package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch b/package/libftdi/0001_pkgconfig_libusb.patch
> similarity index 100%
> rename from package/libftdi/libftdi-0.19-01_pkgconfig_libusb.patch
> rename to package/libftdi/0001_pkgconfig_libusb.patch
> --
> 2.2.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
@ 2015-01-12 23:03 ` Yann E. MORIN
2015-01-13 13:15 ` Thomas Petazzoni
1 sibling, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2015-01-12 23:03 UTC (permalink / raw)
To: buildroot
Samuel, All,
On 2015-01-12 22:26 +0100, Samuel Martin spake thusly:
> This patch fixes libftdi pkg-config module, so that packages linking
> against libftdi correctly have all needed CFLAGS and LIBS defined,
> especially when running a static build.
>
> Fixes:
> http://autobuild.buildroot.org/results/e90/e90b4d5ad79d99487f21c9d18581e8eba7034501/
>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
This does indeed fix the autobuild failure.
However (as discussed on IRC), the real fix is a bit more involved, as
our current libftdi is 0.19, but openocd requires 0.20:
configure: WARNING: You need a newer libftdi version (0.20 or later)
[...]
MPSSE mode of FTDI based devices no
But as you said, this is material for a further patch. So:
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> ...di.pc.in-requires-libusb-fix-static-build.patch | 25 ++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
>
> diff --git a/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch b/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
> new file mode 100644
> index 0000000..7b0d9c7
> --- /dev/null
> +++ b/package/libftdi/0002-libftdi.pc.in-requires-libusb-fix-static-build.patch
> @@ -0,0 +1,25 @@
> +From c0d957b08b46385da570d8ff2f728369822ad2c1 Mon Sep 17 00:00:00 2001
> +From: Samuel Martin <s.martin49@gmail.com>
> +Date: Mon, 12 Jan 2015 22:10:49 +0100
> +Subject: [PATCH] libftdi.pc.in: requires libusb (fix static build)
> +
> +Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> +---
> + libftdi.pc.in | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/libftdi.pc.in b/libftdi.pc.in
> +index 2061b91..95eb491 100644
> +--- a/libftdi.pc.in
> ++++ b/libftdi.pc.in
> +@@ -6,6 +6,7 @@ includedir=@includedir@
> + Name: libftdi
> + Description: Library to program and control the FTDI USB controller
> + Requires:
> ++Requires.private: libusb
> + Version: @VERSION@
> + Libs: -L${libdir} -lftdi -lusb
> + Cflags: -I${includedir}
> +--
> +2.2.1
> +
> --
> 2.2.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
2015-01-12 23:03 ` Yann E. MORIN
@ 2015-01-13 13:15 ` Thomas Petazzoni
2015-01-19 22:47 ` Samuel Martin
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-01-13 13:15 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Mon, 12 Jan 2015 22:26:05 +0100, Samuel Martin wrote:
> +diff --git a/libftdi.pc.in b/libftdi.pc.in
> +index 2061b91..95eb491 100644
> +--- a/libftdi.pc.in
> ++++ b/libftdi.pc.in
> +@@ -6,6 +6,7 @@ includedir=@includedir@
> + Name: libftdi
> + Description: Library to program and control the FTDI USB controller
> + Requires:
> ++Requires.private: libusb
> + Version: @VERSION@
> + Libs: -L${libdir} -lftdi -lusb
> + Cflags: -I${includedir}
Are you sure this is the right fix? I believe the right fix is rather:
-Requires:
+Requires: libusb
...
-Libs: -L${libdir} -lftdi -lusb
+Libs: -L${libdir} -lftdi
This properly declares the fact that libftdi requires libusb. And
libusb.pc already has the appropriate Requires.private field on
libusb-1.0. With this change, you get what I believe is the correct
behavior:
When linking dynamically, we're only linked against -lusb (i.e the
libusb-compat library) :
$ ./output/host/usr/bin/pkg-config --libs libftdi
-lftdi -L/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lusb
When linking statically, we correct get both -lusb and -lusb-1.0:
$ ./output/host/usr/bin/pkg-config --static --libs libftdi
-lftdi -lusb -L/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lusb-1.0 -pthread
This is more or less what was done upstream at
http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=ac5790a7af9ffb45c00bde056b308643cd52537e,
though this commit was after they switched to libusb instead of
libusb-compat.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention
2015-01-12 21:26 [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Samuel Martin
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
2015-01-12 23:00 ` [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Yann E. MORIN
@ 2015-01-14 15:55 ` Thomas Petazzoni
2 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-01-14 15:55 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Mon, 12 Jan 2015 22:26:04 +0100, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
> ...libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} | 0
> 1 file changed, 0 insertions(+), 0 deletions(-)
> rename package/libftdi/{libftdi-0.19-01_pkgconfig_libusb.patch => 0001_pkgconfig_libusb.patch} (100%)
Patch applied. I haven't applied PATCH 2/2 though. See my comments
about it.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc
2015-01-13 13:15 ` Thomas Petazzoni
@ 2015-01-19 22:47 ` Samuel Martin
0 siblings, 0 replies; 7+ messages in thread
From: Samuel Martin @ 2015-01-19 22:47 UTC (permalink / raw)
To: buildroot
Thomas, all,
On Tue, Jan 13, 2015 at 2:15 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Samuel Martin,
>
> On Mon, 12 Jan 2015 22:26:05 +0100, Samuel Martin wrote:
>
>> +diff --git a/libftdi.pc.in b/libftdi.pc.in
>> +index 2061b91..95eb491 100644
>> +--- a/libftdi.pc.in
>> ++++ b/libftdi.pc.in
>> +@@ -6,6 +6,7 @@ includedir=@includedir@
>> + Name: libftdi
>> + Description: Library to program and control the FTDI USB controller
>> + Requires:
>> ++Requires.private: libusb
>> + Version: @VERSION@
>> + Libs: -L${libdir} -lftdi -lusb
>> + Cflags: -I${includedir}
>
> Are you sure this is the right fix? I believe the right fix is rather:
>
> -Requires:
> +Requires: libusb
> ...
> -Libs: -L${libdir} -lftdi -lusb
> +Libs: -L${libdir} -lftdi
>
> This properly declares the fact that libftdi requires libusb. And
> libusb.pc already has the appropriate Requires.private field on
> libusb-1.0. With this change, you get what I believe is the correct
> behavior:
>
> When linking dynamically, we're only linked against -lusb (i.e the
> libusb-compat library) :
>
> $ ./output/host/usr/bin/pkg-config --libs libftdi
> -lftdi -L/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lusb
>
> When linking statically, we correct get both -lusb and -lusb-1.0:
>
> $ ./output/host/usr/bin/pkg-config --static --libs libftdi
> -lftdi -lusb -L/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lusb-1.0 -pthread
>
> This is more or less what was done upstream at
> http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=ac5790a7af9ffb45c00bde056b308643cd52537e,
> though this commit was after they switched to libusb instead of
> libusb-compat.
Right, it is a much better fix. I'll respin shortly.
Regards,
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Samuel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-19 22:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 21:26 [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Samuel Martin
2015-01-12 21:26 ` [Buildroot] [PATCH 2/2] package/libftdi: fix libftdi.pc Samuel Martin
2015-01-12 23:03 ` Yann E. MORIN
2015-01-13 13:15 ` Thomas Petazzoni
2015-01-19 22:47 ` Samuel Martin
2015-01-12 23:00 ` [Buildroot] [PATCH 1/2] package/libftdi: rename patches to the new naming convention Yann E. MORIN
2015-01-14 15:55 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox