Bug 193230 - [patch] cad/iverilog plist issues if port is already installed
Summary: [patch] cad/iverilog plist issues if port is already installed
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Niclas Zeising
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-01 18:24 UTC by Don Lewis
Modified: 2019-08-14 10:06 UTC (History)
1 user (show)

See Also:


Attachments
patch to fix iverilog plist issue when reinstalling from source (10.77 KB, patch)
2014-09-01 18:24 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer 2014-09-01 18:24:31 UTC
Created attachment 146634 [details]
patch to fix iverilog plist issue when reinstalling from source

If the cad/verilog port (iverilog-0.9.7) is installed, then the port does not properly install all of its files in the stage directory when it is rebuilt.  This can happen when the port is upgraded or reinstalled with portupgrade (and most likely portmaster as well).  The problem is that the Makefiles in the source distribution compare the timestamps of the include files (and various other files) under PREFIX to the timestamps of the corresponding files in the source, and only install these files under STAGEDIR if the source files are newer.  If the timestamps match, then the files are not installed under STAGEDIR and check-plist will detect that they are missing.

This problem does not affect poudriere builds because it always starts without the port installed.

To reproduce:
  Install the port, either with a pre-built package or by building and installing
  the port.

  cd cad/iverilog

  make stage

  make check-plist

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: include/iverilog/acc_user.h
Error: Missing: include/iverilog/ivl_target.h
Error: Missing: include/iverilog/veriuser.h
Error: Missing: include/iverilog/vpi_user.h
Error: Missing: lib/ivl/include/constants.vams
Error: Missing: lib/ivl/include/disciplines.vams
Error: Missing: lib/ivl/null-s.conf
Error: Missing: lib/ivl/null.conf
Error: Missing: lib/ivl/stub-s.conf
Error: Missing: lib/ivl/stub.conf
Error: Missing: lib/ivl/system.sft
Error: Missing: lib/ivl/v2005_math.sft
Error: Missing: lib/ivl/va_math.sft
Error: Missing: lib/ivl/vhdl-s.conf
Error: Missing: lib/ivl/vhdl.conf
===> Error: Plist issues found.
*** Error code 1

Stop in /usr/ports/cad/iverilog.
Comment 1 John Marino freebsd_committer 2014-09-04 15:42:48 UTC
over to maintainer
Comment 2 Niclas Zeising freebsd_committer 2015-10-15 22:53:02 UTC
Hi!
I recently updated the iverilog port, can you please test and see if this is still an issue?
Comment 3 Don Lewis freebsd_committer 2015-11-04 00:39:12 UTC
(In reply to Niclas Zeising from comment #2)

Nope, it is still broken:

install  -s -m 555 ./iverilog "/usr/ports/cad/iverilog/work/stage/usr/local/bin/iverilog"
install  -m 0644 iverilog.man "/usr/ports/cad/iverilog/work/stage/usr/local/man/man1/iverilog.1"
gmake[2]: Leaving directory '/usr/ports/cad/iverilog/work/verilog-10.0/driver'
gmake[1]: Leaving directory '/usr/ports/cad/iverilog/work/verilog-10.0'
====> Compressing man pages (compress-man)
root@mousie:/usr/ports/cad/iverilog # make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir lib/ivl/include
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: include/iverilog/acc_user.h
Error: Missing: include/iverilog/ivl_target.h
Error: Missing: include/iverilog/sv_vpi_user.h
Error: Missing: include/iverilog/veriuser.h
Error: Missing: include/iverilog/vpi_user.h
Error: Missing: lib/ivl/blif-s.conf
Error: Missing: lib/ivl/blif.conf
Error: Missing: lib/ivl/include/constants.vams
Error: Missing: lib/ivl/include/disciplines.vams
Error: Missing: lib/ivl/null-s.conf
Error: Missing: lib/ivl/null.conf
Error: Missing: lib/ivl/pcb-s.conf
Error: Missing: lib/ivl/pcb.conf
Error: Missing: lib/ivl/sizer-s.conf
Error: Missing: lib/ivl/sizer.conf
Error: Missing: lib/ivl/stub-s.conf
Error: Missing: lib/ivl/stub.conf
Error: Missing: lib/ivl/system.sft
Error: Missing: lib/ivl/v2005_math.sft
Error: Missing: lib/ivl/v2009.sft
Error: Missing: lib/ivl/va_math.sft
Error: Missing: lib/ivl/vhdl-s.conf
Error: Missing: lib/ivl/vhdl.conf
Error: Missing: lib/ivl/vhdl_sys.sft
Error: Missing: lib/ivl/vlog95-s.conf
Error: Missing: lib/ivl/vlog95.conf
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/cad/iverilog
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-13 04:05:45 UTC
I try it on 10.4. make check-plist runs without problems Seem done and I think it could be closed.
Comment 5 Don Lewis freebsd_committer 2018-01-13 07:40:47 UTC
Did you try with the port already installed?

This will only affect builds with portupgrade, portmaster, or a manual build with the port already installed.  Builds with poudriere or synth that do the build in a clean environment will not run into this problem.

The issue is that the the install phase of the iverilog build will not reinstall its headers if it see that they are already installed (and haven't changed, I presume).  I think it does this to avoid updating the timestamps of the installed headers, which would trigger the recompilation of the modules that the the user previously compiled.  Unfortunately this breaks with the introduction of staging, and the headers don't get installed into the stage directory and get omitted from the package.  When building with poudriere or synth, or building when the port isn't already installed, the install phase doesn't see the old headers, so it does install them in the stage directory and everything looks fine.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-01-13 08:11:36 UTC
Ok! Sorry, you are right.
Comment 7 Don Lewis freebsd_committer 2018-01-13 08:35:20 UTC
Yeah, the failure mode is now different, but the cause is the same:

[install iverilog using pkg or otherwise, then "make" and "make package":

root@mousie:/usr/ports/cad/iverilog # make package
===>  Building package for iverilog-10.2
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/include/iverilog/acc_user.h:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/include/iverilog/ivl_target.h:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/include/iverilog/sv_vpi_user.h:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/include/iverilog/veriuser.h:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/include/iverilog/vpi_user.h:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/blif-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/blif.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/include/constants.vams:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/include/disciplines.vams:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/null-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/null.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/pcb-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/pcb.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/sizer-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/sizer.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/stub-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/stub.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/system.sft:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/vlog95-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/vlog95.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/v2005_math.sft:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/v2009.sft:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/va_math.sft:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/vhdl-s.conf:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/vhdl_sys.sft:No such file or directory
pkg-static: Unable to access file /usr/ports/cad/iverilog/work/stage/usr/local/lib/ivl/vhdl.conf:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/cad/iverilog
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-09-03 14:17:17 UTC
ping!
Comment 9 Walter Schwarzenfeld freebsd_triage 2019-08-14 10:06:43 UTC
ping!