Bug 218776

Summary: devel/llvm39: build failure without EXTRAS
Product: Ports & Packages Reporter: Owen Carter <owen>
Component: Individual Port(s)Assignee: Brooks Davis <brooks>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (brooks)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Owen Carter 2017-04-20 11:09:49 UTC
LLVM39 compilation without EXTRAS set is failing similarly to bug #208773


===>  Cleaning for llvm39-3.9.1_5
===>  License LLVM accepted by the user
===>   llvm39-3.9.1_5 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by llvm39-3.9.1_5 for building
===>  Extracting for llvm39-3.9.1_5
=> SHA256 Checksum OK for llvm-3.9.1.src.tar.xz.
=> SHA256 Checksum OK for cfe-3.9.1.src.tar.xz.
=> SHA256 Checksum OK for compiler-rt-3.9.1.src.tar.xz.
=> SHA256 Checksum OK for lld-3.9.1.src.tar.xz.
/bin/mv /usr/ports/devel/llvm39/work/cfe-3.9.1.src /usr/ports/devel/llvm39/work/llvm-3.9.1.src/tools/clang
/bin/mv /usr/ports/devel/llvm39/work/lld-3.9.1.src /usr/ports/devel/llvm39/work/llvm-3.9.1.src/tools/lld
===>  Patching for llvm39-3.9.1_5
sed: tools/clang/tools/extra/clang-tidy/tool/clang-tidy-diff.py: No such file or directory
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/llvm39
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/llvm39


Adapting the solution from bug #208773 solved this for me; I dont build from SVN, so no proper patch proper patch, but the following diff shows what I did:


--- llvm39.Makefile.dist        2017-04-20 12:42:58.091014000 +0200
+++ llvm39.Makefile.works       2017-04-19 12:57:02.046708000 +0200
@@ -35,10 +35,7 @@
 SHEBANG_FILES= utils/lit/lit.py utils/llvm-lit/llvm-lit.in \
                tools/clang/tools/scan-view/bin/scan-view \
                tools/clang/tools/clang-format/git-clang-format \
-               tools/clang/tools/clang-format/clang-format-diff.py \
-               tools/clang/tools/extra/clang-tidy/tool/clang-tidy-diff.py \
-               tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-               tools/clang/tools/extra/include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+               tools/clang/tools/clang-format/clang-format-diff.py
 
 SUB_FILES=     llvm-wrapper.sh
 SUB_LIST=      LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${LLVM_SUFFIX}"
@@ -284,6 +281,10 @@
 COMMANDS+=     ${EXTRAS_COMMANDS}
 MAN1SRCS+=     extraclangtools.1
 PORTDOCS+=     clang-tools
+
+SHEBANG_FILES+= tools/clang/tools/extra/clang-tidy/tool/clang-tidy-diff.py \
+               tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
+               tools/clang/tools/extra/include-fixer/find-all-symbols/tool/run-find-all-symbols.py
 .endif
 
 .if ${PORT_OPTIONS:MLLD}

I'm wondering if this also applies to llvm38,40 and others without EXTRAS.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-04-21 15:03:52 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