If CC is defined in make.conf inside a block such as this: .if ${.CURDIR:M/usr/ports/*} CC= distcc cc CXX= distcc c++ .endif And WRKDIRPREFIX is set i.e. like this: WRKDIRPREFIX=/usr/obj Maybe because /usr/ports is a read only NFS mount (like on my system), Ports that do not have a configure target will not receive CC and CXX, because it's not part of MAKE_ENV and make will fall back to the default (CC=cc), because the if case in make.conf is not matched. Examples for ports that are affected by this are devel/qmake and graphics/png . To fix this I created this patch that adds CC and CXX to the MAKE_ENV if neither HAS_CONFIGURE nor PERL_CONFIGURE are defined. How-To-Repeat: To repeat the problem set WRKDIRPREFIX somewhere outside of PORTSDIR and enclose the settings for ports in make.conf in a block as described in the full description.
Responsible Changed From-To: freebsd-ports-bugs->portmgr bsd.port.mk is port manager territory
On Mon, Jul 31, 2006 at 06:55:16PM +0000, Dominic Fandrey wrote: > To fix this I created this patch that adds CC and CXX to the MAKE_ENV > if neither HAS_CONFIGURE nor PERL_CONFIGURE are defined. You should also pass in the other variables set in the *_CONFIGURE case. Kris
This is my second attempt, apparently gnats regards my patches as spam. Anyway, here is the patch (again). I hope I did not forget any variables. Thank you for taking interest in this. --- Mk/bsd.port.mk.orig Wed Sep 20 06:04:05 2006 +++ Mk/bsd.port.mk Wed Sep 20 10:01:11 2006 @@ -2079,6 +2079,13 @@ RUN_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT} .endif +# Ensure that ports without a configure step know about CC and CXX. +.if !defined(HAS_CONFIGURE) && !defined(PERL_CONFIGURE) +MAKE_ENV+= CC="${CC}" CXX="${CXX}" \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + ${CONFIGURE_ENV} +.endif + # Macro for doing in-place file editing using regexps REINPLACE_ARGS?= -i.bak REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
Short response to note, that I'm addressing this issue in the SoC 2007 program. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
Gabor Kovesdan wrote: > Short response to note, that I'm addressing this issue in the SoC 2007 > program. > Hey, this is still open... I thought it had died long ago, i.e. I had given up hope that this would be addressed.. Thanks for the notification.
The issue still partly exists and my patch still completely fixes it. Without my patch: # make /usr/ports/devel/qmake ... ===> Building for qmake-3.3.8_1 "/usr/share/mk/bsd.compat.mk", line 35: warning: NOMAN is deprecated in favour of NO_MAN Warning: Object directory not changed from original /usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake c++ -O2 -fno-strict-aliasing -pipe -march=nocona -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/mkspecs/freebsd-g++ -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/tools -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/kernel -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/codecs -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/. -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/unix -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/win32 -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/mac -I. -I"/usr/ports/devel/qmake/files" -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_INSTALL_DATA="\"/usr/local/share/qt\"" -c project.cpp ... With the patch: # make /usr/ports/devel/qmake ... ===> Building for qmake-3.3.8_1 "/usr/share/mk/bsd.compat.mk", line 35: warning: NOMAN is deprecated in favour of NO_MAN Warning: Object directory not changed from original /usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake /usr/local/bin/ccache c++ -O2 -fno-strict-aliasing -pipe -march=nocona -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/mkspecs/freebsd-g++ -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/tools -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/kernel -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/src/codecs -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/. -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/unix -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/win32 -I/usr/obj/mobileKamikaze.norad/usr/ports/devel/qmake/work/qt-x11-free-3.3.8/qmake/generators/mac -I. -I"/usr/ports/devel/qmake/files" -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -DQT_INSTALL_DATA="\"/usr/local/share/qt\"" -c project.cpp ... As you can see the CFLAGS are the same, but CC is ignored by the port, without the patch.
State Changed From-To: open->closed Modified version of this patch was committed
pav 2008-07-24 22:29:33 UTC FreeBSD ports repository Modified files: Mk bsd.gcc.mk bsd.port.mk games/formido Makefile graphics/gdal/files patch-swig-python-GNUmakefile x11-toolkits/xmhtml Makefile x11-wm/sapphire Makefile Log: - Add CC and CXX to MAKE_ENV for all ports PR: ports/86106, ports/101120 (based on) Revision Changes Path 1.18 +1 -3 ports/Mk/bsd.gcc.mk 1.600 +4 -3 ports/Mk/bsd.port.mk 1.8 +2 -1 ports/games/formido/Makefile 1.2 +1 -1 ports/graphics/gdal/files/patch-swig-python-GNUmakefile 1.32 +1 -1 ports/x11-toolkits/xmhtml/Makefile 1.21 +1 -1 ports/x11-wm/sapphire/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"