From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 9 09:00:19 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7871065673 for ; Mon, 9 May 2011 09:00:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 88E5B8FC18 for ; Mon, 9 May 2011 09:00:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4990J8J048333 for ; Mon, 9 May 2011 09:00:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4990Jbb048329; Mon, 9 May 2011 09:00:19 GMT (envelope-from gnats) Resent-Date: Mon, 9 May 2011 09:00:19 GMT Resent-Message-Id: <201105090900.p4990Jbb048329@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0241F1065700 for ; Mon, 9 May 2011 08:54:30 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CDF2F8FC18 for ; Mon, 9 May 2011 08:54:29 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p498sT4o001683 for ; Mon, 9 May 2011 08:54:29 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p498sTIl001682; Mon, 9 May 2011 08:54:29 GMT (envelope-from nobody) Message-Id: <201105090854.p498sTIl001682@red.freebsd.org> Date: Mon, 9 May 2011 08:54:29 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/156901: [patch] cmake breaks with CC containing spaces X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2011 09:00:19 -0000 >Number: 156901 >Category: ports >Synopsis: [patch] cmake breaks with CC containing spaces >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 09 09:00:18 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_8 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 8.2-STABLE FreeBSD 8.2-STABLE #0: Sun Mar 20 04:15:47 CET 2011 root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64 >Description: This should be assigned to kde@. cmake is not able to deal with spaces in CMAKE_C_COMPILER and CMAKE_CXX_COMPILER. Example print/scribus: ===> Configuring for scribus-1.3.3.14_1 /bin/mkdir -p /usr/obj/mobileKamikaze.norad/amd64/usr/ports/print/scribus/work/scribus-1.3.3.14 -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Check for working C compiler: env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc CMake Error: your C compiler: "env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Check for working C compiler: env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc -- broken CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE): The C compiler "env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc" is not able to compile a simple test program. It fails with the following output: .. This is from the CMakeCache.txt file: //CXX compiler. CMAKE_CXX_COMPILER:FILEPATH=env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache c++ .. //C compiler. CMAKE_C_COMPILER:FILEPATH=env CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc >How-To-Repeat: Just define CC containing spaces and try to build a port with cmake (e.g. print/scribus or devel/qmake4). >Fix: cmake is able to handle CC with spaces if it's passed on through the environment instead of using parameters. >From the CMakeCache.txt file in that case: //C compiler. CMAKE_C_COMPILER:FILEPATH=/usr/bin/env //First argument to C compiler CMAKE_C_COMPILER_ARG1:STRING= CCACHE_PREFIX=/usr/local/bin/distcc /usr/local/bin/ccache cc Give me a list of ports to test it on and I'll provide you with tinderbox logs. Patch attached with submission follows: --- Mk/bsd.cmake.mk.orig 2011-05-09 09:59:23.000000000 +0200 +++ Mk/bsd.cmake.mk 2011-05-09 09:59:52.000000000 +0200 @@ -49,12 +49,8 @@ # # Default environment and arguments to cmake # -CMAKE_ENV?= ${CONFIGURE_ENV} -CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ - -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ - -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ - -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ - -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ +CMAKE_ENV?= ${CONFIGURE_ENV} ${MAKE_ENV} +CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \ -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES >Release-Note: >Audit-Trail: >Unformatted: