ports/115694: devel/gccxml won't compile on 7.0 due to new restrictions on casting lvalues

Coleman Kane cokane at FreeBSD.org
Tue Aug 21 21:00:04 UTC 2007

>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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 21 21:00:03 GMT 2007
>Originator:     Coleman Kane
>Release:        7.0-CURRENT
FreeBSD erwin 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Aug 21 15:50:58 EDT 2007 root at erwin:/usr/obj/usr/src/sys/ERWIN  amd64
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:


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.
cd /usr/ports/devel/gccxml && make

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," \
 	cd ${WRKSRC} && \
@@ -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
+		CPP="${CC} -E" \
+		CXX=${LOCALBASE}/bin/g++34
+MAKE_ENV+=	CC=${LOCALBASE}/bin/gcc34 \
+		CPP="${CC} -E" \
+		CXX=${LOCALBASE}/bin/g++34
 .include <bsd.port.post.mk>


More information about the freebsd-ports-bugs mailing list