Date: Mon, 31 Dec 2012 14:45:43 -0400 From: Jan Beich <jbeich@tormail.org> To: Matthias Andree <mandree@FreeBSD.org> Cc: freebsd-x11@freebsd.org Subject: Re: Fwd: xfig build failure on amd64 with clang, possibly imake problem? Message-ID: <1TpkMf-000Naf-V0@internal.tormail.org> In-Reply-To: <50E19443.30204@FreeBSD.org> (Matthias Andree's message of "Mon, 31 Dec 2012 14:33:55 %2B0100") References: <CADLo838HH5x741uERoKUy77WMt8tLuord4xzExgya6FYYemsig@mail.gmail.com> <50E19443.30204@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Andree <mandree@FreeBSD.org> 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 <bsd.port.pre.mk> +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 <bsd.port.post.mk> +.include <bsd.port.mk> 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 <bsd.port.pre.mk> - -.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 <bsd.port.post.mk> +.include <bsd.port.mk> 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) $@
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1TpkMf-000Naf-V0>