Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 364397 - net-analyzer/nessus-core-2.2.9-r1 - /usr/lib/libnessus.so: undefined reference to `pcap_close'
Summary: net-analyzer/nessus-core-2.2.9-r1 - /usr/lib/libnessus.so: undefined referenc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 21:02 UTC by Chad A. Simmons
Modified: 2011-04-22 10:40 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chad A. Simmons 2011-04-21 21:02:36 UTC
Attempt to compile nessus-core-2.2.9-r1 on ~amd64 (libpcap 1.1.1-r1) fails with undefined pcap references.

Reproducible: Always

Steps to Reproduce:
1. On ~amd64 with libpcap 1.1.1-r1 emerge nessus-core
2. compile failure
3.
Actual Results:  
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed `sh ./cflags`  auth.o attack.o comm.o log.o rules.o sighand.o processes.o users.o utils.o ntp_10.o ntp_11.o parser.o hosts.o preferences.o piic.o pluginload.o nasl_plugins.o nes_plugins.o plugs_req.o nessusd.o save_tests.o save_kb.o detached.o pluginlaunch.o locks.o dirutils.o md5.o plugs_hash.o pluginupload.o pluginscheduler.o shared_socket.o   -o nessusd `/usr/bin/nasl-config --libs` `/usr/bin/nessus-config --libs`    -ldl
/usr/lib/libnessus.so: undefined reference to `pcap_close'
/usr/lib/libnessus.so: undefined reference to `pcap_perror'
/usr/lib/libnessus.so: undefined reference to `pcap_open_live'
/usr/lib/libnessus.so: undefined reference to `pcap_compile'
/usr/lib/libnessus.so: undefined reference to `pcap_lookupnet'
/usr/lib/libnessus.so: undefined reference to `pcap_datalink'
/usr/lib/libnessus.so: undefined reference to `pcap_setfilter'
/usr/lib/libnessus.so: undefined reference to `pcap_lookupdev'
/usr/lib/libnessus.so: undefined reference to `pcap_next'
collect2: ld returned 1 exit status
make[1]: *** [nessus-check-signature] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/net-analyzer/nessus-core-2.2.9-r1/work/nessus-core/nessusd'
make: *** [server] Error 2


Expected Results:  
Compiled/installed
Comment 1 Vikraman (RETIRED) gentoo-dev 2011-04-22 00:02:39 UTC
--as-needed bug
Comment 2 Vikraman (RETIRED) gentoo-dev 2011-04-22 00:04:10 UTC
Quick fix :

--- a/nessusd/Makefile	2004-10-27 13:26:17.000000000 +0530
+++ b/nessusd/Makefile	2011-04-22 05:12:28.074525476 +0530
@@ -3,7 +3,8 @@
 LIBS =  `$(NASLCONFIG) --libs` `$(NESSUSCONFIG) --libs`  \
 	$(W_STATIC)  $(W_DYNAMIC) \
 	$(DL_LIB)  \
-	$(COMPAT_LIB) $(LIBWRAP)
+	$(COMPAT_LIB) $(LIBWRAP) \
+	-lpcap
 NESSUS_INCLUDE=`sh ./cflags` 
 OBJS = auth.o \
        attack.o \
Comment 3 Willard Dawson 2011-04-22 03:19:48 UTC
(In reply to comment #2)
> Quick fix :
> 
> --- a/nessusd/Makefile    2004-10-27 13:26:17.000000000 +0530
> +++ b/nessusd/Makefile    2011-04-22 05:12:28.074525476 +0530
> @@ -3,7 +3,8 @@
>  LIBS =  `$(NASLCONFIG) --libs` `$(NESSUSCONFIG) --libs`  \
>      $(W_STATIC)  $(W_DYNAMIC) \
>      $(DL_LIB)  \
> -    $(COMPAT_LIB) $(LIBWRAP)
> +    $(COMPAT_LIB) $(LIBWRAP) \
> +    -lpcap
>  NESSUS_INCLUDE=`sh ./cflags` 
>  OBJS = auth.o \
>         attack.o \

Works for me...
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2011-04-22 10:34:43 UTC
I will take care off this.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2011-04-22 10:40:09 UTC
+  22 Apr 2011; Justin Lecher <jlec@gentoo.org> +files/2.2.9-asneeded.patch,
+  nessus-core-2.2.9-r1.ebuild:
+  As-needed fixes, #364397
+

Please sync later. It is fixed now.