package/bandwidthd: improve configure check for zlib and libusb.
PATCH 1/1 package/bandwidthd: improve configure check for zlib and libusb.
The configure script doesn't check for zlib, then -lz is missing during libpng test.
The first patch add this check.
If the libpcap is linked with libusb, then the libpcap check fail because -lusb-1.0 is missing.
Also -lpthread need to be added since libusb depends on threads support. The second patch add -lusb-1.0 and -lpthread only if libusb is present.
Tested with and without libusb support.
Fixes:
http://autobuild.buildroot.net/results/37a/37a94e0f2d3faa0aec9c488e987cfff706fc9f3b/build-end.log
--- .../bandwidthd-0001-configure-add-zlib-check.patch | 33 ++++++++++++++++++++++ ...andwidthd-0002-configure-add-libusb-check.patch | 30 ++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 package/bandwidthd/bandwidthd-0001-configure-add-zlib-check.patch create mode 100644 package/bandwidthd/bandwidthd-0002-configure-add-libusb-check.patch
package/bandwidthd/bandwidthd-0001-configure-add-zlib-check.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 9a871de08dd033c0f8bb5f35e6c628e6597efd5f Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Mon, 18 Aug 2014 22:04:50 +0200 +Subject: [PATCH 1/1] configure: add zlib check + +Signed-off-by: Romain Naour <[email protected]> +--- + configure.ac | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3a2d0ba..c370350 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -30,10 +30,12 @@ AC_CHECK_LIB(m, pow) + AC_CHECK_LIB(iconv, libiconv_open) + + # Required Libraries +-AC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd requires but cannot libpng])]) +-AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libgd])]) ++AC_CHECK_LIB(z, zlibVersion, , AC_MSG_ERROR(Bandwidthd needs libzlib to be installed)) #Needed by libpng, doing it here to be sure ++AC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd needs libpng to be installed])]) ++AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd needs libgd to be installed])]) ++ + AC_CHECK_LIB(pcap, pcap_open_live, , +- [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])]) ++ [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd needs libpcap to be installed])])]) + + #AC_CHECK_LIB(sqlite3, sqlite3_open, sqlite=true,AC_MSG_WARN([sqlite3 is recommended for storage of data but cannot be found])) + +-- +1.9.3 +
package/bandwidthd/bandwidthd-0002-configure-add-libusb-check.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 6be45a79405c181e3f51562fb89d8256bb97bd32 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Mon, 18 Aug 2014 22:16:12 +0200 +Subject: [PATCH 1/1] configure: add libusb check + +libusb is an libpcap's optional dependency. +-lpthread need to be added since libusb depends on threads support + +Signed-off-by: Romain Naour <[email protected]> +--- + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.ac b/configure.ac +index c370350..45da195 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -34,6 +34,9 @@ AC_CHECK_LIB(z, zlibVersion, , AC_MSG_ERROR(Bandwidthd needs libzlib to be insta + AC_CHECK_LIB(png, png_read_info, ,[AC_MSG_ERROR([Bandwidthd needs libpng to be installed])]) + AC_CHECK_LIB(gd, gdImageCreate, ,[AC_MSG_ERROR([Bandwidthd needs libgd to be installed])]) + ++# libusb is an libpcap's optional dependency ++AC_CHECK_LIB(usb-1.0, libusb_init, [LIBS="-lusb-1.0 -lpthread $LIBS"], , -lpthread) ++ + AC_CHECK_LIB(pcap, pcap_open_live, , + [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd needs libpcap to be installed])])]) + +-- +1.9.3 +
Signature · 1 line
1.9.3
PATCH 1/1 package/bandwidthd: improve configure check for zlib and libusb.
On 19/08/14 04:41, Romain Naour wrote:> The configure script doesn't check for zlib, then -lz is missing during libpng
Quoted 12 lines
test.
The first patch add this check.If the libpcap is linked with libusb, then the libpcap check fail because -lusb-1.0 is missing.
Also -lpthread need to be added since libusb depends on threads support. The second patch add -lusb-1.0 and -lpthread only if libusb is present.Tested with and without libusb support.
Fixes:
http://autobuild.buildroot.net/results/37a/37a94e0f2d3faa0aec9c488e987cfff706fc9f3b/build-end.log
Quoted 3 lines
Signed-off-by Romain Naour <[email protected]>Cc Nathaniel Roach <[email protected]>
--- snip ---
Quoted 2 lines
+
Thanks Romain, your help has been instrumental in getting this stuff
fixed. Because I maintain the fork that buildroot uses in addition to the buildroot package, I can put these fixes in upstream without adding complexity to buildroot.
Could you do one last test using v2.0.1-auto-r09 as the version? Hopefully this solves the dependency issues and it removes the need for --without-x.
Thanks, Nathaniel.
PATCH 1/1 package/bandwidthd: improve configure check for zlib and libusb.
Hi Nathaniel,
Quoted 8 lines
--- snip ---
Quoted 2 lines
+
Thanks Romain, your help has been instrumental in getting this stuff
fixed. Because I maintain the fork that buildroot uses in addition to the buildroot package, I can put these fixes in upstream without adding complexity to buildroot.
Quoted 6 lines
Could you do one last test using v2.0.1-auto-r09 as the version? Hopefully this solves the dependency issues and it removes the need for --without-x.
Thanks, Nathaniel.
I redo a test with v2.0.1-auto-r09 and all reported issues are fixed. It's great to see a maintainer very reactive :)
I confirm that --without-x is not recognized anymore.
It's sure that when a new package is added to buildroot, it is compiled with a wide configuration possibility. It helps to detect all unhandled cases.
Best regards,
Romain