On Wed, Aug 22, 2012 at 10:58 AM, Markus Amend <[email protected]> wrote:
>> -----Ursprüngliche Nachricht----- >> Von: [email protected] [mailto:netsniff- >> [email protected]] Im Auftrag von Daniel Borkmann >> Gesendet: Dienstag, 21. August 2012 18:50 >> An: [email protected] >> Betreff: Re: [netsniff-ng] Build Errors Netsniff-ng >> >> On Tue, Aug 21, 2012 at 11:17 AM, Markus Amend <markus@netsniff- >> ng.org> wrote: >> >> -----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 >> >> What does the following say? >> >> readelf -Ws /usr/lib/libnl.so | grep nla_put > > 126: 0000000000018300 29 FUNC GLOBAL DEFAULT 12 nla_put_u64 > 192: 00000000000181e0 90 FUNC GLOBAL DEFAULT 12 nla_put_addr > 357: 00000000000182b0 69 FUNC GLOBAL DEFAULT 12 nla_put_string > 536: 0000000000018390 93 FUNC GLOBAL DEFAULT 12 nla_put_nested > 543: 0000000000018090 239 FUNC GLOBAL DEFAULT 12 nla_put > 545: 00000000000182a0 9 FUNC GLOBAL DEFAULT 12 nla_put_flag > 596: 0000000000018320 5 FUNC GLOBAL DEFAULT 12 nla_put_msecs > 650: 0000000000018370 28 FUNC GLOBAL DEFAULT 12 nla_put_u8 > 718: 0000000000018350 29 FUNC GLOBAL DEFAULT 12 nla_put_u16 > 748: 0000000000018240 90 FUNC GLOBAL DEFAULT 12 nla_put_data > 817: 0000000000018330 28 FUNC GLOBAL DEFAULT 12 nla_put_u32 >> >> file /usr/lib/libnl.so.1.1 (... or where ever you .so points to) > > /usr/lib/libnl.so.1.1: ELF 64-bit LSB shared object, x86-64, version 1 > (SYSV), dynamically linked, stripped Looks good! > v0.5.7 is able to compile. So, 0.5.7 is able to compile, but the latest master doesn't? Cheers, Daniel --
