Bug 218719

Summary: devel/llvm40: clang-tidy-diff.py: No such file or directory
Product: Ports & Packages Reporter: Laurence 'GreenReaper' Parry <greenreaper>
Component: Individual Port(s)Assignee: Martin Wilke <miwi>
Status: Closed FIXED    
Severity: Affects Only Me CC: brooks, miwi, sunpoet
Priority: --- Flags: bugzilla: maintainer-feedback? (brooks)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Failed build output
none
proposed fix none

Description Laurence 'GreenReaper' Parry 2017-04-17 23:03:41 UTC
Created attachment 181858 [details]
Failed build output

Upgrading to llvm40-4.0.0_4 using portupgrade fails on 10.3-RELEASE-p11 due to a missing file:

sed: tools/clang/tools/extra/clang-tidy/tool/clang-tidy-diff.py: No such file or directory.

The file was recently added to the "SHEBANG_FILES" makefile definition:
https://svnweb.freebsd.org/ports/head/devel/llvm40/Makefile?r1=438697&r2=438696&pathrev=438697

Commenting out the line with a # appears to let the build continue, although it has not yet run to completion.
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2017-04-18 02:35:05 UTC
Hand over to miwi who made the commit.  I'm not going to have time to deal with this this week as I've got a paper deadline.

The workaround is to avoid disabling any build options.
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2017-04-18 13:07:10 UTC
Created attachment 181864 [details]
proposed fix

Looks like, extras is disabled attach a patch which should fix it.

Not sure why i missed that yesterday during the testing.
Comment 3 Laurence 'GreenReaper' Parry 2017-04-18 13:37:47 UTC
I guess most of those using llvm40 want it for development and leave all the options on, but I just want to build my ports with the latest compiler, so I use LLVM GOLD OPENMP. (Recently it's only been tripping up over gcc6 and webalizer.)

The previous portupgrade run succeeded once I commented the lines out.

The provided patch makes sense and with the commenting reverted and the patch applied locally, compilation is proceeding for me beyond the initial break point.
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2017-04-18 13:50:53 UTC
(In reply to Laurence 'GreenReaper' Parry from comment #3)

Hi Laurence,

Thanks for your feedback, I'll do some more testing to make sure I get it right this time and commit the patch.

Sorry again!

- Martin
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-04-20 13:11:13 UTC
(In reply to Martin Wilke from comment #4)

The patch looks incorrect. We do not have <opt>_SHEBANG_FILES support in Mk/bsd.options.mk. That means you'll have the same SHEBANG_FILES whether EXTRAS option is enabled or not.

The simplest patch is to move those SHEBANG_FILES into ".if ${PORT_OPTIONS:MEXTRAS}" section (line 295).
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2017-04-20 14:55:15 UTC
(In reply to Po-Chuan Hsieh from comment #5)

Hi,

Yes I figure that already.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-04-21 15:03:47 UTC
A commit references this bug:

Author: brooks
Date: Fri Apr 21 15:03:21 UTC 2017
New revision: 439084
URL: https://svnweb.freebsd.org/changeset/ports/439084

Log:
  Fix SHEBANG_FILES when the EXTRAS option is disabled.

  PR:		218719, 218775, 218776
  Submitted by:	Helge Oldach <freebsd@oldach.net>, owen@easytarget.org

Changes:
  head/devel/llvm38/Makefile
  head/devel/llvm39/Makefile
  head/devel/llvm40/Makefile
Comment 8 Brooks Davis freebsd_committer freebsd_triage 2017-04-21 15:09:17 UTC
I've committed a fix.