All of lore.kernel.org
 help / color / mirror / Atom feed
* Aw: Re: libnftnl.pc lacks dependency from libmnl
@ 2014-06-30 10:41 giorgio.nicole
  2014-06-30 11:27 ` Jan Engelhardt
  0 siblings, 1 reply; 2+ messages in thread
From: giorgio.nicole @ 2014-06-30 10:41 UTC (permalink / raw)
  To: jengelh; +Cc: netfilter-devel

----- Original Nachricht ----
Von:     Jan Engelhardt <jengelh@inai.de>
An:      giorgio.nicole@arcor.de
Datum:   27.06.2014 17:36
Betreff: Re: libnftnl.pc lacks dependency from libmnl

> On Friday 2014-06-27 11:16, giorgio.nicole@arcor.de wrote:
> 
> >Hi,
> >
> >I've noticed that the pkg-config file libnftnl.pc installed by the
> >library package misses the dependency from libmnl in
> >the 'Required:' line.
> >
> ># cat libnftnl.pc.in
> ># libnftnl pkg-config file
> >[...]
> >Name: libnftnl
> >Description: Netfilter nf_tables infrastructure library
> >URL: http://netfilter.org/projects/libnftnl/
> >Version: @VERSION@
> >Requires:                                                             <===
> this line
> 
> This seems correct, as the libmnl development files do not appear to be 
> needed to write a libnftnl program.
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Hi,

(cross) compiling an autotooled version of the 'nftables' package that finds the 'libnftnl'
library using the pkg-config macro 'PKG_CHECK_MODULES()' I get the following
errors:

arm-imx6-linux-gnueabihf-gcc -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wsign-compare -Winit-self -Wformat-nonliteral -Wformat-security -Wmissing-format-attribute -Wcast-align -Wundef -Wbad-function-cast -Waggregate-return -Wunused -Wwrite-strings -I/opt/projects/pkg_root/include  -I/opt/projects/pkg_root/include  -I/opt/projects/pkg_root/include/ncurses  -O2 -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -mfpu=neon -mvectorize-with-neon-quad -mfloat-abi=hard  -L/opt/projects/pkg_root/lib -o nft nft-main.o nft-cli.o nft-rule.o nft-statement.o nft-datatype.o nft-expression.o nft-evaluate.o nft-proto.o nft-payload.o nft-exthdr.o nft-meta.o nft-ct.o nft-netlink.o nft-netlink_linearize.o nft-netlink_delinearize.o n
 ft-segtree.o nft-rbtree.o nft-gmputil.o nft-utils.o nft-erec.o nft-mnl.o nft-scanner.o nft-yacc_parser.o -L/opt/projects/pkg_root/lib -lmnl -lnftnl -lreadline -lncurses -lgmp 
/opt/projects/pkg_root/lib/libnftnl.a(table.o): In function `nft_table_parse_attr_cb':
(.text+0xc): undefined reference to `mnl_attr_get_type'
/opt/projects/pkg_root/lib/libnftnl.a(table.o): In function `nft_table_parse_attr_cb':
(.text+0x1c): undefined reference to `mnl_attr_type_valid'
...

Maybe it is a problem only when doing a static link (I do a static link here).

Note that I also have a '-lmnl' linker option in my gcc cmdline, but it is *before* the '-lnftnl'.

giorgio

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Aw: Re: libnftnl.pc lacks dependency from libmnl
  2014-06-30 10:41 Aw: Re: libnftnl.pc lacks dependency from libmnl giorgio.nicole
@ 2014-06-30 11:27 ` Jan Engelhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2014-06-30 11:27 UTC (permalink / raw)
  To: giorgio.nicole; +Cc: netfilter-devel


On Monday 2014-06-30 12:41, giorgio.nicole@arcor.de wrote:
>
>(cross) compiling an autotooled version of the 'nftables' package that finds the 'libnftnl'
>library using the pkg-config macro 'PKG_CHECK_MODULES()' I get the following
>errors:
>
>arm-imx6-linux-gnueabihf-gcc -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wsign-compare -Winit-self -Wformat-nonliteral -Wformat-security -Wmissing-format-attribute -Wcast-align -Wundef -Wbad-function-cast -Waggregate-return -Wunused -Wwrite-strings -I/opt/projects/pkg_root/include  -I/opt/projects/pkg_root/include  -I/opt/projects/pkg_root/include/ncurses  -O2 -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9 -mfpu=neon -mvectorize-with-neon-quad -mfloat-abi=hard  -L/opt/projects/pkg_root/lib -o nft nft-main.o nft-cli.o nft-rule.o nft-statement.o nft-datatype.o nft-expression.o nft-evaluate.o nft-proto.o nft-payload.o nft-exthdr.o nft-meta.o nft-ct.o nft-netlink.o nft-netlink_linearize.o nft-netlink_delinearize.o 
 nft-segtree.o nft-rbtree.o nft-gmputil.o nft-utils.o nft-erec.o nft-mnl.o nft-scanner.o nft-yacc_parser.o -L/opt/projects/pkg_root/lib -lmnl -lnftnl -lreadline -lncurses -lgmp 
>/opt/projects/pkg_root/lib/libnftnl.a(table.o): In function `nft_table_parse_attr_cb':
>(.text+0xc): undefined reference to `mnl_attr_get_type'
>/opt/projects/pkg_root/lib/libnftnl.a(table.o): In function `nft_table_parse_attr_cb':
>(.text+0x1c): undefined reference to `mnl_attr_type_valid'
>...
>
>Maybe it is a problem only when doing a static link (I do a static link here).

Static linking should be possible, by way of libnftnl.la, which contains:

# Libraries that this one depends upon.
dependency_libs=' -lmnl'

However, nftables is not using automake+libtool, so it gets ignored.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-30 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 10:41 Aw: Re: libnftnl.pc lacks dependency from libmnl giorgio.nicole
2014-06-30 11:27 ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.