diff mbox

[1/2] package/wireshark: Fix libpcap detection

Message ID 1449998185-15082-1-git-send-email-bernd.kuhls@t-online.de
State Accepted
Headers show

Commit Message

Bernd Kuhls Dec. 13, 2015, 9:16 a.m. UTC
To reproduce the build error I had to install libpcap0.8-dev on my host
system, then wireshark configure picks up

checking for pcap-config... /usr/bin/pcap-config

and fails.

Fixes
http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
and many others

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/wireshark/wireshark.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni Dec. 13, 2015, 1:11 p.m. UTC | #1
Dear Bernd Kuhls,

On Sun, 13 Dec 2015 10:16:24 +0100, Bernd Kuhls wrote:
> To reproduce the build error I had to install libpcap0.8-dev on my host
> system, then wireshark configure picks up
> 
> checking for pcap-config... /usr/bin/pcap-config
> 
> and fails.
> 
> Fixes
> http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
> and many others
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/wireshark/wireshark.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

Thomas
Arnout Vandecappelle Dec. 13, 2015, 8:59 p.m. UTC | #2
On 13-12-15 10:16, Bernd Kuhls wrote:
> To reproduce the build error I had to install libpcap0.8-dev on my host
> system, then wireshark configure picks up
> 
> checking for pcap-config... /usr/bin/pcap-config

 To fundamentally avoid this type of issue (we have a bunch of fixes like this),
I think we should add an additional directory that is put in the _beginning_ of
the path in TARGET_MAKE_ENV. This directory could then be populated through the
_CONFIG_SCRIPTS mechanism.

 What do the others think?

 It will be a bit of work to revert all these fixes again :-)

 Regards,
 Arnout

> 
> and fails.
> 
> Fixes
> http://autobuild.buildroot.net/results/7e3/7e363d18866057df0db3d0d95fa8d9116728f6ce//
> and many others
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/wireshark/wireshark.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
> index 534131b..2b06699 100644
> --- a/package/wireshark/wireshark.mk
> +++ b/package/wireshark/wireshark.mk
> @@ -24,6 +24,7 @@ WIRESHARK_CONF_OPTS = \
>  	--enable-static=no \
>  	--with-libsmi=no \
>  	--with-lua=no \
> +	--with-pcap=$(STAGING_DIR)/usr \
>  	--includedir=$(STAGING_DIR)/usr/include
>  
>  # wireshark GUI options
>
Yann E. MORIN Dec. 20, 2015, 12:49 p.m. UTC | #3
Arnout, All,

On 2015-12-13 21:59 +0100, Arnout Vandecappelle spake thusly:
> On 13-12-15 10:16, Bernd Kuhls wrote:
> > To reproduce the build error I had to install libpcap0.8-dev on my host
> > system, then wireshark configure picks up
> > 
> > checking for pcap-config... /usr/bin/pcap-config
> 
>  To fundamentally avoid this type of issue (we have a bunch of fixes like this),
> I think we should add an additional directory that is put in the _beginning_ of
> the path in TARGET_MAKE_ENV. This directory could then be populated through the
> _CONFIG_SCRIPTS mechanism.
> 
>  What do the others think?

I'v estarted having a look at your suggestion. The basic idea is
relatively trivial to do, and I now have a FOO_CONFIG_DIR location
where I put those scripts.

However, I'm not facing a wall: we use the same PATH for both the target
and the host packages, set in BR_PATH. But of course, we do not want the
host variants to find those foo-config scripts, since they are for the
target; we really want host packages to find the host variants, whether
the ones we install as part of our host packages, or the ones from the
system.

So, we'd need to split the PATH for host and target variants.

I wonder if that would be acceptable.

>  It will be a bit of work to revert all these fixes again :-)

Indeed. I've already tried to hunt down all our "fixes" for this, and I
have identified two cases:

  - packages already accept a FOO_CONFIG environement variable; for
    those we just need to unset it;

  - we patch the package to replace a hard-coded cal to foo-config with
    a construct like ${FOO_CONFIG:-foo-config}, for those, we need to
    alse unpatch the package.

My grep-fuu must still be asleep today, since I could only identify wine
in the second category, although I'm pretty sure we have at least a few
other packages that we do patch for that.

The packages in the first category are reltively rare: only about 50 of
them I could identify, so it should be pretty easy to fix.

I'll work on this a bit mor elater today...

Regards,
Yann E. MORIN.
Peter Korsgaard Dec. 29, 2015, 10:14 p.m. UTC | #4
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

> On 13-12-15 10:16, Bernd Kuhls wrote:
>> To reproduce the build error I had to install libpcap0.8-dev on my host
>> system, then wireshark configure picks up
>> 
>> checking for pcap-config... /usr/bin/pcap-config

>  To fundamentally avoid this type of issue (we have a bunch of fixes like this),
> I think we should add an additional directory that is put in the _beginning_ of
> the path in TARGET_MAKE_ENV. This directory could then be populated through the
> _CONFIG_SCRIPTS mechanism.

>  What do the others think?

Sounds good to me!

>  It will be a bit of work to revert all these fixes again :-)

But that can be done iteratively. The point is that buildroot will do
the right thing for these scripts out of the box (as long as they are
listed in the packages providing them) and users of those scripts will
automatically get the right ones.
diff mbox

Patch

diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
index 534131b..2b06699 100644
--- a/package/wireshark/wireshark.mk
+++ b/package/wireshark/wireshark.mk
@@ -24,6 +24,7 @@  WIRESHARK_CONF_OPTS = \
 	--enable-static=no \
 	--with-libsmi=no \
 	--with-lua=no \
+	--with-pcap=$(STAGING_DIR)/usr \
 	--includedir=$(STAGING_DIR)/usr/include
 
 # wireshark GUI options