From owner-freebsd-x11@FreeBSD.ORG Mon Dec 31 18:47:51 2012 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CBAAC1; Mon, 31 Dec 2012 18:47:51 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id ADF528FC08; Mon, 31 Dec 2012 18:47:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TpkOk-0006b0-9k; Mon, 31 Dec 2012 21:47:43 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=nTNLIZBXzkgJClOd24B5EO9Pri5tLo8Mh1gUoGrtDGQ=; b=L8E+ucLmy1BzW9y1kenJyOnJLxT1OEndLaxhYNEjj5tzZKBitoFQJ5b9N2LpZuVnXPeE/WbkPeuQSfi3RalNaECA+riocbscnRffr/BYWNT3Ui2UEEwAbtzCrq6OTa0Q8dPRznmKjiiemCkw63IZOJc9LYdmdGydA26zHSiKkuA=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TpkMf-000Naf-V0; Mon, 31 Dec 2012 18:45:35 +0000 From: Jan Beich To: Matthias Andree Subject: Re: Fwd: xfig build failure on amd64 with clang, possibly imake problem? In-Reply-To: <50E19443.30204@FreeBSD.org> (Matthias Andree's message of "Mon, 31 Dec 2012 14:33:55 +0100") Date: Mon, 31 Dec 2012 14:45:43 -0400 References: <50E19443.30204@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TpkMf-000Naf-V0@internal.tormail.org> Cc: freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 18:47:51 -0000 Matthias Andree writes: > I can confirm that on FreeBSD 9.1-RELEASE amd64, imake does not work > properly if compiled with Clang (instead of GCC). > > Can we please either have this debugged and fixed, > or can someone from x11@ set USE_GCC=any in devel/imake's Makefile? Why not use GNU cpp just for imake? It's not like imake uses cpp for anything other than generating makefiles. For example, Xaw3d and NAS build just fine with clang this way. While xfig fails due to other errors. http://paste.debian.net/220640 # Xaw3d-1.5E_4.log http://paste.debian.net/220639 # xfig-3.2.5b_1.log http://pastebin.com/Mk9GKgXV # nas-1.9.3.log Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 309596) +++ Mk/bsd.port.mk (working copy) @@ -1953,8 +1964,15 @@ X_FONTS_TYPE1_PORT= ${PORTSDIR}/x11-fonts/xorg-fon X_FONTS_ALIAS_PORT= ${PORTSDIR}/x11-fonts/font-alias .if defined(USE_IMAKE) +.if ${CC:T:M*clang*} == "clang" || ${OSVERSION} >= 1000024 +BUILD_DEPENDS+= cpp46:${PORTSDIR}/lang/gcc +# don't set CPP to allow non-imake users to use non-gnu cpp +CONFIGURE_ENV+= IMAKECPP="cpp46" +MAKE_ENV+= IMAKECPP="cpp46" +.else CONFIGURE_ENV+= IMAKECPP="${CPP}" -MAKE_ENV+= IMAKECPP="${CPP}" +MAKE_ENV+= IMAKECPP="${CPP}" +.endif MAKE_FLAGS?= CC="${CC}" CXX="${CXX}" BUILD_DEPENDS+= imake:${X_IMAKE_PORT} .endif Index: devel/gccmakedep/Makefile =================================================================== --- devel/gccmakedep/Makefile (revision 309596) +++ devel/gccmakedep/Makefile (working copy) @@ -14,12 +14,8 @@ MAN1= gccmakedep.1 PLIST_FILES= bin/gccmakedep -.include +post-patch: + @${REINPLACE_CMD} -e 's/test.*-traditional.*;/true;/' \ + ${WRKSRC}/configure -.if defined(CC) && ${CC:T:M*clang*} == "clang" || ${OSVERSION} >= 1000024 -BUILD_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp -RUN_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp -CONFIGURE_ENV+= ac_cv_path_RAWCPP="ucpp -s" -.endif - -.include +.include Index: devel/gccmakedep/files/patch-Makefile.in =================================================================== --- devel/gccmakedep/files/patch-Makefile.in (revision 0) +++ devel/gccmakedep/files/patch-Makefile.in (working copy) @@ -0,0 +1,11 @@ +--- Makefile.in~ ++++ Makefile.in +@@ -211,7 +211,7 @@ + # output lines with trailing backslashes. + # Allow XHASH to always be substituted, even in cases where XCOMM isn't. + CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ +- -e '/^\#line *[0-9][0-9]* *.*$$/d' \ ++ -e '/^$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ Index: devel/imake/Makefile =================================================================== --- devel/imake/Makefile (revision 309596) +++ devel/imake/Makefile (working copy) @@ -33,17 +33,9 @@ MAN1= ccmakedep.1 \ xmkmf.1 post-patch: - @${PERL} -pi -e 's,^#!/usr/bin/perl,#!${PERL},' ${WRKSRC}/mkhtmlindex.pl + @${REINPLACE_CMD} -e 's,^#!/usr/bin/perl,#!${PERL},' \ + ${WRKSRC}/mkhtmlindex.pl + @${REINPLACE_CMD} -e 's/test.*-traditional.*;/true;/' \ + ${WRKSRC}/configure -.include - -.if defined(CC) && ${CC:T:M*clang*} == "clang" || ${OSVERSION} >= 1000024 -BUILD_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp -RUN_DEPENDS+= ucpp:${PORTSDIR}/devel/ucpp -CONFIGURE_ENV+= ac_cv_path_RAWCPP="ucpp -s" - -post-build: - ${REINPLACE_CMD} -e 's|^configdirspec= *|configdirspec=|' ${WRKSRC}/xmkmf -.endif - -.include +.include Index: devel/imake/files/patch-Makefile.in =================================================================== --- devel/imake/files/patch-Makefile.in (revision 0) +++ devel/imake/files/patch-Makefile.in (working copy) @@ -0,0 +1,19 @@ +--- Makefile.in~ ++++ Makefile.in +@@ -845,13 +845,13 @@ uninstall-am: uninstall-appmanDATA unins + + + xmkmf: xmkmf.cpp +- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ ++ $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e '/^$$/d' -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ + + ccmakedep: mdepend.cpp +- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ ++ $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e '/^$$/d' -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ + + mergelib: mergelib.cpp +- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ ++ $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e '/^$$/d' -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@ + + mkhtmlindex: $(MKHTMLINDEX_SCRIPT) + $(AM_V_GEN)cp $(MKHTMLINDEX_SCRIPT) $@