... [6553/6553] Linking target qemu-system-xtensaeb gmake[3]: Leaving directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2/build' gmake[2]: Leaving directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2' ===>>> Building the port required 239 seconds ===> Staging for qemu-8.2.2 ===> Generating temporary packing list cd /tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2 && /usr/bin/env DESTDIR=/tmp/ports/usr/ports/emulators/qemu/work-default/stage gmake install : invalid option -- D Usage: gmake [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. ...
Which version of FreeBSD? Ports or poudriere?
FreeBSD 14/stable amd64, portmaster. All fresh.
I do not have the resources to test this with ports but it builds fine in poudriere with both 13.2-RELEASE and 14.0-RELEASE: https://pkg.bofh.network/data/latest-per-pkg/qemu/8.2.2/
Created attachment 248971 [details] patch I do not dig deeper, looks like portmaster set some env var that breaks build. make -C /usr/ports/emulators/qemu - was not broken. ${SETENV} -i ${MAKE_ENV} - make build env is always identical.
(In reply to Ivan Rozhuk from comment #4) Yes that is the biggest problem with both portmaster and portupgrade that is environment leak. I will look into it during the weekend.
Created attachment 248983 [details] gmake makeflags env variables I had the same problem with portmaster emulators/qemu@guestagent, it seems to be an issue with gmake 4.4 environment variables.
Also see bug 277492. I've committed a patch to portmaster to avoid the problem for now.
Based on comment #7 I think both of the patches are partially correct and partially wrong. We need to utilize SETENVI in both cases of build and install. And we are not supposed to silent the build or the install process at all. I will look into this with a cooler head during the weekend.
Comment on attachment 248971 [details] patch See comment #8
Comment on attachment 248983 [details] gmake makeflags env variables See comment #8.
(In reply to Muhammad Moinur Rahman from comment #8) I haven't tested it but I think you can remove do-build and do-install if you replace USES=ninja with USES=ninja:build.
(In reply to Tijl Coosemans from comment #11) Found ninja-1.11.1 at /usr/local/bin/ninja Running postconf script '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2/build/pyvenv/bin/python3.9 /tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2/scripts/symlink-install-tree.py' ===> Building for qemu-8.2.2 Makefile:169: *** Please call configure before running make. Stop. ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1
(In reply to Muhammad Moinur Rahman from comment #8) > And we are not supposed to silent the build or the install process at all. @ - only hide command line, all output from gmake is printed.
(In reply to Tijl Coosemans from comment #11) Noops. This has adverse effects on powerpc and I have no clue on why.
(In reply to Ivan Rozhuk from comment #12) With USES=ninja:build it will not work. You will need some additional changes which are in one of my ancient reviews which I do not intend to find now as at that point we figured out that it breaks the build with powerpc. Although I am not a big fan of powerpc or other ARCH at the moment but we will have to support it. So this is not the path we should be taking. The above patches are correct and we will just have to cook both of them together in a working situation.
(In reply to Ivan Rozhuk from comment #13) That is due to the fact on how make/gmake works not how port infrastructure was made. In case you use '@' in any target with commands like REINPLACE_CMD or INSTALL* or any other commands it will entirely silent the output.
(In reply to Muhammad Moinur Rahman from comment #15) It was reply to Tijl Coosemans, I test his suggestion with USES=ninja:build and show output with error :)
(In reply to Ivan Rozhuk from comment #17) I know that it was on his reply but I wanted to say that with some other workarounds in the Makefile you can make that happen and even work for at non-POWERPC ARCHS. :D But yeah just after seeing your reply I tried to recollect on why I have not thought about it and done it and then I remembered this corner case with powerpc.
(In reply to Muhammad Moinur Rahman from comment #16) Nope. With my patch that have @ output is: ... [ 99% 6552/6553] Linking target qemu-system-ppc64 [ 99% 6552/6553] Compiling C object libqemu-riscv64-softmmu.fa.p/target_riscv_translate.c.o [100% 6553/6553] Linking target qemu-system-riscv64 gmake[1]: Leaving directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2/build' gmake: Leaving directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2' ===> Staging for qemu-8.2.2 ===> qemu-8.2.2 depends on file: /usr/local/lib/libncurses.so.6 - found ===> qemu-8.2.2 depends on file: /usr/local/libdata/pkgconfig/pixman-1.pc - found ===> qemu-8.2.2 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found ===> Generating temporary packing list gmake: Entering directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2' changing dir to build for gmake "install"... gmake[1]: Entering directory '/tmp/ports/usr/ports/emulators/qemu/work-default/qemu-8.2.2/build' [ 1% 1/83] Generating qemu-version.h with a custom command (wrapped by meson to capture output) [ 5% 2/35] Generating tests/include/QAPI test (include) with a custom command [ 66% 3/3] Installing files. Installing trace/trace-events-all to /tmp/ports/usr/ports/emulators/qemu/work-default/stage/usr/local/share/qemu Installing qemu-arm to /tmp/ports/usr/ports/emulators/qemu/work-default/stage/usr/local/bin ...
(In reply to Ivan Rozhuk from comment #19) Ha Ha .. You clearly did not get my point here. That is because how make or gmake works and that is not because of the '@' at all. make/gmake or most of the make like build systems are built in a manner that the output does not silent by default unless explicitly mentioned in the Makefile. Let me give you another example with one of my port databases/freetds: # make -C databases/freetds clean # make -C databases/freetds patch Check the output then clean it. Then modify the Makefile and remove all the line that has @ in front specially in front of REINPLACE_CMD at the post-patch target. And then again run: # make -C databases/freetds patch You will see some additional lines being printed. I think this will let you understand on the actual way of how '@' works. And we tend to avoid using this on targets specifically related to build, install and stage. The problem in this case is this '@' or 'SILENT' is not powerful enough stop any Gmake system from spitting out the build informations(Our BSD Make is calling another make system which tends to be Gmake here). Try to Google around for the '.SILENT' keyword in Gmake history although no longer in use and has also been replaced with '@'.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a779acb15993d9f8d995495ead62f7b1deb20a7c commit a779acb15993d9f8d995495ead62f7b1deb20a7c Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-03-09 13:38:57 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-03-09 13:43:13 +0000 emulators/qemu: Fix regression in gmake This issue started popping up after the latest gmake upgrade. Although there are multiple ways of fixing this I will stick with the preferred path by tijl@ as he is trying to address the issue with other ports. As I am not sure sure whether if this triggers a different binary being generated but for the safest route bumping portrevision. This problem is not reproducible for people using poudreiere to build their ports PR: 277527 Reported by: rozhuk.im@gmail.com emulators/qemu/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)