Bug 11190 - pch test suite failure on x86_64-apple-darwin14 with Xcode 6.2 compilers
pch test suite failure on x86_64-apple-darwin14 with Xcode 6.2 compilers
Status: RESOLVED WONTFIX
Product: ccache
Classification: Unclassified
Component: ccache
3.2.1
x64 Mac OS X
: P5 normal
: ---
Assigned To: Joel Rosdahl
Joel Rosdahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-02 15:01 UTC by Jack Howarth
Modified: 2016-06-09 19:42 UTC (History)
0 users

See Also:


Attachments
tar.bz2 archive of failing test suite directory (476.97 KB, application/x-bzip2)
2015-04-02 15:01 UTC, Jack Howarth
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2015-04-02 15:01:03 UTC
Created attachment 10931 [details]
tar.bz2 archive of failing test suite directory

The ccache 3.2.1 release produces the following test suite failure on x86_64-apple-darwin14 against the Apple 6.0 clang compilers from Xcode 6.2...

test/main
PASSED: 446 assertions, 86 tests, 10 suites
CC='gcc' ./test.sh
compiler: /sw/var/lib/fink/path-prefix-clang/gcc
version: Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix
test dir: testdir.24115
starting testsuite base
starting testsuite link
starting testsuite hardlink
starting testsuite cpp2
starting testsuite nlevels4
starting testsuite nlevels1
starting testsuite basedir
starting testsuite direct
starting testsuite compression
starting testsuite readonly
starting testsuite readonly_direct
starting testsuite extrafiles
starting testsuite cleanup
starting testsuite pch
SUITE: "pch", TEST: "create .gch, -c, no -o" - Expected "cache miss" to be 1, got 0
cache directory                     /sw/src/fink.build/ccache-3.2.1-1/ccache-3.2.1/testdir.24115/.ccache
primary config                      /sw/src/fink.build/ccache-3.2.1-1/ccache-3.2.1/testdir.24115/.ccache/ccache.conf
secondary config      (readonly)    /sw/etc/ccache.conf
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
can't use precompiled header           1
files in cache                         0
cache size                           0.0 kB
max cache size                       5.0 GB
TEST FAILED
Test data and log file have been left in testdir.24115
Makefile:84: recipe for target 'test' failed
make: *** [test] Error 1
make: Target 'check' not remade because of errors.
Comment 1 Jack Howarth 2015-04-02 15:56:58 UTC
Building ccache 3.2.1 with CC=clang and CXX=clang++ produces a different set of test suite failures...

test/main
PASSED: 446 assertions, 86 tests, 10 suites
CC='clang' ./test.sh
compiler: /sw/var/lib/fink/path-prefix-clang/clang
version: Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix
test dir: testdir.90858
starting testsuite base
SUITE: "base", TEST: "-D not hashed" - Expected "cache hit (preprocessed)" to be 14, got 13
cache directory                     /sw/src/fink.build/ccache-3.2.1-1/ccache-3.2.1/testdir.90858/.ccache
primary config                      /sw/src/fink.build/ccache-3.2.1-1/ccache-3.2.1/testdir.90858/.ccache/ccache.conf
secondary config      (readonly)    /sw/etc/ccache.conf
cache hit (direct)                     0
cache hit (preprocessed)              13
cache miss                            40
called for link                        2
called for preprocessing               2
multiple source files                  1
compiler produced stdout               1
couldn't find the compiler             1
bad compiler arguments                 1
unsupported source language            2
unsupported compiler option            1
output to a non-regular file           1
no input file                          1
files in cache                         3
cache size                          12.3 kB
max cache size                       5.0 GB
TEST FAILED
Test data and log file have been left in testdir.90858
Makefile:84: recipe for target 'test' failed
make: *** [test] Error 1
make: Target 'check' not remade because of errors.
Comment 2 Joel Rosdahl 2015-04-27 19:51:55 UTC
Thanks for the bug report.

I don't think I understand the difference between the two cases. In the first case, does clang run in some GCC compatibility mode which doesn't kick in in the second case? Or is the difference something else?

By the way, when I run test.sh with clang, I get a failure on the very first test:

% CC=clang ./test.sh
compiler: /usr/bin/clang
version: Ubuntu clang version 3.3-16ubuntu1 (branches/release_33) (based on LLVM 3.3) Target: x86_64-pc-linux-gnu Thread model: posix
test dir: testdir.29989
starting testsuite base
SUITE: "base", TEST: "BASIC" - Files differ: reference_test1.o != test1.o
cache directory                     /home/joel/code/ccache/ccache/testdir.29989/.ccache
primary config                      /home/joel/code/ccache/ccache/testdir.29989/ccache.conf
secondary config      (readonly)    
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             1
files in cache                         1
cache size                           4.1 kB
max cache size                       5.0 GB
TEST FAILED

That failure is because recent clang versions apparently don't produce the same object file for a preprocessed version of the source as for a non-preprocessed version of the source. That's inherently incompatible with how ccache works by default. But your reported problems seem to be something else.
Comment 3 Joel Rosdahl 2016-06-09 19:42:43 UTC
Closing this now since no progress has been made for a long time. Please create a new issue at https://github.com/ccache/ccache/issues if wanted.