ports/186641: [patch] devel/llvm33 breaks when python3 is default

Gereon Kaiping kta1c10!gereon at linta.de
Tue Feb 11 01:40:01 UTC 2014


>Number:         186641
>Category:       ports
>Synopsis:       [patch] devel/llvm33 breaks when python3 is default
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 11 01:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Gereon Kaiping
>Release:        FreeBSD 10.0-BETA3 amd64
>Organization:
>Environment:
System: FreeBSD parhippus 10.0-BETA3 FreeBSD 10.0-BETA3 #0 r258657:
Tue Nov 26 20:13:28 UTC 2013
root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

Running python 3.3.3 as python default version, python2.7 installed

>Description:
devel/llvm33 does not configure when python3 is default, due to
python2 syntax (relative imports) being used in __init__.py, but cmake
accepts the default python version even if that is not a python2.

>How-To-Repeat:

# cd /usr/ports/lang/llvm33
# make -V PYTHON_VERSION
python3.3
# make configure
[=E2=80=A6snip=E2=80=A6]
-- Constructing LLVMBuild project information
CMake Error at CMakeLists.txt:308 (message):
  Unexpected failure executing llvm-build: Traceback (most recent call last=
):

    File "/usr/ports/devel/llvm33/work/llvm-3.3.src/utils/llvm-build/llvm-b=
uild",
line 3, in <module>
      import llvmbuild
    File "/usr/ports/devel/llvm33/work/llvm-3.3.src/utils/llvm-build/llvmbu=
ild/__init__.py",
line 1, in <module>
      from main import main

  ImportError: No module named 'main'


-- Configuring incomplete, errors occurred!
See also "/usr/ports/devel/llvm33/work/cmake/CMakeFiles/CMakeOutput.log".
See also "/usr/ports/devel/llvm33/work/cmake/CMakeFiles/CMakeError.log".
*** Error code 1

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

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


>Fix:

Enforce PYTHON_VERSION<3 for llvm33 and pass the PYTHON_CMD make
variable to CMake as PYTHON_EXECUTABLE, e.g.:

--- Makefile.orig       2014-02-10 22:57:40.000000000 +0000
+++ Makefile    2014-02-10 23:10:15.000000000 +0000
@@ -112,10 +112,10 @@

 .if ${PORT_OPTIONS:MLIT}
 MAN1SRCS+=3D             lit.1
-USE_PYTHON=3D            yes
+USE_PYTHON=3D            -2.9
 LIT_COMMANDS=3D          lit llvm-lit FileCheck
 .else
-USE_PYTHON_BUILD=3D      yes
+USE_PYTHON_BUILD=3D      -2.9
 .endif

 .if ${PORT_OPTIONS:MLTOPLUGIN}
@@ -164,7 +164,7 @@
 .if ${PORT_OPTIONS:MCMAKE}
 post-configure:
        ${MKDIR} ${WRKDIR}/cmake
-       cd ${WRKDIR}/cmake && cmake -G "Unix Makefiles" ${WRKSRC}
+       cd ${WRKDIR}/cmake && cmake -D PYTHON_EXECUTABLE=3D${PYTHON_CMD}
-G "Unix Makefiles" ${WRKSRC}
        ${REINPLACE_CMD} -e 's|${WRKDIR}/cmake|${LLVM_PREFIX}|' \
            -e 's|${WRKSRC}/cmake/modules|${DATADIR}/cmake|' \
            ${WRKDIR}/cmake/share/llvm/cmake/LLVMConfig.cmake
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list