Skip to contentSkip to conversation

configure: disallow ccache during compile tests

PATCH Applied John Snow 3 participants 6 messages Oct 28, 2015 – Nov 2, 2015

lore
Share & tools
lore

John Snow

author
#0 lore raw

PATCH 1/1 configure: disallow ccache during compile tests

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later.

---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +4 -0
index 7a1d08d..9c726eb 100755
@@ -8,6 +8,9 @@
 CLICOLOR_FORCE= GREP_OPTIONS=
 unset CLICOLOR_FORCE GREP_OPTIONS
 
+# Don't allow CCACHE, if present, to use cached results of compile tests!
+export CCACHE_RECACHE=yes
+
 # Temporary directory used for files created while
 # configure runs. Since it is in the build directory
 # we can safely blow away any previous version of it
@@ -4412,6 +4415,7 @@ fi
 # check if ccache is interfering with
 # semantic analysis of macros
 
+unset CCACHE_CPP2
 ccache_cpp2=no
 cat > $TMPC << EOF
 static const int Z = 1;
Signature · 1 line
2.4.3
#1 lore raw
Quoted 7 lines · John Snow

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

This is confusing. "don't disable it entirely"?

Quoted 4 lines

2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later.

author
#2 lore raw
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · John Snow

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

Quoted 5 lines
Quoted 2 lines

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

This is confusing. "don't disable it entirely"?

We allow it to submit items into the cache, but not to read items from the cache. This prevents it from picking up cached results to the compile tests.

I don't disable it entirely (just pass-through to the real compiler without using ccache at all) because I still want to allow ccache to be processing things to test for ccache failures -- particularly the ccache macro check that occurs later.

If I just disable ccache, that later check is meaningless. Setting the cache to "write only" gives me the best of both worlds.

Quoted 4 lines
Quoted 4 lines

2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later.

#3 lore raw
Quoted 18 lines · John Snow
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · John Snow

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

Quoted 5 lines
Quoted 2 lines

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

This is confusing. "don't disable it entirely"?

We allow it to submit items into the cache, but not to read items from the cache. This prevents it from picking up cached results to the compile tests.

Quoted 7 lines

I don't disable it entirely (just pass-through to the real compiler without using ccache at all) because I still want to allow ccache to be processing things to test for ccache failures -- particularly the ccache macro check that occurs later.

If I just disable ccache, that later check is meaningless. Setting the cache to "write only" gives me the best of both worlds.

All right, shows that I can confuse with the best of them!

It took my a moment to understand what "disallow but don't disable" means. I think inserting "entirely" into your sentence right after "disable it" makes it easier to understand.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later.

#4 lore raw
Quoted 25 lines · Markus Armbruster
Quoted 23 lines · John Snow
Quoted 7 lines · Markus Armbruster
Quoted 5 lines · John Snow

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

Quoted 5 lines
Quoted 2 lines

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

This is confusing. "don't disable it entirely"?

We allow it to submit items into the cache, but not to read items from the cache. This prevents it from picking up cached results to the compile tests.

I don't disable it entirely (just pass-through to the real compiler without using ccache at all) because I still want to allow ccache to be processing things to test for ccache failures -- particularly the ccache macro check that occurs later.

Quoted 8 lines
Quoted 2 lines

If I just disable ccache, that later check is meaningless. Setting the cache to "write only" gives me the best of both worlds.

All right, shows that I can confuse with the best of them!

It took my a moment to understand what "disallow but don't disable" means. I think inserting "entirely" into your sentence right after "disable it" makes it easier to understand.

Ok, commit log adjusted.

Paolo

#5 lore raw
In reply to John Snow
Quoted 32 lines · John Snow

If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem.

1) Disallow CCACHE from reading from the cache during configure, but don't disable it to allow us to see if it causes other problems.

2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later.

---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +3 -0
index 7a1d08d..9c726eb 100755
@@ -8,6 +8,9 @@
 CLICOLOR_FORCE= GREP_OPTIONS=
 unset CLICOLOR_FORCE GREP_OPTIONS
 
+# Don't allow CCACHE, if present, to use cached results of compile tests!
+export CCACHE_RECACHE=yes
+
 # Temporary directory used for files created while
 # configure runs. Since it is in the build directory
 # we can safely blow away any previous version of it

configure fi · line 4421

Quoted 7 lines
configure +1 -0
@@ -4412,6 +4415,7 @@ fi
 # check if ccache is interfering with
 # semantic analysis of macros
 
+unset CCACHE_CPP2
 ccache_cpp2=no
 cat > $TMPC << EOF
 static const int Z = 1;

Queued, thanks.