Created attachment 188753 [details] Log file of build with CCACHE = on If we try to build apache-openoffice with synth, with option CCACHE=on, the build fails with this error: ccache: error: Failed to create directory /root/.ccache/tmp: Operation not permitted dmake: Error code 1, while making '../unxfbsdx.pro/obj/ifparser.obj' With poudriere, this problem does not occur since CCACHE_DIR is set to /root/.ccache where the configured ccache directory is mounted. With synth, CCACHE_DIR = /ccache and /root is read-only. But this port still wants to write to /root/.ccache Log file included.
Created attachment 188815 [details] Patch for editors/openoffice-4
I found that the problem could be fixed by exporting CCACHE_DIR to the shell's environment prior to executing build.pl. The attached patch does 2 things: - Fix the failure with the synth build. - Remove the CCACHE option and use WITH_CCACHE_BUILD to determine if the use of ccache is requested. This will allow this port to work with port builders in a more standardized way. The patch has been tested with both synth and poudriere on 11.1-RELEASE (amd64) I would also suggest that these 2 scripts be removed: files/ooo.sh files/generate.pl These 2 files play no role in the build and seems to be leftovers from the pre-OpenOffice-4 era.
Take this.
A commit references this bug: Author: truckman Date: Fri Jan 19 19:40:47 UTC 2018 New revision: 459465 URL: https://svnweb.freebsd.org/changeset/ports/459465 Log: Remove the CCACHE option and other ccache code from the Makefile and use the ccache code in the ports framework handle all of the details. Don't prepend ${WRKSRC}/solenv/bin to PATH in CONFIGURE_ENV since it is no longer needed and blocks the framework from adding CCACHE_WRAPPER_PATH to PATH in CONFIGURE_ENV and MAKE_ENV. Sanitize MAKE_ENV and export its to the build, similar to what is done by the default do-build target. This passes CCACHE_DIR and HOME (set to WRKDIR) to the build, so the $HOME override in r459316 is no longer needed. We need to remove the CPPFLAGS setting from MAKE_ENV before exporting to the build because it breaks the build of the bundled icu module. CFLAGS and CXXFLAGS are also removed because they would interfere with the carefully constructed compiler flags set by the port. The include paths are already handled by the port, and the port also modifies the optmization flags for some files to work around compiler bugs. While here, remove files/ooo.sh files/generate.pl since they have been obsolete for a long while. No PORTREVISION bump since the package should be unchanged. PR: 224276 Changes: head/editors/openoffice-4/Makefile head/editors/openoffice-4/files/generate.pl head/editors/openoffice-4/files/ooo.sh
A commit references this bug: Author: truckman Date: Sat Jan 20 00:51:39 UTC 2018 New revision: 459491 URL: https://svnweb.freebsd.org/changeset/ports/459491 Log: Remove the CCACHE option and other ccache code from the Makefile and use the ccache code in the ports framework handle all of the details. Don't prepend ${WRKSRC}/solenv/bin to PATH in CONFIGURE_ENV since it is no longer needed and blocks the framework from adding CCACHE_WRAPPER_PATH to PATH in CONFIGURE_ENV and MAKE_ENV. Sanitize MAKE_ENV and export it to the build, similar to what is done by the default do-build target. This passes CCACHE_DIR and HOME (set to WRKDIR) to the build, so the $HOME override in r459363 is no longer needed. We need to remove the CPPFLAGS setting from MAKE_ENV before exporting to the build because it breaks the build of the bundled icu module. CFLAGS and CXXFLAGS are also removed because they would interfere with the carefully constructed compiler flags set by the port. The include paths are already handled by the port, and the port also modifies the optmization flags for some files to work around compiler bugs. While here, remove files/generate.pl since it has been obsolete for a long while. No PORTREVISION bump since the package should be unchanged. PR: 224276 Changes: head/editors/openoffice-devel/Makefile head/editors/openoffice-devel/files/generate.pl