Hi, On Mon, Mar 16, 2020 at 08:16:28AM +0000, MELCHOR PENA, Bernardo Santiago wrote: > After downloading snapshots for NFTABLES and LIBNFTNL for 20200314 I proceeded to compile both library and NFTABLES > > Library compiled with no errors. > libnftnl installed in /usr/local/lib > > pi@raspberrypi:~/nftables-20200314 $ ls -lia /usr/local/lib/libnftnl.* > 130735 -rwxr-xr-x 1 root root 974 Mar 15 10:55 /usr/local/lib/libnftnl.la > 150748 lrwxrwxrwx 1 root root 18 Mar 15 10:55 /usr/local/lib/libnftnl.so -> libnftnl.so.11.2.0 > 150737 lrwxrwxrwx 1 root root 18 Mar 15 10:55 /usr/local/lib/libnftnl.so.11 -> libnftnl.so.11.2.0 > 130734 -rwxr-xr-x 1 root root 969712 Mar 15 10:55 /usr/local/lib/libnftnl.so.11.2.0 > > > nftables gives this error when compiling with Make > > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_flowtable_set_data@LIBNFTNL_13' > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_udata_nest_end@LIBNFTNL_14' > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_obj_set_data@LIBNFTNL_13' > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_flowtable_get_u64@LIBNFTNL_11' > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_flowtable_set_u64@LIBNFTNL_11' > /usr/bin/ld: ./.libs/libnftables.so: undefined reference to `nftnl_udata_nest_start@LIBNFTNL_14' > > I have tried to point link under nftables-20200314/src/.libs > to point to /usr/local/lib with ln -sf /usr/local/lib/libnftnl.so ./libnftables.so Looks like you're compiling against host's libnftnl by accident. Have a look at the build script I attached to this email. Put it into nftables TOPDIR and adjust LIBNFTNL_PATH, then call as regular user. Cheers, Phil
Attachment:
full_rebuild.sh
Description: Bourne shell script