Bug 225144

Summary: devel/llvm*: fix python dependency
Product: Ports & Packages Reporter: Po-Chuan Hsieh <sunpoet>
Component: Individual Port(s)Assignee: Brooks Davis <brooks>
Status: Closed FIXED    
Severity: Affects Only Me CC: brooks
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://people.FreeBSD.org/~sunpoet/patch/devel-llvm.txt

Description Po-Chuan Hsieh freebsd_committer freebsd_triage 2018-01-13 17:56:47 UTC
Fix python dependency: restrict to python 2.7

from CMakeLists.txt:
# Verify that we can find a Python 2 interpreter.  Python 3 is unsupported.
# FIXME: We should support systems with only Python 3, but that requires work
# on LLDB.
set(Python_ADDITIONAL_VERSIONS 2.7)
include(FindPythonInterp)
if( NOT PYTHONINTERP_FOUND )
  message(FATAL_ERROR
"Unable to find Python interpreter, required for builds and testing.

Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()

if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
  message(FATAL_ERROR "Python 2.7 or newer is required")
endif()


The stage-qa and packaging error of devel/llvm50 on a box with python 3.6 as default are as follows:

====> Running Q/A tests (stage-qa)
Error: /usr/local/llvm50/bin/lldb-server is linked to /usr/local/lib/libpython2.7.so.1 from lang/python27 but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libpython2.7.so:lang/python27

===>  Building package for llvm50-5.0.1
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/_lldb.so:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/embedded_interpreter.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/Logger.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/attrib_fromdict.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/cache.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/cpp/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/cpp/gnu_libstdcpp.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/cpp/libcxx.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/metrics.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/formatters/synth.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/lldb-argdumper:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/runtime/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/utils/__init__.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/lldb/utils/symbolication.py:No such file or directory
pkg-static: Unable to access file /usr/ports/works/usr/ports/devel/llvm50/work/stage/usr/local/llvm50/lib/python3.6/site-packages/six.py:No such file or directory
*** Error code 1

Stop.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-01-19 23:31:38 UTC
A commit references this bug:

Author: brooks
Date: Fri Jan 19 23:30:48 UTC 2018
New revision: 459483
URL: https://svnweb.freebsd.org/changeset/ports/459483

Log:
  Update to a new snapshot, now on the 7.0 line. [0]

  Depend explicitly on python2.7. [1]

  Install clang headers as they are now believed to work properly with
  FreeBSD headers.

  PR:		225315 [0], 225144 [1]
  Submitted by:	sunpoet [1]
  Differential Revision:	https://reviews.freebsd.org/D13984

Changes:
  head/devel/llvm-devel/Makefile
  head/devel/llvm-devel/Makefile.snapshot
  head/devel/llvm-devel/distinfo
  head/devel/llvm-devel/files/clang-patch-tools_clang_lib_Headers_CMakeLists.txt
  head/devel/llvm-devel/files/gen-Makefile.snapshot.sh
  head/devel/llvm-devel/pkg-plist
  head/lang/clang-devel/Makefile
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-01-19 23:38:50 UTC
A commit references this bug:

Author: brooks
Date: Fri Jan 19 23:38:19 UTC 2018
New revision: 459485
URL: https://svnweb.freebsd.org/changeset/ports/459485

Log:
  Fix python dependency: restrict to python 2.7.

  No PORTREVISON bump as build would fail without python 2.7

  PR:		225144
  Submitted by:	sunpoet

Changes:
  head/devel/llvm-cheri/Makefile
  head/devel/llvm33/Makefile
  head/devel/llvm34/Makefile
  head/devel/llvm35/Makefile
  head/devel/llvm38/Makefile
  head/devel/llvm39/Makefile
  head/devel/llvm40/Makefile
  head/devel/llvm50/Makefile
Comment 3 Brooks Davis freebsd_committer freebsd_triage 2018-01-19 23:43:38 UTC
Committed.  Thanks!