Created attachment 223333 [details] Fix pkg-plist by using %%AMD64%% and %%X86%% macros Attempting to install valgrind-devel on i386 after ports r568304 fails with: ===> Installing for valgrind-devel-3.17.0.g20210219,1 ===> Checking if valgrind-devel is already installed ===> Registering installation for valgrind-devel-3.17.0.g20210219,1 pkg-static: duplicate file listing: /usr/local/include/valgrind/libvex_guest_x86.h, ignoring pkg-static: duplicate file listing: /usr/local/include/valgrind/vki/vki-machine-types-x86-freebsd.h, ignoring pkg-static: duplicate file listing: /usr/local/include/valgrind/vki/vki-posixtypes-x86-linux.h, ignoring pkg-static: duplicate file listing: /usr/local/include/valgrind/vki/vki-scnums-x86-linux.h, ignoring pkg-static: duplicate file listing: /usr/local/include/valgrind/vki/vki-x86-freebsd.h, ignoring pkg-static: duplicate file listing: /usr/local/include/valgrind/vki/vki-x86-linux.h, ignoring pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-avx-coresse-valgrind.xml:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-avx-coresse.xml:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-avx-linux-valgrind.xml:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-avx-linux.xml:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-coresse-valgrind.xml:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/devel/valgrind-devel/work/stage/usr/local/lib/valgrind/x86-linux-valgrind.xml:No such file or directory pkg-static: duplicate file listing: /usr/local/lib/valgrind/cachegrind-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/callgrind-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/dhat-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/drd-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/exp-bbv-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/getoff-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/helgrind-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/lackey-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/libcoregrind-x86-freebsd.a, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/libgcc-sup-x86-freebsd.a, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/libreplacemalloc_toolpreload-x86-freebsd.a, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/libvex-x86-freebsd.a, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/libvexmultiarch-x86-freebsd.a, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/massif-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/memcheck-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/none-x86-freebsd, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_core-x86-freebsd.so, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_dhat-x86-freebsd.so, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_drd-x86-freebsd.so, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_helgrind-x86-freebsd.so, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_massif-x86-freebsd.so, ignoring pkg-static: duplicate file listing: /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so, ignoring *** Error code 1 This is because the pkg-plist uses %%ARCH%% to expand for the build arch, but the *-x86-* files are also listed separately. I propose to fix this by prefixing the amd64 and x86 lines with %%AMD64%% and %%X86%%, and ditching the %%ARCH% macro. There would be three variants then: 1) amd64 with 32-bit compat on: %%AMD64%% and %%X86%% empty -> both amd64 and x86 files get included 2) amd64 with 32-bit compat off: %%AMD64%% empty and %%X64%% set to @comment -> only amd64 files get included, not x86 3) i386: %%AMD64%% set to @comment, %%X86%% empty -> only x86 files get included, not amd64
I'm working on it, will soon provide a fix.
Created attachment 223340 [details] Updated pkg-plist I don't think that the removal of ARCH from the Makefile is really necessary, though it won't do any harm. In pkg-plist, it's best to keep all of the headers. The executables, shared and static libraries need to be platform dependent.
Committed. Thanks for the quick fix, Paul!
A commit references this bug: Author: yuri Date: Tue Mar 16 19:46:57 UTC 2021 New revision: 568606 URL: https://svnweb.freebsd.org/changeset/ports/568606 Log: devel/valgrind-devel: Fix duplicate file listing on i386 PR: 254342 Submitted by: pjfloyd@wanadoo.fr (maintainer) Reported by: dim Changes: head/devel/valgrind-devel/Makefile head/devel/valgrind-devel/pkg-plist
A commit references this bug: Author: yuri Date: Tue Mar 16 20:24:01 UTC 2021 New revision: 568610 URL: https://svnweb.freebsd.org/changeset/ports/568610 Log: devel/valgrind-devel: Improve plist PR: 254342 Submitted by: pjfloyd@wanadoo.fr (maintainer) Changes: head/devel/valgrind-devel/pkg-plist