Created attachment 248899 [details] patch bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV And remove it from individual ports. Use WRK_ENV in custom build commands where necessary. FreeBSD make(1) includes /usr/share/mk/sys.mk and that includes /etc/make.conf if it exists. This patch disables make.conf when running the upstream build system. Users can define variables like CFLAGS in make.conf that override ports framework variables. This can cause problems that are difficult to diagnose. See for example http://wiki.freebsd.org/MatthiasAndree/LuaLessonsLearnt. If there are any build customisations made through make.conf that stop working because of this patch then they should be made available by the ports tree through some mechanism, e.g. an option in a port. The idea is that the ports tree controls the upstream build system and the user then controls the ports tree, possibly using make.conf.
I can confirm this corner case to be true. I have had been utilizing a workaround similar to what is mentioned here.
Some new failure logs: https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-03-10_22h07m11s/logs/errors/zhlt-3.4.log https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-03-10_22h07m11s/logs/errors/wmspaceweather-1.04_6.log https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-03-10_22h07m11s/logs/errors/wmCalClock-1.26_2.log https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-03-10_22h07m11s/logs/errors/tachyon-0.98.9.log https://pkg-status.freebsd.org/gohan04/data/140amd64-default-foo/2024-03-10_22h07m11s/logs/errors/consolehm-1.31_1.log
Created attachment 249169 [details] patch2 Fix failures. These ports were picking up variables from Poudriere make.conf.
Exp-run seems fine
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d7511b9d00742c3e2d57c6c03718c4a6f4cd3e72 commit d7511b9d00742c3e2d57c6c03718c4a6f4cd3e72 Author: Tijl Coosemans <tijl@FreeBSD.org> AuthorDate: 2024-02-29 21:11:00 +0000 Commit: Tijl Coosemans <tijl@FreeBSD.org> CommitDate: 2024-03-23 11:19:32 +0000 Mk/bsd.port.mk: Add __MAKE_CONF=${NONEXISTENT} to WRK_ENV And remove it from individual ports. Use WRK_ENV in custom build commands where necessary. FreeBSD make(1) includes /usr/share/mk/sys.mk and that includes /etc/make.conf if it exists. This happens when you run make in a port directory but it also happens when the upstream build system uses make. This commit disables make.conf inclusion in the latter case because users can define variables like CFLAGS in make.conf that override ports framework variables and this can cause problems that are difficult to diagnose. If there are any build customisations made through make.conf that stop working because of this commit then they should be made available by the ports tree through some mechanism, e.g. an option in a port. Some ports were picking up variables from Poudriere make.conf and required fixes: - astro/wmspaceweather x11-clocks/wmcalclock: Add OPSYS to MAKE_ENV. - games/zhlt: Add ARCH to MAKE_ENV. - graphics/tachyon: Upstream ARCH is not ports tree ARCH. Set ALL_TARGET=bsd so upstream ARCH is defined correctly. Enable multi-threading support while here. PR: 277455 Exp-run by: antoine Mk/bsd.port.mk | 3 ++- archivers/libcabinet/Makefile | 2 +- astro/wmspaceweather/Makefile | 1 + devel/libpdel/Makefile | 2 +- devel/libshhmsg/Makefile | 2 +- devel/libxalloc/Makefile | 2 +- devel/linux_libusb/Makefile | 14 +++++++------- emulators/vmw/Makefile | 2 +- finance/libstocks/Makefile | 6 +++--- games/libshhcards/Makefile | 2 +- games/zhlt/Makefile | 1 + graphics/tachyon/Makefile | 10 ++++++---- graphics/tachyon/files/patch-Makefile (gone) | 11 ----------- graphics/tachyon/files/patch-src_threads.c (new) | 11 +++++++++++ graphics/tachyon/files/patch-src_threads.h (new) | 11 +++++++++++ graphics/tachyon/files/patch-src_trace.c (new) | 11 +++++++++++ graphics/tachyon/files/patch-unix_Make-arch (new) | 18 ++++++++++++++++++ lang/lua51/Makefile | 8 -------- lang/lua52/Makefile | 8 -------- lang/lua53/Makefile | 8 -------- lang/lua54/Makefile | 8 -------- mail/dma/Makefile | 3 +-- mail/spamilter/Makefile | 1 - math/libmissing/Makefile | 9 +++++---- math/linpack/Makefile | 2 +- ports-mgmt/dialog4ports/Makefile | 2 +- sysutils/dirdiff/Makefile | 5 ----- sysutils/pfstat/Makefile | 1 - sysutils/pftop/Makefile | 1 - x11-clocks/wmcalclock/Makefile | 1 + 30 files changed, 86 insertions(+), 80 deletions(-)