Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375693 - net-analyzer/ettercap-0.7.5* fails to cross-compile
Summary: net-analyzer/ettercap-0.7.5* fails to cross-compile
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 21:12 UTC by Bertrand Jacquin
Modified: 2013-05-27 19:38 UTC (History)
2 users (show)

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


Attachments
files/ettercap-BJA-cross-NS_GET32.diff (ettercap-BJA-cross-NS_GET32.diff,292 bytes, patch)
2011-07-19 21:13 UTC, Bertrand Jacquin
Details | Diff
ettercap-0.7.3-r4.ebuild-BJA-autotools.diff (ettercap-0.7.3-r4.ebuild-BJA-autotools.diff,610 bytes, patch)
2011-07-19 21:14 UTC, Bertrand Jacquin
Details | Diff
net-analyzer:ettercap-0.7.5_pre20120903:20120911-195120.log (net-analyzer:ettercap-0.7.5_pre20120903:20120911-195120.log,18.29 KB, text/plain)
2012-09-11 19:56 UTC, Bertrand Jacquin
Details
net-analyzer:ettercap-0.7.6:20130527-183144.log (net-analyzer:ettercap-0.7.6:20130527-183144.log,20.74 KB, text/x-log)
2013-05-27 19:38 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2011-07-19 21:12:38 UTC
ettercap can't cross compile as acinclude.m4 use AC_TRY_RUN to determine if NS_GET32 exist. It should not be run but only linked.

# i586-alix-linux-gnu-emerge -vat ettercap
..
>>> Configuring source in /usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/ettercap-0.7.3-r4/work/ettercap-NG-0.7.3 ...
 * econf: updating ettercap-NG-0.7.3/libltdl/config/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating ettercap-NG-0.7.3/libltdl/config/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating ettercap-NG-0.7.3/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating ettercap-NG-0.7.3/config.sub with /usr/share/gnuconfig/config.sub
./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 --localstated
ir=/var/lib --disable-dependency-tracking --with-openssl=/usr --disable-gtk --disable-debug --with-ncurses
...
checking for NS_GET32... configure: error: in `/usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/ettercap-0.7.3-r4/work/ettercap-NG-0.7.3':
configure: error: cannot run test program while cross compiling
See `config.log' for more details

Attached a patch to fix that

Reproducible: Always
Comment 1 Bertrand Jacquin 2011-07-19 21:13:02 UTC
Created attachment 280409 [details, diff]
files/ettercap-BJA-cross-NS_GET32.diff
Comment 2 Bertrand Jacquin 2011-07-19 21:14:53 UTC
Created attachment 280411 [details, diff]
ettercap-0.7.3-r4.ebuild-BJA-autotools.diff

Previous patch impose to run twice autoconf, I really don't understand why, so it's a bit crap but actully work.

Also add --with-libnet to precise libnet PATH.
Comment 3 Bertrand Jacquin 2011-07-19 21:16:09 UTC
> Also add --with-libnet to precise libnet PATH.

checking for libnet... no
configure: error: libnet >= 1.1.2.1 not found
Comment 4 Agostino Sarubbo gentoo-dev 2012-09-07 21:58:09 UTC
Could you test latest 0.7.5_pre* ? It is based on cmake and should not fail.
Comment 5 Bertrand Jacquin 2012-09-11 19:56:08 UTC
Created attachment 323540 [details]
net-analyzer:ettercap-0.7.5_pre20120903:20120911-195120.log

(In reply to comment #4)
> Could you test latest 0.7.5_pre* ? It is based on cmake and should not fail.

But it fail ;)
Comment 6 SpanKY gentoo-dev 2012-09-27 19:23:12 UTC
(In reply to comment #1)

changing to TRY_LINK from TRY_RUN for NS_GET32 is fine ... we just want to make sure the macro exists and expands correctly (a compile would miss the case where it didn't exist and so becomes an undefined func reference).

EC_GCC_MACRO could be a compile-only test, but the current logic doesn't do anything useful other than error out when doing a native test (skips for cross).

(In reply to comment #2)

ROOT should never be used in a src_* func, so this change is unacceptable.  the autotool logic also looks completely broken.

libnet doesn't provide a .pc file, just a -config script, so you probably want to use the `cross-fix-root` script to mung things to work for cross-compiling.
Comment 7 Agostino Sarubbo gentoo-dev 2012-10-05 13:39:29 UTC
@Bertrand Jacquin  please attach you emerge --info
Comment 8 Agostino Sarubbo gentoo-dev 2012-10-06 08:50:22 UTC
(In reply to comment #5)
> But it fail ;)

Please test latest tarball: ettercap-0.7.5_pre20121006
Comment 9 Luca Barbato gentoo-dev 2012-10-23 16:16:34 UTC
Somebody should get libnet upstream to provide a .pc
Comment 10 Bertrand Jacquin 2013-05-27 19:38:32 UTC
Created attachment 349384 [details]
net-analyzer:ettercap-0.7.6:20130527-183144.log

On my side with the new cmake build system, cmake found lib in the HOST environnement instead of SYSROOT

Here is an updated build log for net-analyzer/ettercap-0.7.6