Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375679 - net-analyzer/tcpreplay-3.4.4-r1 cross compilation fix
Summary: net-analyzer/tcpreplay-3.4.4-r1 cross compilation fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL: http://tcpreplay.synfin.net/changeset...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 18:59 UTC by Bertrand Jacquin
Modified: 2012-04-12 04:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
tcpreplay-BJA-cross.diff (tcpreplay-BJA-cross.diff,1.71 KB, patch)
2011-07-19 18:59 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2011-07-19 18:59:19 UTC
tcpreplay can't cross compile as configure.ac use AC_RUN_IFELSE without
defining a cross-compiling result :

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=i586-alix-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --locals tatedir=/var/lib
+--enable-shared --disable-local-libopts --with-tcpdump=/usr/sbin/tcpdump --without-pcapnav-config --disable-debug
...
checking for library containing pcap_close... -lpcap
checking for libpcap version... configure: error: in `/usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/tcpreplay-3.4.4-r1/work/tcpreplay-3.4.4':
configure: error: cannot run test program while cross compiling

So here is a fix to default to last pcap release

configure: Building tcpbridge
checking for PF_PACKET socket sending support... yes
checking for BPF device sending support... configure: error: in `/usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/tcpreplay-3.4.4-r1/work/tcpreplay-3.4.4':
configure: error: cannot run test program while cross compiling

Same case, and use AC_CACHE_CHECK to let users define ac_cv_have_bpf and
control the result if cross compiling :

configure: Building tcpbridge
checking for PF_PACKET socket sending support... yes
checking for BPF device sending support... configure: error:
cross-compiling,
  presetting ac_cv_have_bpf=(yes|no) will help

This apply on 3.4.4, I did check for 3.4.5_beta2, this should apply too.

Reported upstream

Reproducible: Always
Comment 1 Bertrand Jacquin 2011-07-19 18:59:42 UTC
Created attachment 280405 [details, diff]
tcpreplay-BJA-cross.diff
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2011-10-04 07:22:03 UTC
Thank you Bertrand. Will be fixed with next version bump.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-04-12 04:05:20 UTC
Still no new version out, so fixed in 3.4.4-r2 and 3.4.5_beta3.