Closed Jacobfaib closed 3 years ago
Thanks @Jacobfaib , this is a good report I can work on... Hope I can have some free time this weekend to put up a fix for it.
Let me know if you need me to provide you with any other info! I tried getting the full output of bear --verbose
by doing
bear --verbose -- make bearTest > ./bearLog.txt
however this only put the compile command (i.e. cc bearTest.c -o bearTest
) into the file while still printing bears logging output to stdout. Even redirecting via 2>&1
didn't change things. Is there another way it is supposed to be done? Worst case I can copy paste from terminal into a file but then this would include a bunch of bogus line-breaks.
@Jacobfaib could you try the new version on fixes branch? I have a fix that works with the test harness running with ccache.
I believe this is fixed on latest master.
Sorry for late reply, yes I can confirm this is fixed! Thanks.
Describe the bug Bear calls ccache v4.3 incorrectly by not telling ccache which compiler to use. From
ccache --help
:But Bear does the following:
resulting in
To Reproduce bearTest.c:
Then setup system like so
Expected behavior Bear should invoke the compiler after "ccache":
Environment:
Additional context
bear make
) with extra verbose log switches (e.g.bear -vvvv make
) and send the output of it, that would help a lot.So you might not actually get the exact form of the output I show above, but I am almost certain this is what is happening under the hood. My real test case is compiling the PETSc library. Here you actually see the bad call:
which makes ccache produce the following complaint:
Since it thinks
-fPIC
is an option intended for it. However the above case is also more complex, as I use ccache to wrap mpi compiler wrappers. Not sure if this is more complicated to handle for bear or not. Note that disabling ccache (by removing/usr/local/opt/ccache/libexec
from my$PATH
) makes all of this work.This may possibly be related to #372