* compilation of netfilter missing libnftnl functions - undefined reference - (RASPBERRY pi 3B)
@ 2020-03-16 8:16 MELCHOR PENA, Bernardo Santiago
2020-03-18 11:06 ` Phil Sutter
0 siblings, 1 reply; 2+ messages in thread
From: MELCHOR PENA, Bernardo Santiago @ 2020-03-16 8:16 UTC (permalink / raw)
To: netfilter-devel@vger.kernel.org
Hi,
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
Errors then are the following after running Make
/usr/bin/ld: main.o: in function `main':
/home/pi/nftables-20200314/src/main.c:260: undefined reference to `nft_ctx_new'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:305: undefined reference to `nft_ctx_output_get_debug'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:276: undefined reference to `nft_ctx_set_dry_run'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:285: undefined reference to `nft_ctx_add_include_path'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:331: undefined reference to `nft_ctx_output_set_debug'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:367: undefined reference to `nft_ctx_output_set_flags'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:384: undefined reference to `nft_run_cmd_from_buffer'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:400: undefined reference to `nft_ctx_free'
/usr/bin/ld: /home/pi/nftables-20200314/src/main.c:386: undefined reference to `nft_run_cmd_from_filename'
/usr/bin/ld: cli.o: in function `cli_complete':
/home/pi/nftables-20200314/src/cli.c:133: undefined reference to `nft_run_cmd_from_buffer'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:644: nft] Error 1
make[3]: Leaving directory '/home/pi/nftables-20200314/src'
make[2]: *** [Makefile:500: all] Error 2
make[2]: Leaving directory '/home/pi/nftables-20200314/src'
make[1]: *** [Makefile:479: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/nftables-20200314'
make: *** [Makefile:388: all] Error 2
running RASPBIAN (buster) on raspberry 3B
Please, tell me what combination of lib and user app should I compile. I got kernel compiled for RASPBERRY with all nft enabled options but I am struggling with this part.
Thanks
Bernardo Santiago Melchor Pena,
IT Security Engineer | IT Security Infrastructure Unit
Infrastructure Services Section | Division of Information Technology
International Atomic Energy Agency | M: (+43) 699-165-22924 | Vienna International Centre, PO Box 100, 1400 Vienna, Austria |
Follow us on www.iaea.org
This email message is intended only for the use of the named recipient. Information contained in this email message and its attachments may be privileged, confidential and protected from disclosure. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others. Also please notify the sender by replying to this message and then delete it from your system.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: compilation of netfilter missing libnftnl functions - undefined reference - (RASPBERRY pi 3B)
2020-03-16 8:16 compilation of netfilter missing libnftnl functions - undefined reference - (RASPBERRY pi 3B) MELCHOR PENA, Bernardo Santiago
@ 2020-03-18 11:06 ` Phil Sutter
0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2020-03-18 11:06 UTC (permalink / raw)
To: MELCHOR PENA, Bernardo Santiago; +Cc: netfilter-devel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]
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 #2: full_rebuild.sh --]
[-- Type: application/x-sh, Size: 967 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-18 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16 8:16 compilation of netfilter missing libnftnl functions - undefined reference - (RASPBERRY pi 3B) MELCHOR PENA, Bernardo Santiago
2020-03-18 11:06 ` Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).