All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] bandwidthd: fix static build
@ 2014-10-02  6:49 Baruch Siach
       [not found] ` <542CFECE.9020103@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-02  6:49 UTC (permalink / raw)
  To: buildroot

Build against libpng requires -lz when built statically. Patch configure.ac to
get the needed information from pkg-config.

This patch can not be directly upstreamed as it conflicts with upstream
changes, but a proper fix would be based on the same idea.

Fixes:
http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/

Cc: Nathaniel Roach <nroach44@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...ac-fix-libpng-check-when-built-statically.patch | 29 ++++++++++++++++++++++
 package/bandwidthd/bandwidthd.mk                   |  2 +-
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch

diff --git a/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
new file mode 100644
index 000000000000..f444ba70d513
--- /dev/null
+++ b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
@@ -0,0 +1,29 @@
+From 97998f008f5d900619194d80051dee1be68e4ace Mon Sep 17 00:00:00 2001
+Message-Id: <97998f008f5d900619194d80051dee1be68e4ace.1412231990.git.baruch@tkos.co.il>
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Thu, 2 Oct 2014 09:12:28 +0300
+Subject: [PATCH] configure.ac: fix libpng check when built statically
+
+Find libpng library dependencies using pkg-config.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 3a2d0ba97bdf..9c2fa83cc93c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,6 +30,8 @@ AC_CHECK_LIB(m, pow)
+ AC_CHECK_LIB(iconv, libiconv_open)
+ 
+ # Required Libraries
++PKG_CHECK_MODULES([libpng], libpng)
++LIBS="$LIBS $libpng_LIBS"
+ 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(pcap, pcap_open_live, ,
+-- 
+2.1.0
+
diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
index 3e11d6abb1e5..0b03b0b70278 100644
--- a/package/bandwidthd/bandwidthd.mk
+++ b/package/bandwidthd/bandwidthd.mk
@@ -11,7 +11,7 @@ BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
 # download" by upstream.
 BANDWIDTHD_LICENSE = GPL
 
-BANDWIDTHD_DEPENDENCIES = gd libpng libpcap
+BANDWIDTHD_DEPENDENCIES = gd libpng libpcap host-pkgconf
 
 BANDWIDTHD_AUTORECONF = YES
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
       [not found] ` <542CFECE.9020103@gmail.com>
@ 2014-10-02  7:52   ` Baruch Siach
  2014-10-02  7:56     ` Nathaniel Roach
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-02  7:52 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel,

On Thu, Oct 02, 2014 at 03:29:18PM +0800, Nathaniel Roach wrote:
> On 02/10/14 14:49, Baruch Siach wrote:
> > Build against libpng requires -lz when built statically. Patch configure.ac to
> > get the needed information from pkg-config.
> > 
> > This patch can not be directly upstreamed as it conflicts with upstream
> > changes, but a proper fix would be based on the same idea.
> > 
> > Fixes:
> > http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/
> > 
> > Cc: Nathaniel Roach <nroach44@gmail.com>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  ...ac-fix-libpng-check-when-built-statically.patch | 29 ++++++++++++++++++++++
> >  package/bandwidthd/bandwidthd.mk                   |  2 +-
> >  2 files changed, 30 insertions(+), 1 deletion(-)
> >  create mode 100644 package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
> > 
> > diff --git a/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
> > new file mode 100644
> > index 000000000000..f444ba70d513
> > --- /dev/null
> > +++ b/package/bandwidthd/0001-configure.ac-fix-libpng-check-when-built-statically.patch
> > @@ -0,0 +1,29 @@
> > +From 97998f008f5d900619194d80051dee1be68e4ace Mon Sep 17 00:00:00 2001
> > +Message-Id: <97998f008f5d900619194d80051dee1be68e4ace.1412231990.git.baruch@tkos.co.il>
> > +From: Baruch Siach <baruch@tkos.co.il>
> > +Date: Thu, 2 Oct 2014 09:12:28 +0300
> > +Subject: [PATCH] configure.ac: fix libpng check when built statically
> > +
> > +Find libpng library dependencies using pkg-config.
> > +
> > +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > +---
> > + configure.ac | 2 ++
> > + 1 file changed, 2 insertions(+)
> > +
> > +diff --git a/configure.ac b/configure.ac
> > +index 3a2d0ba97bdf..9c2fa83cc93c 100644
> > +--- a/configure.ac
> > ++++ b/configure.ac
> > +@@ -30,6 +30,8 @@ AC_CHECK_LIB(m, pow)
> > + AC_CHECK_LIB(iconv, libiconv_open)
> > + 
> > + # Required Libraries
> > ++PKG_CHECK_MODULES([libpng], libpng)
> > ++LIBS="$LIBS $libpng_LIBS"
> > + 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(pcap, pcap_open_live, ,
> > +-- 
> > +2.1.0
> > +
> > diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
> > index 3e11d6abb1e5..0b03b0b70278 100644
> > --- a/package/bandwidthd/bandwidthd.mk
> > +++ b/package/bandwidthd/bandwidthd.mk
> > @@ -11,7 +11,7 @@ BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
> >  # download" by upstream.
> >  BANDWIDTHD_LICENSE = GPL
> >  
> > -BANDWIDTHD_DEPENDENCIES = gd libpng libpcap
> > +BANDWIDTHD_DEPENDENCIES = gd libpng libpcap host-pkgconf
> >  
> >  BANDWIDTHD_AUTORECONF = YES
> 
> Hi Baruch, I've already put a patch through [1] that bumps the version
> in BR, which AFAIK fixes the issues that we've had on the autobuilders.

Well, I should have been aware to this patch since it seems I also commented 
on it, but I forgot. I still think this is the right solution, since it would 
also work if libpng changes its dependencies. Assuming, of course, that 
bandwidthd doesn't use libz directly.

Note that I also tried to upgrade to -r10, but build fails with this specific 
non-thread defconfig because bandwidthd now requires a toolchain supporting 
-lpthread. So technically this specific configuration is still broken after 
applying http://patchwork.ozlabs.org/patch/381899/.

baruch

> I'm not sure what to do in this situation but I thought I'd just note
> this here in case my patch had been forgotten.
> 
> [1] http://patchwork.ozlabs.org/patch/381899/

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-02  7:52   ` Baruch Siach
@ 2014-10-02  7:56     ` Nathaniel Roach
  2014-10-02  7:58       ` Baruch Siach
  0 siblings, 1 reply; 11+ messages in thread
From: Nathaniel Roach @ 2014-10-02  7:56 UTC (permalink / raw)
  To: buildroot

On 02/10/14 15:52, Baruch Siach wrote:
> Hi Nathaniel,
> 
> On Thu, Oct 02, 2014 at 03:29:18PM +0800, Nathaniel Roach wrote:
>> On 02/10/14 14:49, Baruch Siach wrote:
>>> Build against libpng requires -lz when built statically. Patch configure.ac to
>>> get the needed information from pkg-config.
>>>
>>> This patch can not be directly upstreamed as it conflicts with upstream
>>> changes, but a proper fix would be based on the same idea.
>>>
>>> Fixes:
>>> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/
>>>
>>> Cc: Nathaniel Roach <nroach44@gmail.com>
>>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>>> ---
>> Hi Baruch, I've already put a patch through [1] that bumps the version
>> in BR, which AFAIK fixes the issues that we've had on the autobuilders.
> 
> Well, I should have been aware to this patch since it seems I also commented 
> on it, but I forgot. I still think this is the right solution, since it would 
> also work if libpng changes its dependencies. Assuming, of course, that 
> bandwidthd doesn't use libz directly.
> 
> Note that I also tried to upgrade to -r10, but build fails with this specific 
> non-thread defconfig because bandwidthd now requires a toolchain supporting 
> -lpthread. So technically this specific configuration is still broken after 
> applying http://patchwork.ozlabs.org/patch/381899/.
> 
> baruch
> 
>> I'm not sure what to do in this situation but I thought I'd just note
>> this here in case my patch had been forgotten.
>>
>> [1] http://patchwork.ozlabs.org/patch/381899/
> 

I do vaguely remember some issue with -lpthread, could you send me the
config?

(It was a while ago, but I'm sure I tested the patch with a basic ARM
config, and IIRC I had the -lpthread issue once or twice but was never
able to reproduce it after my patch)

Thanks, Nathaniel.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-02  7:56     ` Nathaniel Roach
@ 2014-10-02  7:58       ` Baruch Siach
  2014-10-02  8:24         ` Nathaniel Roach
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-02  7:58 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel,

On Thu, Oct 02, 2014 at 03:56:08PM +0800, Nathaniel Roach wrote:
> On 02/10/14 15:52, Baruch Siach wrote:
> > Hi Nathaniel,
> > 
> > On Thu, Oct 02, 2014 at 03:29:18PM +0800, Nathaniel Roach wrote:
> >> On 02/10/14 14:49, Baruch Siach wrote:
> >>> Build against libpng requires -lz when built statically. Patch configure.ac to
> >>> get the needed information from pkg-config.
> >>>
> >>> This patch can not be directly upstreamed as it conflicts with upstream
> >>> changes, but a proper fix would be based on the same idea.
> >>>
> >>> Fixes:
> >>> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/
> >>>
> >>> Cc: Nathaniel Roach <nroach44@gmail.com>
> >>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> >>> ---
> >> Hi Baruch, I've already put a patch through [1] that bumps the version
> >> in BR, which AFAIK fixes the issues that we've had on the autobuilders.
> > 
> > Well, I should have been aware to this patch since it seems I also commented 
> > on it, but I forgot. I still think this is the right solution, since it would 
> > also work if libpng changes its dependencies. Assuming, of course, that 
> > bandwidthd doesn't use libz directly.
> > 
> > Note that I also tried to upgrade to -r10, but build fails with this specific 
> > non-thread defconfig because bandwidthd now requires a toolchain supporting 
> > -lpthread. So technically this specific configuration is still broken after 
> > applying http://patchwork.ozlabs.org/patch/381899/.
> > 
> > baruch
> > 
> >> I'm not sure what to do in this situation but I thought I'd just note
> >> this here in case my patch had been forgotten.
> >>
> >> [1] http://patchwork.ozlabs.org/patch/381899/
> 
> I do vaguely remember some issue with -lpthread, could you send me the
> config?
> 
> (It was a while ago, but I'm sure I tested the patch with a basic ARM
> config, and IIRC I had the -lpthread issue once or twice but was never
> able to reproduce it after my patch)

Get the config from 
http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/config.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-02  7:58       ` Baruch Siach
@ 2014-10-02  8:24         ` Nathaniel Roach
  2014-10-02  8:33           ` Baruch Siach
  0 siblings, 1 reply; 11+ messages in thread
From: Nathaniel Roach @ 2014-10-02  8:24 UTC (permalink / raw)
  To: buildroot

On 02/10/14 15:58, Baruch Siach wrote:
> Hi Nathaniel,
> 
> On Thu, Oct 02, 2014 at 03:56:08PM +0800, Nathaniel Roach wrote:
>> On 02/10/14 15:52, Baruch Siach wrote:
>>> Hi Nathaniel,
>>>
>>> On Thu, Oct 02, 2014 at 03:29:18PM +0800, Nathaniel Roach wrote:
>>>> On 02/10/14 14:49, Baruch Siach wrote:
>>>>> Build against libpng requires -lz when built statically. Patch configure.ac to
>>>>> get the needed information from pkg-config.
>>>>>
>>>>> This patch can not be directly upstreamed as it conflicts with upstream
>>>>> changes, but a proper fix would be based on the same idea.
>>>>>
>>>>> Fixes:
>>>>> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/
>>>>>
>>>>> Cc: Nathaniel Roach <nroach44@gmail.com>
>>>>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>>>>> ---
>>>> Hi Baruch, I've already put a patch through [1] that bumps the version
>>>> in BR, which AFAIK fixes the issues that we've had on the autobuilders.
>>>
>>> Well, I should have been aware to this patch since it seems I also commented 
>>> on it, but I forgot. I still think this is the right solution, since it would 
>>> also work if libpng changes its dependencies. Assuming, of course, that 
>>> bandwidthd doesn't use libz directly.
>>>
>>> Note that I also tried to upgrade to -r10, but build fails with this specific 
>>> non-thread defconfig because bandwidthd now requires a toolchain supporting 
>>> -lpthread. So technically this specific configuration is still broken after 
>>> applying http://patchwork.ozlabs.org/patch/381899/.
>>>
>>> baruch
>>>
>>>> I'm not sure what to do in this situation but I thought I'd just note
>>>> this here in case my patch had been forgotten.
>>>>
>>>> [1] http://patchwork.ozlabs.org/patch/381899/
>>
>> I do vaguely remember some issue with -lpthread, could you send me the
>> config?
>>
>> (It was a while ago, but I'm sure I tested the patch with a basic ARM
>> config, and IIRC I had the -lpthread issue once or twice but was never
>> able to reproduce it after my patch)
> 
> Get the config from 
> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/config.
> 
> baruch
> 

After testing that, you are indeed correct.

I've gone through the emails from a while ago and it's something like this:

Bandwidthd needs libpcap.
If libpcap was compiled with libusb that needs to be checked for/handled.
And if libusb was used apparently /that/ is what needs pthreads, thus
adding an additional dependency on the configure.ac.

I'm not sure why I added a hard pass/fail check for lpthread, as I would
have thought I've done it like I handled like the lpng/zlib issue...

I'll have a play around and see what I can do.

Nathaniel Roach.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-02  8:24         ` Nathaniel Roach
@ 2014-10-02  8:33           ` Baruch Siach
  2014-10-03  6:35             ` Nathaniel Roach
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-02  8:33 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel,

On Thu, Oct 02, 2014 at 04:24:41PM +0800, Nathaniel Roach wrote:
> On 02/10/14 15:58, Baruch Siach wrote:
> > On Thu, Oct 02, 2014 at 03:56:08PM +0800, Nathaniel Roach wrote:
> >> I do vaguely remember some issue with -lpthread, could you send me the
> >> config?
> >>
> >> (It was a while ago, but I'm sure I tested the patch with a basic ARM
> >> config, and IIRC I had the -lpthread issue once or twice but was never
> >> able to reproduce it after my patch)
> > 
> > Get the config from 
> > http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/config.
> 
> After testing that, you are indeed correct.
> 
> I've gone through the emails from a while ago and it's something like this:
> 
> Bandwidthd needs libpcap.
> If libpcap was compiled with libusb that needs to be checked for/handled.
> And if libusb was used apparently /that/ is what needs pthreads, thus
> adding an additional dependency on the configure.ac.
> 
> I'm not sure why I added a hard pass/fail check for lpthread, as I would
> have thought I've done it like I handled like the lpng/zlib issue...
> 
> I'll have a play around and see what I can do.

The libpcap package provides the helpful pcap-config utility that is more or 
less equivalent to pkg-config. grep pcap-config in buildroot to see how it is 
being used to fix static build problems.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-02  8:33           ` Baruch Siach
@ 2014-10-03  6:35             ` Nathaniel Roach
  2014-10-05  4:50               ` Baruch Siach
  0 siblings, 1 reply; 11+ messages in thread
From: Nathaniel Roach @ 2014-10-03  6:35 UTC (permalink / raw)
  To: buildroot

On 02/10/14 16:33, Baruch Siach wrote:
> Hi Nathaniel,
> 
> On Thu, Oct 02, 2014 at 04:24:41PM +0800, Nathaniel Roach wrote:
>> On 02/10/14 15:58, Baruch Siach wrote:
>>> On Thu, Oct 02, 2014 at 03:56:08PM +0800, Nathaniel Roach wrote:
>>>> I do vaguely remember some issue with -lpthread, could you send me the
>>>> config?
>>>>
>>>> (It was a while ago, but I'm sure I tested the patch with a basic ARM
>>>> config, and IIRC I had the -lpthread issue once or twice but was never
>>>> able to reproduce it after my patch)
>>>
>>> Get the config from 
>>> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/config.
>>
>> After testing that, you are indeed correct.
>>
>> I've gone through the emails from a while ago and it's something like this:
>>
>> Bandwidthd needs libpcap.
>> If libpcap was compiled with libusb that needs to be checked for/handled.
>> And if libusb was used apparently /that/ is what needs pthreads, thus
>> adding an additional dependency on the configure.ac.
>>
>> I'm not sure why I added a hard pass/fail check for lpthread, as I would
>> have thought I've done it like I handled like the lpng/zlib issue...
>>
>> I'll have a play around and see what I can do.
> 
> The libpcap package provides the helpful pcap-config utility that is more or 
> less equivalent to pkg-config. grep pcap-config in buildroot to see how it is 
> being used to fix static build problems.
> 
> baruch
> 

Hi Baruch, I didn't end up using pcap-config, but could you check git
version 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e for me? It seems to
work in the config you pasted above and I haven't had any issues in my
other tests.

Thanks, Nathaniel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-03  6:35             ` Nathaniel Roach
@ 2014-10-05  4:50               ` Baruch Siach
  2014-10-05 12:40                 ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2014-10-05  4:50 UTC (permalink / raw)
  To: buildroot

Hi Nathaniel,

On Fri, Oct 03, 2014 at 02:35:19PM +0800, Nathaniel Roach wrote:
> On 02/10/14 16:33, Baruch Siach wrote:
> > On Thu, Oct 02, 2014 at 04:24:41PM +0800, Nathaniel Roach wrote:
> >> On 02/10/14 15:58, Baruch Siach wrote:
> >>> On Thu, Oct 02, 2014 at 03:56:08PM +0800, Nathaniel Roach wrote:
> >>>> I do vaguely remember some issue with -lpthread, could you send me the
> >>>> config?
> >>>>
> >>>> (It was a while ago, but I'm sure I tested the patch with a basic ARM
> >>>> config, and IIRC I had the -lpthread issue once or twice but was never
> >>>> able to reproduce it after my patch)
> >>>
> >>> Get the config from 
> >>> http://autobuild.buildroot.net/results/e49/e496cc4315c06de61379222d3e842d4cd05b2f71/config.
> >>
> >> After testing that, you are indeed correct.
> >>
> >> I've gone through the emails from a while ago and it's something like this:
> >>
> >> Bandwidthd needs libpcap.
> >> If libpcap was compiled with libusb that needs to be checked for/handled.
> >> And if libusb was used apparently /that/ is what needs pthreads, thus
> >> adding an additional dependency on the configure.ac.
> >>
> >> I'm not sure why I added a hard pass/fail check for lpthread, as I would
> >> have thought I've done it like I handled like the lpng/zlib issue...
> >>
> >> I'll have a play around and see what I can do.
> > 
> > The libpcap package provides the helpful pcap-config utility that is more or 
> > less equivalent to pkg-config. grep pcap-config in buildroot to see how it is 
> > being used to fix static build problems.
> 
> Hi Baruch, I didn't end up using pcap-config, but could you check git
> version 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e for me? It seems to
> work in the config you pasted above and I haven't had any issues in my
> other tests.

I can confirm that upgrading bandwidthd to 
4b07a0b3d3a280cdde582060cb29f3333ba4bf6e fixes the build of the config above. 
I still think that holding the complete knowledge of all your indirect 
dependencies, mandatory and optional, is not robust. A better future proof 
solution IMO is to use tools like pkg-config (or pcap-config in the case of 
libpcap) to list all dependencies that are in actual use for this specific 
build. But this is your call as upstream.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-05  4:50               ` Baruch Siach
@ 2014-10-05 12:40                 ` Thomas Petazzoni
  2014-10-05 13:01                   ` Nathaniel Roach
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 12:40 UTC (permalink / raw)
  To: buildroot

Baruch, Nathaniel,

On Sun, 5 Oct 2014 07:50:37 +0300, Baruch Siach wrote:

> > Hi Baruch, I didn't end up using pcap-config, but could you check git
> > version 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e for me? It seems to
> > work in the config you pasted above and I haven't had any issues in my
> > other tests.
> 
> I can confirm that upgrading bandwidthd to 
> 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e fixes the build of the config above. 
> I still think that holding the complete knowledge of all your indirect 
> dependencies, mandatory and optional, is not robust. A better future proof 
> solution IMO is to use tools like pkg-config (or pcap-config in the case of 
> libpcap) to list all dependencies that are in actual use for this specific 
> build. But this is your call as upstream.

I definitely agree with Baruch here. Using pkg-config is much more
robust, as it figures out the indirect dependencies automatically,
without hardcoding them in bandwidthd and/or Buildroot.

However, Baruch patch doesn't seem to be fully correct: it does both a
PKG_CHECK_MODULES on libpng, and an AC_CHECK_LIB, which seems a bit
redundant.

Therefore, Nathaniel, since you're now the upstream developer, could
you make the necessary changes in configure.ac to use pkg-config
instead, and then send a patch updating Buildroot to a new version of
bandwidthd ?

In the mean time, I'll mark:

  http://patchwork.ozlabs.org/patch/395809/
  http://patchwork.ozlabs.org/patch/381899/

as 'Changes requested'.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-05 12:40                 ` Thomas Petazzoni
@ 2014-10-05 13:01                   ` Nathaniel Roach
  2014-10-05 13:12                     ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Nathaniel Roach @ 2014-10-05 13:01 UTC (permalink / raw)
  To: buildroot

On 05/10/14 20:40, Thomas Petazzoni wrote:
> Baruch, Nathaniel,
> 
> On Sun, 5 Oct 2014 07:50:37 +0300, Baruch Siach wrote:
> 
>>> Hi Baruch, I didn't end up using pcap-config, but could you check git
>>> version 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e for me? It seems to
>>> work in the config you pasted above and I haven't had any issues in my
>>> other tests.
>>
>> I can confirm that upgrading bandwidthd to 
>> 4b07a0b3d3a280cdde582060cb29f3333ba4bf6e fixes the build of the config above. 
>> I still think that holding the complete knowledge of all your indirect 
>> dependencies, mandatory and optional, is not robust. A better future proof 
>> solution IMO is to use tools like pkg-config (or pcap-config in the case of 
>> libpcap) to list all dependencies that are in actual use for this specific 
>> build. But this is your call as upstream.
> 
> I definitely agree with Baruch here. Using pkg-config is much more
> robust, as it figures out the indirect dependencies automatically,
> without hardcoding them in bandwidthd and/or Buildroot.
> 
> However, Baruch patch doesn't seem to be fully correct: it does both a
> PKG_CHECK_MODULES on libpng, and an AC_CHECK_LIB, which seems a bit
> redundant.
> 
> Therefore, Nathaniel, since you're now the upstream developer, could
> you make the necessary changes in configure.ac to use pkg-config
> instead, and then send a patch updating Buildroot to a new version of
> bandwidthd ?
> 
> In the mean time, I'll mark:
> 
>   http://patchwork.ozlabs.org/patch/395809/
>   http://patchwork.ozlabs.org/patch/381899/
> 
> as 'Changes requested'.
> 
> Thanks,
> 
> Thomas
> 

Thomas, Baruch:

Yeah, I'm starting to lean that way too. Although I was a little
hesitant adding another build dependency, I now realise that it's
probably getting built anyway, and the version that's currently up on
github was more a case of "getting it to work".

I've had a look at pcap-config and it doesn't seem to do -lpthreads (or
from what I could see anything useful in this case), so I'll likely
adapt Baruch's original patch into upstream for both lpcap and lpng.

It might take me a few days as my study load has increased, but I'll get
it done.

Thanks,

Nathaniel.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH] bandwidthd: fix static build
  2014-10-05 13:01                   ` Nathaniel Roach
@ 2014-10-05 13:12                     ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 13:12 UTC (permalink / raw)
  To: buildroot

Dear Nathaniel Roach,

On Sun, 05 Oct 2014 21:01:43 +0800, Nathaniel Roach wrote:

> Yeah, I'm starting to lean that way too. Although I was a little
> hesitant adding another build dependency, I now realise that it's
> probably getting built anyway, and the version that's currently up on
> github was more a case of "getting it to work".

pkg-config is already needed by a *lot* of packages. And it's very
quick to build (simple C code with no dependencies).

> I've had a look at pcap-config and it doesn't seem to do -lpthreads (or
> from what I could see anything useful in this case), so I'll likely
> adapt Baruch's original patch into upstream for both lpcap and lpng.
> 
> It might take me a few days as my study load has increased, but I'll get
> it done.

Cool, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-10-05 13:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02  6:49 [Buildroot] [PATCH] bandwidthd: fix static build Baruch Siach
     [not found] ` <542CFECE.9020103@gmail.com>
2014-10-02  7:52   ` Baruch Siach
2014-10-02  7:56     ` Nathaniel Roach
2014-10-02  7:58       ` Baruch Siach
2014-10-02  8:24         ` Nathaniel Roach
2014-10-02  8:33           ` Baruch Siach
2014-10-03  6:35             ` Nathaniel Roach
2014-10-05  4:50               ` Baruch Siach
2014-10-05 12:40                 ` Thomas Petazzoni
2014-10-05 13:01                   ` Nathaniel Roach
2014-10-05 13:12                     ` Thomas Petazzoni

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.