[Bug 914] nft configure does not use --prefix as include/lib search path

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Mon Feb 13 14:41:55 CET 2017


https://bugzilla.netfilter.org/show_bug.cgi?id=914

Phil Sutter <phil at nwl.cc> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phil at nwl.cc

--- Comment #3 from Phil Sutter <phil at nwl.cc> ---
AFAICT, '--prefix' option is not even meant for that. It just alters DESTDIR
variable used for installing. In order to build nftables against a specific
libnftnl installed at $libpath (via '--prefix=$libpath' in libnftnl's
configure), one has to call nftables configure like so:

./configure LIBNFTNL_LIBS="-L${libpath}/lib -lnftnl" \
            LIBNFTNL_CFLAGS="-I${libpath}/include"

But this will cause the resulting nft binary to be dynamically linked. So upon
execution, ${libpath}/lib has to be added to LD_LIBRARY_PATH.

I personally build libnftnl static to overcome this, then I can build nftables
like so:

./configure LIBNFTNL_LIBS="${libpath}/lib/libnftnl.a" \
            LIBNFTNL_CFLAGS="-I${libpath}/include"

This causes the resulting nft binary to be statically linked against libnftnl
and therefore I don't have to adjust LD_LIBRARY_PATH upon execution.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170213/bda74737/attachment.html>


More information about the netfilter-buglog mailing list