Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94184 - net-analyzer/dsniff - dnsspoof.c won't compile withoug -lresolv
Summary: net-analyzer/dsniff - dnsspoof.c won't compile withoug -lresolv
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
: 226905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-27 07:29 UTC by Steven Tasker
Modified: 2008-11-25 10:05 UTC (History)
2 users (show)

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


Attachments
dsniff.patch (dsniff.patch,1.71 KB, patch)
2008-08-01 20:54 UTC, Timothy Redaelli (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Tasker 2005-05-27 07:29:56 UTC
when emerging dsniff-2.3-r4 I get the following error:

gcc  -o dnsspoof dnsspoof.o pcaputil.o -lnsl -lrpcsvc  -L. -lmissing -L/usr/lib
-lpcap -L/usr/lib -lnet-1.0
dnsspoof.o: In function `dns_spoof':
dnsspoof.c:(.text+0x5ab): undefined reference to `__dn_expand'
dnsspoof.c:(.text+0x708): undefined reference to `__dn_comp'
collect2: ld returned 1 exit status
make: *** [dnsspoof] Error 1

If you run 

gcc  -o dnsspoof dnsspoof.o pcaputil.o -lnsl -lrpcsvc  -L. -lmissing -L/usr/lib
-lpcap -L/usr/lib -lnet-1.0 -lresolv

the command will work just fine and you can manually make and make install the
rest. this should be placed in the ebuild.

Reproducible: Always
Steps to Reproduce:
1. emerge dsniff
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2005-06-27 11:51:18 UTC
I can confirm.
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2005-06-27 12:29:57 UTC
In -r5, along with ~amd64 keyword. Thanks for reporting.
Comment 3 Timothy Redaelli (RETIRED) gentoo-dev 2008-08-01 20:54:56 UTC
Created attachment 161939 [details, diff]
dsniff.patch
Comment 4 Timothy Redaelli (RETIRED) gentoo-dev 2008-08-01 20:57:21 UTC
You shouldn't use append-ldflag for libs (it will not works with --as-needed for examples).
I attached a patch to fix configure.in to use -lresolv only when we need it
Comment 5 Hanno Böck gentoo-dev 2008-11-25 10:02:44 UTC
*** Bug 226905 has been marked as a duplicate of this bug. ***
Comment 6 Hanno Böck gentoo-dev 2008-11-25 10:05:09 UTC
done