Bug 227921 - www/apache24: please add dependency to devel/ccache
Summary: www/apache24: please add dependency to devel/ccache
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-02 12:34 UTC by oz42
Modified: 2018-05-04 09:02 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oz42 2018-05-02 12:34:07 UTC
I have removed ccache and all its environment variables for several reasons, but www/apache24 still uses it, so we have a build dependency here:


--- shared-build-recursive ---
--- mod_mpm_prefork.la ---
/usr/local/share/apr/build-1/libtool --silent --mode=link cc    -O2 -pipe -I/usr/local/include -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing   -L/usr/local/lib/db5  -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector    -o mod_mpm_prefork.la -rpath /usr/local/libexec/apache24 -module -avoid-version prefork.lo
eval: /usr/local/libexec/ccache/world/cc: not found
*** [mod_mpm_prefork.la] Error code 127

Please add the build dependency to the Makefile.
Comment 1 Markus Kohlmeyer 2018-05-02 12:47:34 UTC
Can't find any reference to ccache in the sources or port files for apache24

[root@devnoip:~] # grep -rin 'ccache' httpd-2.4.33/ /usr/ports/www/apache24/
httpd-2.4.33/docs/server-status/server-status.lua:409:var trafficCache = [];
httpd-2.4.33/docs/server-status/server-status.lua:523:        trafficCache.push(el);
httpd-2.4.33/docs/server-status/server-status.lua:524:        if (trafficCache.length > maxRecords) {
httpd-2.4.33/docs/server-status/server-status.lua:525:            trafficCache.shift();
httpd-2.4.33/docs/server-status/server-status.lua:530:        for (var i in trafficCache) {
httpd-2.4.33/docs/server-status/server-status.lua:531:            var el = trafficCache[i];


So it looks to me, that you overlooked a reference to ccache on your own system.
Comment 2 tech-lists 2018-05-02 13:38:41 UTC
(In reply to Markus Kohlmeyer from comment #1)

Hi, I think you misunderstand the report. 

ccache in this context is a program and not part of the word "trafficCache". The report indicates something somewhere is picking up a ccache statement/loading it from a make.conf somewhere.
Comment 3 oz42 2018-05-02 13:43:53 UTC
The only reference to ccache that I could find on my host is in /etc/src.conf
Comment 4 tech-lists 2018-05-02 14:00:34 UTC
(In reply to oz42 from comment #3)
Might be worthwhile to temporarily move /etc/src.conf and try again, at least that's what I'd do. I know there is some functional crossover between src.conf and make.conf.
Comment 5 Olli Hauer freebsd_committer freebsd_triage 2018-05-02 20:07:41 UTC
I bet devel/apr1 was also build with ccache.

The internal apache Makefile (not the port) calls apr-1-config --cc and if apr was build with ccache it will record and deliver the build env via apr-1-config (/usr/local/bin/apr-1-config)
You can edit this file and change "/usr/local/libexec/ccache/world/cc" to "cc"

This was also already an issue e.g. if gawk or gsed was installed and the port was build without tools like poudriere (clean room building)
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2018-05-03 17:27:14 UTC
(In reply to oz42 from comment #0)

do you use the default options?
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2018-05-03 22:48:21 UTC
"please add dependency to devel/ccache" - I think it's obvious but we really
don't want to add a dependency to ccache.

(In reply to oz42 from comment #0)
> I have removed ccache and all its environment variables for several reasons,
> but www/apache24 still uses it, so we have a build dependency here:
> 
> 
> --- shared-build-recursive ---
> --- mod_mpm_prefork.la ---
> /usr/local/share/apr/build-1/libtool --silent --mode=link cc    -O2 -pipe
> -I/usr/local/include -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing 
> -L/usr/local/lib/db5  -L/usr/local/lib -Wl,-rpath,/usr/local/lib
> -fstack-protector    -o mod_mpm_prefork.la -rpath
> /usr/local/libexec/apache24 -module -avoid-version prefork.lo
> eval: /usr/local/libexec/ccache/world/cc: not found

This is a big red flag. Why is a port build using the *[build]world* compiler
link?

> *** [mod_mpm_prefork.la] Error code 127
> 
> Please add the build dependency to the Makefile.

I suspect you have some old CC= hack in your /etc/make.conf. Just use
WITH_CCACHE_BUILD=yes now instead.
Comment 8 oz42 2018-05-04 07:44:53 UTC
Olli Hauers comment #5 is correct. apr's cc configuration points to ccache's cc.

Please close this bug.