As can be seen below, mail/dma ignores the CFLAGS of the port entirely, which results in startup problems of the flush queue, since the default "mail" user used by dma can't be found. root@medusa:/usr/ports/mail/dma # make -VCFLAGS -O2 -fno-strict-aliasing -pipe -march=nocona -I/usr/local/include -DCONF_PATH='\"/usr/local/etc/dma\"' -DDMA_ROOT_USER='\"mailnull\"' -DDMA_GROUP='\"mail\"' root@medusa:/usr/ports/mail/dma # make [...] ===> Building for dma-v0.9_1,1 --- _sub.all --- ===> dma (all) --- objwarn --- Warning: Object directory not changed from original /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma --- aliases_parse.c --- --- aliases_scan.c --- --- dma.8.gz --- --- aliases_parse.c --- yacc -d -i -o aliases_parse.c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//aliases_parse.y --- aliases_scan.c --- lex -oaliases_scan.c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//aliases_scan.l --- dma.8.gz --- gzip -cn /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//dma.8 > dma.8.gz --- aliases_parse.o --- --- base64.o --- --- aliases_parse.o --- cc -O2 -fno-strict-aliasing -pipe -march=nocona -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c aliases_parse.c --- conf.o --- --- base64.o --- cc -O2 -fno-strict-aliasing -pipe -march=nocona -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//base64.c --- conf.o --- cc -O2 -fno-strict-aliasing -pipe -march=nocona -DYY_NO_INPUT -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma -I/usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/.. -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME -DLIBEXEC_PATH='"/usr/local/libexec"' -DDMA_VERSION='"v0.9"' -DCONF_PATH='"/usr/local/etc/dma"' -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//conf.c ...
Auto-assigned to maintainer bapt@FreeBSD.org
The issue still exists.
I cannot reproduce: -- aliases_parse.o --- cc -O2 -pipe -I/usr/include -DCONF_PATH='"/usr/local/etc/dma"' -DDMA_ROOT_USER='"mailnull"' -DDMA_GROUP='"mail"' -fstack-protector -fno-strict-aliasing -DYY_NO_INPUT
As it seems, make pulls in sys.mk, which in turn checks for /etc/make.conf. My /etc/make.conf sets CFLAGS= ..., which seem to override the previously set CFLAGS. As soon as I comment out the CFLAGS in /etc/make.conf, the CFLAGS set in dma/Makefile are correctly passed to the port. My guess is that something in dma's BSD-tailored Makefiles causes the problem. FreeBSD version 10.1-STABLE FreeBSD 10.1-STABLE #22 r276198, amd64.
Fixed
A commit references this bug: Author: bapt Date: Tue Dec 30 07:44:42 UTC 2014 New revision: 375815 URL: https://svnweb.freebsd.org/changeset/ports/375815 Log: dma is using the bsd Makefiles (bsd.*.mk) ensure it is not getting populed by make.conf and src.conf PR: 194099 Submitted by: mva Changes: head/mail/dma/Makefile