Bug 254342 - devel/valgrind-devel: duplicate file listing on i386
Summary: devel/valgrind-devel: duplicate file listing on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-16 18:32 UTC by Dimitry Andric
Modified: 2021-03-16 20:24 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (pjfloyd)


Attachments
Fix pkg-plist by using %%AMD64%% and %%X86%% macros (9.71 KB, patch)
2021-03-16 18:32 UTC, Dimitry Andric
no flags Details | Diff
Updated pkg-plist (13.22 KB, text/plain)
2021-03-16 19:35 UTC, Paul Floyd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2021-03-16 18:32:42 UTC
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
Comment 1 Paul Floyd 2021-03-16 18:43:10 UTC
I'm working on it, will soon provide a fix.
Comment 2 Paul Floyd 2021-03-16 19:35:46 UTC
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.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2021-03-16 19:46:58 UTC
Committed.

Thanks for the quick fix, Paul!
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-03-16 19:47:20 UTC
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
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-03-16 20:24:29 UTC
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