Bug 186642 - [patch] lang/clang33 has USE_PYTHON_BUILD=YES but requires python2
Summary: [patch] lang/clang33 has USE_PYTHON_BUILD=YES but requires python2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 01:40 UTC by Gereon Kaiping
Modified: 2014-02-14 21:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gereon Kaiping 2014-02-11 01:40:02 UTC
lang/clang33's configure file (generated with autoconf) tests
explicitly for the python version, requesting major version =3D=3D 2 and
minor version >=3D 5, and therefore fails with the cryptic message that
the python version (parsed from the empty string) is not =E2=80=9C>=3D 2.5=
=E2=80=9D when
pytho
n3 is the default.

Fix: patch lang/clang's Makefile as follows:



MAKE_ARGS=3D     CLANG_TBLGEN=3D${WRKSRC}/${RELTYPE}/bin/clang-tblgen \
                LLVMIncDir=3D${LLVM_PREFIX}/include \--KkmbC5AvPF03WBRY8pG4QSNRjXKVAyyZxmAlTAjKfmOOpGmp
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.orig       2014-02-11 00:54:52.000000000 +0000
+++ Makefile    2014-02-11 00:55:03.000000000 +0000
@@ -34,7 +34,7 @@
 GNU_CONFIGURE_PREFIX=3D  ${LLVM_PREFIX}
 USES=3D          gmake perl5
 USE_LDCONFIG=3D  yes
-USE_PYTHON_BUILD=3D      yes
+USE_PYTHON_BUILD=3D      -2.9
How-To-Repeat: 
# cd /usr/ports/lang/clang33
# make -V PYTHON_VERSION
python3.3
# make configure
[=E2=80=A6snip=E2=80=A6]
checking optional compiler flags... -Wno-variadic-macros
-Wno-missing-field-initializers -Wcovered-switch-default
-Wno-uninitialized
checking for python... user defined:
checking for python >=3D 2.5...   File "<string>", line 1
    import sys; print sys.version.split()[0]
                        ^
SyntaxError: invalid syntax
test: : bad number
not found
configure: error: found python  (/usr/local/bin/python3.3); required >=3D 2=
.5
See `config.log' for more details.
=3D=3D=3D>  Script "configure" failed unexpectedly.
Please report the problem to brooks@FreeBSD.org [maintainer] and attach the
"/usr/ports/lang/clang33/work/llvm-3.3.src/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provi=
de
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/clang33
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/clang33
Comment 1 Edwin Groothuis freebsd_committer 2014-02-12 03:27:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->brooks

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Brooks Davis freebsd_committer 2014-02-14 20:21:57 UTC
State Changed
From-To: open->closed

Duplicate of ports/186641
Comment 3 Brooks Davis freebsd_committer 2014-02-14 20:36:00 UTC
State Changed
From-To: closed->open

Not a duplicate.  I misread.
Comment 4 dfilter service freebsd_committer 2014-02-14 21:49:23 UTC
Author: brooks
Date: Fri Feb 14 21:49:15 2014
New Revision: 344317
URL: http://svnweb.freebsd.org/changeset/ports/344317
QAT: https://qat.redports.org/buildarchive/r344317/

Log:
  Fix build when python 3 is the default.
  
  PR:		ports/186641, ports/186642
  Submitted by:	Gereon Kaiping <kta1c10!gereon@linta.de>

Modified:
  head/devel/llvm33/Makefile
  head/lang/clang33/Makefile

Modified: head/devel/llvm33/Makefile
==============================================================================
--- head/devel/llvm33/Makefile	Fri Feb 14 21:03:41 2014	(r344316)
+++ head/devel/llvm33/Makefile	Fri Feb 14 21:49:15 2014	(r344317)
@@ -2,7 +2,7 @@
 
 PORTNAME=	llvm
 PORTVERSION=	3.3
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	devel lang
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
 DISTNAME=	${PORTNAME}-${PORTVERSION}.src
@@ -112,10 +112,10 @@ CONFIGURE_ARGS+=	--disable-docs
 
 .if ${PORT_OPTIONS:MLIT}
 MAN1SRCS+=		lit.1
-USE_PYTHON=		yes
+USE_PYTHON=		-2.9
 LIT_COMMANDS=		lit llvm-lit FileCheck
 .else
-USE_PYTHON_BUILD=	yes
+USE_PYTHON_BUILD=	-2.9
 .endif
 
 .if ${PORT_OPTIONS:MLTOPLUGIN}
@@ -164,7 +164,7 @@ post-patch:
 .if ${PORT_OPTIONS:MCMAKE}
 post-configure:
 	${MKDIR} ${WRKDIR}/cmake
-	cd ${WRKDIR}/cmake && cmake -G "Unix Makefiles" ${WRKSRC}
+	cd ${WRKDIR}/cmake && cmake -DPYTHON_EXECUTABLE=${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

Modified: head/lang/clang33/Makefile
==============================================================================
--- head/lang/clang33/Makefile	Fri Feb 14 21:03:41 2014	(r344316)
+++ head/lang/clang33/Makefile	Fri Feb 14 21:49:15 2014	(r344317)
@@ -2,7 +2,7 @@
 
 PORTNAME=	clang
 DISTVERSION=	3.3
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	lang devel
 MASTER_SITES=	http://llvm.org/releases/${PORTVERSION}/
 PKGNAMESUFFIX=	${LLVM_SUFFIX}
@@ -34,7 +34,7 @@ GNU_CONFIGURE=	yes
 GNU_CONFIGURE_PREFIX=	${LLVM_PREFIX}
 USES=		gmake perl5
 USE_LDCONFIG=	yes
-USE_PYTHON_BUILD=	yes
+USE_PYTHON_BUILD=	-2.9
 
 MAKE_ARGS=	CLANG_TBLGEN=${WRKSRC}/${RELTYPE}/bin/clang-tblgen \
 		LLVMIncDir=${LLVM_PREFIX}/include \
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Brooks Davis freebsd_committer 2014-02-14 21:54:12 UTC
State Changed
From-To: open->closed

Committed.  Thanks for your submission!