Attemping to statically link against libnetstack generates many errors:
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `netstack_rx_thread':
netstack.c:(.text+0x2cf): undefined reference to `nl_recvmsgs_default'
/usr/bin/ld: netstack.c:(.text+0x2e2): undefined reference to `nl_geterror'
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `netstack_tx_thread':
netstack.c:(.text+0x471): undefined reference to `nl_send_simple'
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `msg_handler_internal':
netstack.c:(.text+0x1605): undefined reference to `nlmsg_hdr'
/usr/bin/ld: netstack.c:(.text+0x1998): undefined reference to `nlmsg_next'
/usr/bin/ld: netstack.c:(.text+0x19b0): undefined reference to `nlmsg_ok'
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `subscribe_to_netlink':
netstack.c:(.text+0x1cab): undefined reference to `nl_socket_add_memberships'
/usr/bin/ld: netstack.c:(.text+0x1d16): undefined reference to `nl_socket_add_memberships'
/usr/bin/ld: netstack.c:(.text+0x1d81): undefined reference to `nl_socket_add_memberships'
/usr/bin/ld: netstack.c:(.text+0x1de7): undefined reference to `nl_socket_add_memberships'
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `netstack_init':
netstack.c:(.text+0x1f1f): undefined reference to `nl_socket_alloc'
/usr/bin/ld: netstack.c:(.text+0x1f4b): undefined reference to `nl_socket_disable_seq_check'
/usr/bin/ld: netstack.c:(.text+0x1f5f): undefined reference to `nl_connect'
/usr/bin/ld: netstack.c:(.text+0x1f72): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x1fad): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x212f): undefined reference to `nl_socket_modify_cb'
/usr/bin/ld: netstack.c:(.text+0x2142): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x216e): undefined reference to `nl_socket_modify_err_cb'
/usr/bin/ld: netstack.c:(.text+0x2181): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x21b5): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x21fb): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x2253): undefined reference to `nl_socket_free'
/usr/bin/ld: netstack.c:(.text+0x22c9): undefined reference to `nl_socket_free'
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o):netstack.c:(.text+0x2364): more undefined references to `nl_socket_free' follow
/usr/bin/ld: /usr/local/lib/libnetstack.a(netstack.c.o): in function `netstack_iface_typestr':
netstack.c:(.text+0x2cd7): undefined reference to `nl_llproto2str'
I'm pretty sure we need to add -lnl to our .pc file's static linking instructions.
Attemping to statically link against libnetstack generates many errors:
I'm pretty sure we need to add
-lnl
to our.pc
file's static linking instructions.