Discussion:
[Swig-devel] ccache-swig test failed
Jitka Plesníková
2015-10-22 11:07:06 UTC
Permalink
Hi,

I tried to rebuild the swig 3.0.7 in Fedora 22, but it failed with
following error.

test -z "1" || (cd CCache && make check)
make[1]: Entering directory '/builddir/build/BUILD/swig-3.0.7/CCache'
SWIG_LIB='.././../Lib' PATH=../..:$PATH SWIG='swig' CC='gcc'
NOSOFTLINKSTEST='' ./test.sh
starting testsuite base
SUITE: base TEST: BASIC - Expected cache miss to be 1 got 2
cache directory ccache dir
cache hit 0
cache miss 2
files in cache 4
cache size 12 Kbytes
max cache size 854.5 Mbytes
TEST FAILED
Makefile:63: recipe for target 'test' failed
make[1]: Leaving directory '/builddir/build/BUILD/swig-3.0.7/CCache'
make[1]: *** [test] Error 1
Makefile:138: recipe for target 'check-ccache' failed
make: *** [check-ccache] Error 2

This error appeared only on some system. After some investigation, we
found that the CCache test failed only when ccache (3.2.4) is installed on
the building system.

I checked that the issue also appeared with older version of swig and
ccache.

Bug report for Fedora is
https://bugzilla.redhat.com/show_bug.cgi?id=1274031

and there is attached patch which we use in Fedora now.

Could you please check if it is right solution or do you find anything
better?

Thanks,
Jitka


------------------------------------------------------------------------------
William S Fulton
2015-10-22 22:42:07 UTC
Permalink
Post by Jitka Plesníková
Hi,
I tried to rebuild the swig 3.0.7 in Fedora 22, but it failed with
following error.
test -z "1" || (cd CCache && make check)
make[1]: Entering directory '/builddir/build/BUILD/swig-3.0.7/CCache'
SWIG_LIB='.././../Lib' PATH=../..:$PATH SWIG='swig' CC='gcc'
NOSOFTLINKSTEST='' ./test.sh
starting testsuite base
SUITE: base TEST: BASIC - Expected cache miss to be 1 got 2
cache directory ccache dir
cache hit 0
cache miss 2
files in cache 4
cache size 12 Kbytes
max cache size 854.5 Mbytes
TEST FAILED
Makefile:63: recipe for target 'test' failed
make[1]: Leaving directory '/builddir/build/BUILD/swig-3.0.7/CCache'
make[1]: *** [test] Error 1
Makefile:138: recipe for target 'check-ccache' failed
make: *** [check-ccache] Error 2
This error appeared only on some system. After some investigation, we
found that the CCache test failed only when ccache (3.2.4) is installed on
the building system.
I checked that the issue also appeared with older version of swig and
ccache.
Bug report for Fedora is
https://bugzilla.redhat.com/show_bug.cgi?id=1274031
and there is attached patch which we use in Fedora now.
Could you please check if it is right solution or do you find anything
better?
I can see why this problem is arising. /usr/lib/ccache/gcc is a
symlink to /usr/bin/ccache on Fedora. So when ccache-swig tries to
invoke gcc, it actually invokes ccache. As ccache-swig is just a
modified version of ccache, ccache uses the same cache that
ccache-swig uses and hence interferes with the tests which check the
cache after invoking gcc. I don't know what the best solution is. The
ccache-swig tests are also an expanded version of the original ccache
tests, which means that ccache will suffer the same problems when it
is being built and tested (with make check) on Fedora as the installed
ccache will interfere with it. How does Fedora cope with this
situation? I'm intrigued to know as the solution will also work for
ccache-swig.

The patch you provide is okay, but is very specific to how Fedora has
set up and installed ccache, so am just looking for a more generic
solution.

William

------------------------------------------------------------------------------
Loading...