Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails on linking libpcap.a libnl #223

Open
T35R6braPwgDJKq opened this issue Aug 30, 2021 · 2 comments
Open

build fails on linking libpcap.a libnl #223

T35R6braPwgDJKq opened this issue Aug 30, 2021 · 2 comments

Comments

@T35R6braPwgDJKq
Copy link

...
Building mettle for native
/usr/bin/ld: mettle/build/linux.x86_64/lib/libpcap.a(pcap-linux.o): in function `nl80211_init':
pcap-linux.c:(.text+0x5dd): undefined reference to `nl_socket_alloc'
/usr/bin/ld: pcap-linux.c:(.text+0x610): undefined reference to `genl_connect'
/usr/bin/ld: pcap-linux.c:(.text+0x643): undefined reference to `genl_ctrl_alloc_cache'
/usr/bin/ld: pcap-linux.c:(.text+0x650): undefined reference to `nl_geterror'
/usr/bin/ld: pcap-linux.c:(.text+0x682): undefined reference to `genl_ctrl_search_by_name'
/usr/bin/ld: pcap-linux.c:(.text+0x6af): undefined reference to `nl_cache_free'
/usr/bin/ld: pcap-linux.c:(.text+0x6b8): undefined reference to `nl_socket_free'
/usr/bin/ld: mettle/build/linux.x86_64/lib/libpcap.a(pcap-linux.o): in function `nl80211_cleanup':
pcap-linux.c:(.text+0x6d4): undefined reference to `genl_family_put'
/usr/bin/ld: pcap-linux.c:(.text+0x6dd): undefined reference to `nl_cache_free'
/usr/bin/ld: mettle/build/linux.x86_64/lib/libpcap.a(pcap-linux.o): in function `del_mon_if':
pcap-linux.c:(.text+0x1434): undefined reference to `nlmsg_alloc'
/usr/bin/ld: pcap-linux.c:(.text+0x1463): undefined reference to `genl_family_get_id'
/usr/bin/ld: pcap-linux.c:(.text+0x147b): undefined reference to `genlmsg_put'
/usr/bin/ld: pcap-linux.c:(.text+0x1497): undefined reference to `nla_put'
/usr/bin/ld: pcap-linux.c:(.text+0x14c6): undefined reference to `nl_send_auto_complete'
/usr/bin/ld: pcap-linux.c:(.text+0x14d3): undefined reference to `nl_geterror'
/usr/bin/ld: pcap-linux.c:(.text+0x14ed): undefined reference to `nl_wait_for_ack'
/usr/bin/ld: pcap-linux.c:(.text+0x14fa): undefined reference to `nl_geterror'
/usr/bin/ld: pcap-linux.c:(.text+0x1521): undefined reference to `nlmsg_free'
/usr/bin/ld: pcap-linux.c:(.text+0x1535): undefined reference to `nlmsg_free'
/usr/bin/ld: mettle/build/linux.x86_64/lib/libpcap.a(pcap-linux.o): in function `enter_rfmon_mode_mac80211':
pcap-linux.c:(.text+0x2083): undefined reference to `nlmsg_alloc'
/usr/bin/ld: pcap-linux.c:(.text+0x20a4): undefined reference to `genl_family_get_id'
/usr/bin/ld: pcap-linux.c:(.text+0x20bc): undefined reference to `genlmsg_put'
/usr/bin/ld: pcap-linux.c:(.text+0x20db): undefined reference to `nla_put'
/usr/bin/ld: pcap-linux.c:(.text+0x2100): undefined reference to `nla_put'
/usr/bin/ld: pcap-linux.c:(.text+0x2125): undefined reference to `nla_put'
/usr/bin/ld: pcap-linux.c:(.text+0x213a): undefined reference to `nl_send_auto_complete'
/usr/bin/ld: pcap-linux.c:(.text+0x214c): undefined reference to `nl_geterror'
/usr/bin/ld: pcap-linux.c:(.text+0x2168): undefined reference to `nl_wait_for_ack'
/usr/bin/ld: pcap-linux.c:(.text+0x2179): undefined reference to `nlmsg_free'
/usr/bin/ld: pcap-linux.c:(.text+0x21a0): undefined reference to `nl_geterror'
/usr/bin/ld: pcap-linux.c:(.text+0x21c7): undefined reference to `nlmsg_free'
/usr/bin/ld: pcap-linux.c:(.text+0x21d9): undefined reference to `nlmsg_free'
/usr/bin/ld: mettle/build/linux.x86_64/lib/libpcap.a(pcap-linux.o): in function `nl80211_cleanup':
pcap-linux.c:(.text+0x6e6): undefined reference to `nl_socket_free'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:390: sniffer] Error 1
make[2]: *** [Makefile:353: install-recursive] Error 1
make[1]: *** [Makefile:383: install-recursive] Error 1
make: *** [make/Makefile.mettle:70: mettle/build/linux.x86_64/bin/mettle.built] Error 2
pacman -Q libnl 
libnl 3.5.0-3
@timwr
Copy link
Contributor

timwr commented Aug 30, 2021

What OS are you building on?
Also can you try:
make TARGET=x86_64-linux-musl

@T35R6braPwgDJKq
Copy link
Author

T35R6braPwgDJKq commented Aug 30, 2021

arch linux
make TARGET=x86_64-linux-musl works though - but whats the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants