* [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' @ 2026-01-27 22:15 Phil Sutter 2026-02-05 1:32 ` Pablo Neira Ayuso 0 siblings, 1 reply; 4+ messages in thread From: Phil Sutter @ 2026-01-27 22:15 UTC (permalink / raw) To: Pablo Neira Ayuso; +Cc: netfilter-devel When building nftables git HEAD, I use a script which also builds libmnl and libnftnl in their respective repositories and populates PKG_CONFIG_PATH variable so nftables is linked against them instead of host libraries. This is mandatory as host-installed libraries are chronically outdated and linking against them would fail. Same situation exists with build test suite. Luckily the PKG_CONFIG_PATH variable value used to build the project is cached in Makefiles and Automake supports populating test runners' environment. Signed-off-by: Phil Sutter <phil@nwl.cc> --- Pablo: Could you please confirm this does not break your workflow? I recall you relied upon build test suite while it never passed for me due to the reasons described above. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index b134330d5ca22..18af82a927dc0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -450,6 +450,7 @@ tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status endif if !BUILD_DISTCHECK +AM_TESTS_ENVIRONMENT = PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) TESTS = tests/build/run-tests.sh \ tests/json_echo/run-test.py \ tests/monitor/run-tests.sh \ -- 2.51.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' 2026-01-27 22:15 [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' Phil Sutter @ 2026-02-05 1:32 ` Pablo Neira Ayuso 2026-02-05 14:24 ` Phil Sutter 0 siblings, 1 reply; 4+ messages in thread From: Pablo Neira Ayuso @ 2026-02-05 1:32 UTC (permalink / raw) To: Phil Sutter; +Cc: netfilter-devel On Tue, Jan 27, 2026 at 11:15:58PM +0100, Phil Sutter wrote: > When building nftables git HEAD, I use a script which also builds libmnl > and libnftnl in their respective repositories and populates > PKG_CONFIG_PATH variable so nftables is linked against them instead of > host libraries. This is mandatory as host-installed libraries are > chronically outdated and linking against them would fail. How do you use this? > Same situation exists with build test suite. Luckily the PKG_CONFIG_PATH > variable value used to build the project is cached in Makefiles and > Automake supports populating test runners' environment. > > Signed-off-by: Phil Sutter <phil@nwl.cc> > --- > Pablo: Could you please confirm this does not break your workflow? I > recall you relied upon build test suite while it never passed for me due > to the reasons described above. Just run `make distcheck' or tests/build/ to check, I think that should be enough. > --- > Makefile.am | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Makefile.am b/Makefile.am > index b134330d5ca22..18af82a927dc0 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -450,6 +450,7 @@ tools/nftables.service: tools/nftables.service.in ${top_builddir}/config.status > endif > > if !BUILD_DISTCHECK > +AM_TESTS_ENVIRONMENT = PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) > TESTS = tests/build/run-tests.sh \ > tests/json_echo/run-test.py \ > tests/monitor/run-tests.sh \ > -- > 2.51.0 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' 2026-02-05 1:32 ` Pablo Neira Ayuso @ 2026-02-05 14:24 ` Phil Sutter 2026-02-05 14:27 ` Phil Sutter 0 siblings, 1 reply; 4+ messages in thread From: Phil Sutter @ 2026-02-05 14:24 UTC (permalink / raw) To: Pablo Neira Ayuso; +Cc: netfilter-devel On Thu, Feb 05, 2026 at 02:32:48AM +0100, Pablo Neira Ayuso wrote: > On Tue, Jan 27, 2026 at 11:15:58PM +0100, Phil Sutter wrote: > > When building nftables git HEAD, I use a script which also builds libmnl > > and libnftnl in their respective repositories and populates > > PKG_CONFIG_PATH variable so nftables is linked against them instead of > > host libraries. This is mandatory as host-installed libraries are > > chronically outdated and linking against them would fail. > > How do you use this? Please kindly find aforementioned build script attached to this mail. Then I just call 'make check' in the built nftables source tree. This patch's logic is: "If a custom PKG_CONFIG_PATH was needed to build the sources, it is needed for build test suite as well." > > Same situation exists with build test suite. Luckily the PKG_CONFIG_PATH > > variable value used to build the project is cached in Makefiles and > > Automake supports populating test runners' environment. > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > --- > > Pablo: Could you please confirm this does not break your workflow? I > > recall you relied upon build test suite while it never passed for me due > > to the reasons described above. > > Just run `make distcheck' or tests/build/ to check, I think that > should be enough. Well, 'make distcheck' should not be affected by this patch since it does not run the test suites (df19bf51d49be ("Makefile: Enable support for 'make check'")). But you have a point there, the logic from above applies to the VPATH build performed by 'make distcheck', too. I'll respin with added chunk: | --- a/Makefile.am | +++ b/Makefile.am | @@ -23,7 +23,8 @@ libnftables_LIBVERSION = 2:0:1 | ############################################################################### | | ACLOCAL_AMFLAGS = -I m4 | -AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck | +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck \ | + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) | | EXTRA_DIST = | BUILT_SOURCES = Thanks, Phil ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' 2026-02-05 14:24 ` Phil Sutter @ 2026-02-05 14:27 ` Phil Sutter 0 siblings, 0 replies; 4+ messages in thread From: Phil Sutter @ 2026-02-05 14:27 UTC (permalink / raw) To: Pablo Neira Ayuso, netfilter-devel [-- Attachment #1: Type: text/plain, Size: 2233 bytes --] On Thu, Feb 05, 2026 at 03:24:14PM +0100, Phil Sutter wrote: > On Thu, Feb 05, 2026 at 02:32:48AM +0100, Pablo Neira Ayuso wrote: > > On Tue, Jan 27, 2026 at 11:15:58PM +0100, Phil Sutter wrote: > > > When building nftables git HEAD, I use a script which also builds libmnl > > > and libnftnl in their respective repositories and populates > > > PKG_CONFIG_PATH variable so nftables is linked against them instead of > > > host libraries. This is mandatory as host-installed libraries are > > > chronically outdated and linking against them would fail. > > > > How do you use this? > > Please kindly find aforementioned build script attached to this mail. > Then I just call 'make check' in the built nftables source tree. Gna. Attached now. > This patch's logic is: "If a custom PKG_CONFIG_PATH was needed to build > the sources, it is needed for build test suite as well." > > > > Same situation exists with build test suite. Luckily the PKG_CONFIG_PATH > > > variable value used to build the project is cached in Makefiles and > > > Automake supports populating test runners' environment. > > > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > > --- > > > Pablo: Could you please confirm this does not break your workflow? I > > > recall you relied upon build test suite while it never passed for me due > > > to the reasons described above. > > > > Just run `make distcheck' or tests/build/ to check, I think that > > should be enough. > > Well, 'make distcheck' should not be affected by this patch since it > does not run the test suites (df19bf51d49be ("Makefile: Enable support > for 'make check'")). > > But you have a point there, the logic from above applies to the VPATH > build performed by 'make distcheck', too. I'll respin with added chunk: > > | --- a/Makefile.am > | +++ b/Makefile.am > | @@ -23,7 +23,8 @@ libnftables_LIBVERSION = 2:0:1 > | ############################################################################### > | > | ACLOCAL_AMFLAGS = -I m4 > | -AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck > | +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-distcheck \ > | + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) > | > | EXTRA_DIST = > | BUILT_SOURCES = > > Thanks, Phil [-- Attachment #2: full_rebuild.sh --] [-- Type: application/x-sh, Size: 3398 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-05 14:27 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-27 22:15 [nft PATCH] Makefile: Set PKG_CONFIG_PATH env for 'make check' Phil Sutter 2026-02-05 1:32 ` Pablo Neira Ayuso 2026-02-05 14:24 ` Phil Sutter 2026-02-05 14:27 ` Phil Sutter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox