> -----Ursprüngliche Nachricht----- > Von: [email protected] [mailto:netsniff- > [email protected]] Im Auftrag von Daniel Borkmann > Gesendet: Dienstag, 21. August 2012 11:01 > An: [email protected] > Betreff: Re: [netsniff-ng] Build Errors Netsniff-ng > > On Tue, Aug 21, 2012 at 10:39 AM, Markus Amend <markus@netsniff- > ng.org> wrote: > > > I'm actually not able to compile netsniff-ng. OS: Ubuntu 10.04 64bit. > > > > Terminal output after "make" > > > > [...] > > [100%] Building C object > > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/netsniff-ng.c.o > > Linking C executable netsniff-ng > > CMakeFiles/netsniff-ng.dir/__/mac80211.c.o: In function `nl80211_init': > > mac80211.c:(.text+0xba): undefined reference to `nl_handle_alloc' > > mac80211.c:(.text+0xd1): undefined reference to `genl_connect' > > mac80211.c:(.text+0xdd): undefined reference to `genl_ctrl_alloc_cache' > > mac80211.c:(.text+0xf5): undefined reference to > `genl_ctrl_search_by_name' > > mac80211.c:(.text+0x122): undefined reference to `genl_ctrl_alloc_cache' > > CMakeFiles/netsniff-ng.dir/__/mac80211.c.o: In function > > `enter_rfmon_mac80211': > > mac80211.c:(.text+0x262): undefined reference to `nlmsg_alloc' > > mac80211.c:(.text+0x278): undefined reference to `genl_family_get_id' > > mac80211.c:(.text+0x29b): undefined reference to `genlmsg_put' > > mac80211.c:(.text+0x2b5): undefined reference to `nla_put' > > mac80211.c:(.text+0x307): undefined reference to `nla_put' > > mac80211.c:(.text+0x32c): undefined reference to `nla_put' > > mac80211.c:(.text+0x341): undefined reference to > `nl_send_auto_complete' > > mac80211.c:(.text+0x353): undefined reference to `nl_wait_for_ack' > > mac80211.c:(.text+0x376): undefined reference to `nlmsg_free' > > mac80211.c:(.text+0x3a3): undefined reference to `genl_family_put' > > mac80211.c:(.text+0x3ad): undefined reference to `nl_cache_free' > > mac80211.c:(.text+0x3b7): undefined reference to `nl_handle_destroy' > > mac80211.c:(.text+0x454): undefined reference to `nlmsg_free' > > CMakeFiles/netsniff-ng.dir/__/mac80211.c.o: In function > > `leave_rfmon_mac80211': > > mac80211.c:(.text+0x51a): undefined reference to `nlmsg_alloc' > > mac80211.c:(.text+0x530): undefined reference to `genl_family_get_id' > > mac80211.c:(.text+0x553): undefined reference to `genlmsg_put' > > mac80211.c:(.text+0x56e): undefined reference to `nla_put' > > mac80211.c:(.text+0x583): undefined reference to > `nl_send_auto_complete' > > mac80211.c:(.text+0x591): undefined reference to `nl_wait_for_ack' > > mac80211.c:(.text+0x59d): undefined reference to `nlmsg_free' > > mac80211.c:(.text+0x5a7): undefined reference to `genl_family_put' > > mac80211.c:(.text+0x5b1): undefined reference to `nl_cache_free' > > mac80211.c:(.text+0x5bb): undefined reference to `nl_handle_destroy' > > collect2: ld returned 1 exit status > > make[2]: *** [netsniff-ng/netsniff-ng] Error 1 > > make[1]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/all] Error 2 > > make: *** [all] Error 2 > > > > It's a problem with netlink? Any ideas? > > Hmm, on my Debian stable system (where it links w/o problems), I have > installed the following: > > dpkg --get-selections | grep libnl > libnl-dev install > libnl1 install > > Where the Debian libnl version is 1.1-6, in Ubuntu 10.04 its 1.1-5build1. The > diff between "-5" and "-6" in the Debian package only refers to a bugfix and > some Debian-related changes. > > Also, from your log, I see that the headers were found otherwise the build > would have stopped earlier. If you remove your src/build/ folder, recreate it > and type "cmake ..", what does it say?
I always make a "rm -rf*" in the build dir before compiling :-) And it's all fine. cmake .. -- The C compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Performing Test BPFATTACH_RUN_RESULT -- Performing Test BPFATTACH_RUN_RESULT - Success -- System has SO_ATTACH_FILTER/SO_DETACH_FILTER support -- Performing Test PFPACKET_RUN_RESULT -- Performing Test PFPACKET_RUN_RESULT - Success -- System has PF_PACKET sockets -- Performing Test STRICT_ALIGN_RUN_RESULT -- Performing Test STRICT_ALIGN_RUN_RESULT - Success -- System has strict alignment -- Performing Test TX_RING_RUN_RESULT -- Performing Test TX_RING_RUN_RESULT - Success -- System has TX_RING support -- Performing Test eth0 -- Performing Test eth0 - Failed -- System has no SOF_TIMESTAMPING_RAW_HARDWARE support -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found Libnl: /usr/lib/libnl.so -- Found Curses: /usr/lib/libcurses.so -- Found FLEX: /usr/bin/flex -- Found BISON: /usr/bin/bison -- Found libcli: /usr/lib/libcli.so -- Found LibGeoIP: /usr/lib/libGeoIP.so -- REQUIRED_VARS (missing: NACL_LIBRARY NACL_INCLUDE_DIR) NaCl was not found. Check if NACL_INCLUDE_DIR and NACL_LIB_DIR are properly set in nacl_path.cmake. Skipping curvetun build. -- Found libnetfilter_conntrack: /usr/lib/libnetfilter_conntrack.so -- Found liburcu: /usr/lib/liburcu.so -- Configuring done -- Generating done -- Build files have been written to: /home/markus/Desktop/git_netsniff/netsniff-ng/src/build > > Cheers, > > Daniel > > -- > --
