* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
@ 2014-08-15 0:27 Nathaniel Roach
2014-08-15 9:06 ` Peter Korsgaard
2014-08-18 13:44 ` Romain Naour
0 siblings, 2 replies; 7+ messages in thread
From: Nathaniel Roach @ 2014-08-15 0:27 UTC (permalink / raw)
To: buildroot
"The build failures of bandwidthd observed in the autobuilders in
relation to libpng are caused by the usage of -L/usr/lib
-L/usr/local/lib in the compiler flags, which leads the configure
script to try to link against a host libpng library."
These issues are fixed by:
* Version bump to -r08
"[patched] the configure.ac script to remove the hardcoded
-L/usr/local/lib and -I/usr/local/include. The bandwidthd package
-was already autoreconfigured, so there is no need to add it."
* "Adding the --without-x option, which ensures that the configure.ac
script will not add -L/usr/lib to the compiler flags (and we anyway
haven't added any sort of X.org support to bandwidthd for the
moment)."
Both fixes by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Changes v1 to v2
- Added details of the failure this patch fixes
---
package/bandwidthd/bandwidthd.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
index 9b1eb32..3e11d6a 100644
--- a/package/bandwidthd/bandwidthd.mk
+++ b/package/bandwidthd/bandwidthd.mk
@@ -4,7 +4,7 @@
#
################################################################################
-BANDWIDTHD_VERSION = v2.0.1-auto-r07
+BANDWIDTHD_VERSION = v2.0.1-auto-r08
BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
# Specified as "any version of the GPL that is current as of your
@@ -15,6 +15,8 @@ BANDWIDTHD_DEPENDENCIES = gd libpng libpcap
BANDWIDTHD_AUTORECONF = YES
+BANDWIDTHD_CONF_OPT += --without-x
+
ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
BANDWIDTHD_DEPENDENCIES += postgresql
BANDWIDTHD_CONF_OPT += --with-postgresql-logging=true
--
2.0.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-15 0:27 [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders Nathaniel Roach
@ 2014-08-15 9:06 ` Peter Korsgaard
2014-08-18 13:44 ` Romain Naour
1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2014-08-15 9:06 UTC (permalink / raw)
To: buildroot
>>>>> "Nathaniel" == Nathaniel Roach <nroach44@gmail.com> writes:
> "The build failures of bandwidthd observed in the autobuilders in
> relation to libpng are caused by the usage of -L/usr/lib
> -L/usr/local/lib in the compiler flags, which leads the configure
> script to try to link against a host libpng library."
> These issues are fixed by:
> * Version bump to -r08
> "[patched] the configure.ac script to remove the hardcoded
> -L/usr/local/lib and -I/usr/local/include. The bandwidthd package
> -was already autoreconfigured, so there is no need to add it."
> * "Adding the --without-x option, which ensures that the configure.ac
> script will not add -L/usr/lib to the compiler flags (and we anyway
> haven't added any sort of X.org support to bandwidthd for the
> moment)."
> Both fixes by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Changes v1 to v2
> - Added details of the failure this patch fixes
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-15 0:27 [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders Nathaniel Roach
2014-08-15 9:06 ` Peter Korsgaard
@ 2014-08-18 13:44 ` Romain Naour
2014-08-18 14:40 ` Nathaniel Roach
2014-08-18 15:01 ` Nathaniel Roach
1 sibling, 2 replies; 7+ messages in thread
From: Romain Naour @ 2014-08-18 13:44 UTC (permalink / raw)
To: buildroot
Hi Nathaniel,
[snip]
There is a new build issue with bandwidthd:
http://autobuild.buildroot.net/results/37a/37a94e0f2d3faa0aec9c488e987cfff706fc9f3b/build-end.log
checking for png_read_info in -lpng... no
configure: error: Bandwidthd requires but cannot libpng
make: *** [/home/test/autobuild/instance-3/output/build/bandwidthd-v2.0.1-auto-r08/.stamp_configured] Error 1
I checked the dependencies with libpng, it's ok.
But in config.log there are some link issue:
/home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpng.a(pngread.o): In function `png_read_destroy':
/home/naourr/git/buildroot/test/bandwidthd/build/libpng-1.6.12/pngread.c:942: undefined reference to `inflateEnd'
The configure script doesn't check for zlib, then -lz is missing during libpng test
I added this line to add this check before libpng:
AC_CHECK_LIB(z, zlibVersion, , AC_MSG_ERROR(zlib not installed))
The build continue but fail with libpcap:
checking for zlibVersion in -lz... yes
checking for png_read_info in -lpng... yes
checking for gdImageCreate in -lgd... yes
checking for pcap_open_live in -lpcap... no
checking for pcap_open_live in -lwpcap... no
configure: error: Bandwidthd requires but cannot find libpcap
Again a link issue:
/home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpcap.a(pcap-canusb-linux.o): In function `canusb_activate':
/home/naourr/git/buildroot/test/bandwidthd/build/libpcap-1.6.1/./pcap-canusb-linux.c:344: undefined reference to `libusb_init'
I borrowed the libusb test from libpcap to check for libusb-1.0
# needed by libpcap
AC_CHECK_HEADER(libusb-1.0/libusb.h,
[
AC_CHECK_LIB(usb-1.0, libusb_init,
[
LIBS="-lusb-1.0 -lpthread $LIBS"
ac_lbl_has_libusb=yes
],
[AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
ac_lbl_has_libusb=no,
-lpthread
)
],
ac_lbl_has_libusb=no
[AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
)
And all build fine now :)
Note that -lpthread need to be added here otherwise libusb will fail with pthread functions.
So, the configure.ac script needs to be consolidated to check for zlib, libusb-1.0 and pthread.
Currently, I don't have a clean patch to suggest.
I hope this will help you.
Best regards,
Romain
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-18 13:44 ` Romain Naour
@ 2014-08-18 14:40 ` Nathaniel Roach
2014-08-18 15:01 ` Nathaniel Roach
1 sibling, 0 replies; 7+ messages in thread
From: Nathaniel Roach @ 2014-08-18 14:40 UTC (permalink / raw)
To: buildroot
On 18/08/14 21:44, Romain Naour wrote:
> Hi Nathaniel,
>
> [snip]
>
> There is a new build issue with bandwidthd:
>
> http://autobuild.buildroot.net/results/37a/37a94e0f2d3faa0aec9c488e987cfff706fc9f3b/build-end.log
>
>
> checking for png_read_info in -lpng... no
> configure: error: Bandwidthd requires but cannot libpng
> make: *** [/home/test/autobuild/instance-3/output/build/bandwidthd-v2.0.1-auto-r08/.stamp_configured] Error 1
>
> I checked the dependencies with libpng, it's ok.
>
> But in config.log there are some link issue:
> /home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpng.a(pngread.o): In function `png_read_destroy':
> /home/naourr/git/buildroot/test/bandwidthd/build/libpng-1.6.12/pngread.c:942: undefined reference to `inflateEnd'
>
> The configure script doesn't check for zlib, then -lz is missing during libpng test
>
> I added this line to add this check before libpng:
> AC_CHECK_LIB(z, zlibVersion, , AC_MSG_ERROR(zlib not installed))
>
> The build continue but fail with libpcap:
>
> checking for zlibVersion in -lz... yes
> checking for png_read_info in -lpng... yes
> checking for gdImageCreate in -lgd... yes
> checking for pcap_open_live in -lpcap... no
> checking for pcap_open_live in -lwpcap... no
> configure: error: Bandwidthd requires but cannot find libpcap
>
> Again a link issue:
> /home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpcap.a(pcap-canusb-linux.o): In function `canusb_activate':
> /home/naourr/git/buildroot/test/bandwidthd/build/libpcap-1.6.1/./pcap-canusb-linux.c:344: undefined reference to `libusb_init'
>
> I borrowed the libusb test from libpcap to check for libusb-1.0
> # needed by libpcap
> AC_CHECK_HEADER(libusb-1.0/libusb.h,
> [
> AC_CHECK_LIB(usb-1.0, libusb_init,
> [
> LIBS="-lusb-1.0 -lpthread $LIBS"
> ac_lbl_has_libusb=yes
> ],
> [AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
> ac_lbl_has_libusb=no,
> -lpthread
> )
> ],
> ac_lbl_has_libusb=no
> [AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
> )
>
> And all build fine now :)
>
> Note that -lpthread need to be added here otherwise libusb will fail with pthread functions.
>
> So, the configure.ac script needs to be consolidated to check for zlib, libusb-1.0 and pthread.
> Currently, I don't have a clean patch to suggest.
>
> I hope this will help you.
>
> Best regards,
> Romain
>
Hi Romain
All: I replied earlier just to Romain, acknowledging the issue, and
forgot to click reply all instead of normal reply.
Romain, could you try building the latest master from
github.com/nroach44/bandwidthd (id:
0473a5f2527201d83c5b0ddc581b7c9f21fbdcaf )
Thanks, Nathaniel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-18 13:44 ` Romain Naour
2014-08-18 14:40 ` Nathaniel Roach
@ 2014-08-18 15:01 ` Nathaniel Roach
2014-08-18 17:39 ` Romain Naour
1 sibling, 1 reply; 7+ messages in thread
From: Nathaniel Roach @ 2014-08-18 15:01 UTC (permalink / raw)
To: buildroot
On 18/08/14 21:44, Romain Naour wrote:
> Hi Nathaniel,
>
> [snip]
>
> There is a new build issue with bandwidthd:
>
> http://autobuild.buildroot.net/results/37a/37a94e0f2d3faa0aec9c488e987cfff706fc9f3b/build-end.log
>
>
> checking for png_read_info in -lpng... no
> configure: error: Bandwidthd requires but cannot libpng
> make: *** [/home/test/autobuild/instance-3/output/build/bandwidthd-v2.0.1-auto-r08/.stamp_configured] Error 1
>
> I checked the dependencies with libpng, it's ok.
>
> But in config.log there are some link issue:
> /home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpng.a(pngread.o): In function `png_read_destroy':
> /home/naourr/git/buildroot/test/bandwidthd/build/libpng-1.6.12/pngread.c:942: undefined reference to `inflateEnd'
>
> The configure script doesn't check for zlib, then -lz is missing during libpng test
>
> I added this line to add this check before libpng:
> AC_CHECK_LIB(z, zlibVersion, , AC_MSG_ERROR(zlib not installed))
>
> The build continue but fail with libpcap:
>
> checking for zlibVersion in -lz... yes
> checking for png_read_info in -lpng... yes
> checking for gdImageCreate in -lgd... yes
> checking for pcap_open_live in -lpcap... no
> checking for pcap_open_live in -lwpcap... no
> configure: error: Bandwidthd requires but cannot find libpcap
>
> Again a link issue:
> /home/naourr/git/buildroot/test/bandwidthd/host/usr/x86_64-buildroot-linux-uclibc/sysroot/usr/lib/../lib64/libpcap.a(pcap-canusb-linux.o): In function `canusb_activate':
> /home/naourr/git/buildroot/test/bandwidthd/build/libpcap-1.6.1/./pcap-canusb-linux.c:344: undefined reference to `libusb_init'
>
> I borrowed the libusb test from libpcap to check for libusb-1.0
> # needed by libpcap
> AC_CHECK_HEADER(libusb-1.0/libusb.h,
> [
> AC_CHECK_LIB(usb-1.0, libusb_init,
> [
> LIBS="-lusb-1.0 -lpthread $LIBS"
> ac_lbl_has_libusb=yes
> ],
> [AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
> ac_lbl_has_libusb=no,
> -lpthread
> )
> ],
> ac_lbl_has_libusb=no
> [AC_MSG_ERROR([Bandwidthd requires but cannot find libusb])]
> )
>
> And all build fine now :)
>
> Note that -lpthread need to be added here otherwise libusb will fail with pthread functions.
>
> So, the configure.ac script needs to be consolidated to check for zlib, libusb-1.0 and pthread.
> Currently, I don't have a clean patch to suggest.
>
> I hope this will help you.
>
> Best regards,
> Romain
>
In regards to pthreads, can you add
LIBS="-lpthread $LIBS"
some where in configure.ac and test if that fixes the issue?
If it does I'll commit it and then patch buildroot accordingly.
Thanks, Nathaniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140818/0246bc9a/attachment.asc>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-18 15:01 ` Nathaniel Roach
@ 2014-08-18 17:39 ` Romain Naour
2014-08-18 18:05 ` Romain Naour
0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2014-08-18 17:39 UTC (permalink / raw)
To: buildroot
Hi Nathaniel,
Le 18/08/2014 17:01, Nathaniel Roach a ?crit :
>
> In regards to pthreads, can you add
>
> LIBS="-lpthread $LIBS"
>
> some where in configure.ac and test if that fixes the issue?
>
> If it does I'll commit it and then patch buildroot accordingly.
>
> Thanks, Nathaniel
>
I tried with 0473a5f2527201d83c5b0ddc581b7c9f21fbdcaf and I added the following
line in bandwidthd.mk:
BANDWIDTHD_CONF_ENV = LIBS="-pthread"
It's ok for me with that :)
I think bandwithd depends on BR2_TOOLCHAIN_HAS_THREADS due to a reverse
dependency on libusb.
Thanks for your support.
Best regards,
Romain
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders
2014-08-18 17:39 ` Romain Naour
@ 2014-08-18 18:05 ` Romain Naour
0 siblings, 0 replies; 7+ messages in thread
From: Romain Naour @ 2014-08-18 18:05 UTC (permalink / raw)
To: buildroot
Hi Nathaniel,
>
> I think bandwithd depends on BR2_TOOLCHAIN_HAS_THREADS due to a reverse
> dependency on libusb.
>
Please forget that. libusb is an optional dependency of libpcap.
I have disabled libusb and now the build error out:
checking for libusb_init in -lusb-1.0... no
configure: error:
libusb and libpthread need to be handled as optional dependencies in bandwidthd.
-pthread need to be added only if the libusb (which depends on
BR2_TOOLCHAIN_HAS_THREADS) is detected
So add BANDWIDTHD_CONF_ENV = LIBS="-pthread" in bandwidthd.mk is not a good idea...
Best regards,
Romain
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-18 18:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-15 0:27 [Buildroot] [PATCH v2] bandwidthd: incorporate fixes for autobuilders Nathaniel Roach
2014-08-15 9:06 ` Peter Korsgaard
2014-08-18 13:44 ` Romain Naour
2014-08-18 14:40 ` Nathaniel Roach
2014-08-18 15:01 ` Nathaniel Roach
2014-08-18 17:39 ` Romain Naour
2014-08-18 18:05 ` Romain Naour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox