From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 21 21:00:04 2007 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 3576C16A417 for ; Tue, 21 Aug 2007 21:00:04 +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 1305A13C45A for ; Tue, 21 Aug 2007 21:00:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LL03Xe020022 for ; Tue, 21 Aug 2007 21:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7LL03RG020016; Tue, 21 Aug 2007 21:00:03 GMT (envelope-from gnats) Resent-Date: Tue, 21 Aug 2007 21:00:03 GMT Resent-Message-Id: <200708212100.l7LL03RG020016@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, Coleman Kane Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82F8516A41A for ; Tue, 21 Aug 2007 20:52:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 727DD13C49D for ; Tue, 21 Aug 2007 20:52:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LKqKn6077007 for ; Tue, 21 Aug 2007 20:52:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l7LKqKbf077006; Tue, 21 Aug 2007 20:52:20 GMT (envelope-from nobody) Message-Id: <200708212052.l7LKqKbf077006@www.freebsd.org> Date: Tue, 21 Aug 2007 20:52:20 GMT From: Coleman Kane To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/115694: devel/gccxml won't compile on 7.0 due to new restrictions on casting lvalues 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: Tue, 21 Aug 2007 21:00:04 -0000 >Number: 115694 >Category: ports >Synopsis: devel/gccxml won't compile on 7.0 due to new restrictions on casting lvalues >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 21 21:00:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Coleman Kane >Release: 7.0-CURRENT >Organization: >Environment: FreeBSD erwin 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Aug 21 15:50:58 EDT 2007 root@erwin:/usr/obj/usr/src/sys/ERWIN amd64 >Description: When FreeBSD 7.0 was moved to GCC 4.2.0, the port devel/gccxml was broken. This was due to a compiler restriction that no longer allows the following constructs: *((int*)not_int_array_ptr)++; The new compiler rules do not allow for casted types to be lvalues. Rather, you must cast the rvalue to the type of the lvalue to get it to compile. In addition, as added severity, the WITH_PYSTE option to devel/boost depends upon devel/gccxml. >How-To-Repeat: cd /usr/ports/devel/gccxml && make >Fix: Attached patch that forces the compiler to be GCC 3.4 where OSVERSION >= 700000, rather than BROKENing it on that arch. Patch attached with submission follows: --- Makefile.orig 2007-08-21 16:50:27.000000000 -0400 +++ Makefile 2007-08-21 16:42:09.000000000 -0400 @@ -31,6 +31,7 @@ ${REINPLACE_CMD} -e "s,x86_64,amd64," \ ${WRKSRC}/../gccxml-0.6.0/GCC/gcc/config.gcc cd ${WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} \ ${LOCALBASE}/bin/cmake ../${DISTNAME} -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \ -DGCCXML_MAN_DIR:PATH="/man" @@ -39,7 +40,16 @@ .if ${ARCH} == "alpha" BROKEN= Build fails on alpha .elif ${OSVERSION} >= 700000 -BROKEN= Does not compile +# GCC-XML has some constructs that GCC 4.2 does not like. Namely, +# the use of casted-pointer-dereferences as an lvalue to post-increment +# operations. +USE_GCC= 3.4 +CONFIGURE_ENV+= CC=${LOCALBASE}/bin/gcc34 \ + CPP="${CC} -E" \ + CXX=${LOCALBASE}/bin/g++34 +MAKE_ENV+= CC=${LOCALBASE}/bin/gcc34 \ + CPP="${CC} -E" \ + CXX=${LOCALBASE}/bin/g++34 .endif .include >Release-Note: >Audit-Trail: >Unformatted: