Closed gaelj closed 8 years ago
Extra info:
gael@cooler-master /cygdrive/c/Users/gael/workspace/betaflight
$ make ccache
RESULT: 0
CCACHE: ccache
gael@cooler-master /cygdrive/c/Users/gael/workspace/betaflight
$ ccache
Usage:
ccache [options]
ccache compiler [compiler options]
compiler [compiler options] (via symbolic link)
Options:
-c, --cleanup delete old files and recalculate size counters
(normally not needed as this is done automatically)
-C, --clear clear the cache completely
-F, --max-files=N set maximum number of files in cache to N (use 0 for
no limit)
-M, --max-size=SIZE set maximum size of cache to SIZE (use 0 for no
limit; available suffixes: G, M and K; default
suffix: G)
-s, --show-stats show statistics summary
-z, --zero-stats zero statistics counters
-h, --help print this help text
-V, --version print version and copyright information
See also <http://ccache.samba.org>.
Also, I can confirm the problem disappears if I replace
CC := $(CCACHE) arm-none-eabi-gcc
with
CC := arm-none-eabi-gcc
Seems as ccache is broken. File that should have been cached is missing, it seems. Uninstall ccache and the Makefile will run gcc the old way without ccache. I'll see if I can reproduce, do not have a complete cygwin env setup. Anyone else that can confirm this cygwin problem ?
File that should have been cached is missing
I was just about to confirm this !
I have ccache version 3.1.9 in case this could help.
That is a bit old, 3.2.4 here.
Well... https://groups.google.com/forum/#!topic/android-ndk/15JI_uaXDug
you need a non-cygwin version of ccache. That's because the toolchain programs (e.g. arm-linux-androideabi-gcc.exe) do not understand that cygwin paths that ccache is passing to it under the covers (i.e. they can't access /home/zhicai/.ccache/whatever because there is no C:\home\zhicai.ccache on your machine).
There are a lot of bugs fixed in ccache since 3.1.9. For example in 3.1.11 I find this:
Fixed bug which could result in false cache hits when source code contains '"' followed by " /*" or " //" (with variations).
Seems you have a false cache hit....
Not sure how I can manually update it. I re-installed cygwin only a few weeks ago so this is the latest version it has by default. Oh well, I guess I'll reinstall cygwin without ccache.
Nah, just uninstall ccache. Or better yet, install Virtualbox or similar with a real Linux distro. Cygwin is a poor substitute...
We don't want to make it even more difficult than it already is for developers under windows to get a running setup. The problem won't just be for me... Cygwin is required for direct compilation from within Eclipse, so even if it's limited, it's very usefull in my case. A simple fix would be to update this page (CF doc): EDIT https://github.com/cleanflight/cleanflight/blob/master/docs/development/Building%20in%20Windows.md
Well, this is only a problem if ccache is installed. And there is no recommendation to do that, as far as I can see in the linked cygwin guide. And that guide is for CF, that does not even use ccache....
I didn't install ccache volontarily.
Updating cygwin and not enabling ccache installation resulted in ccache still being there. Maybe I should have deleted everything and do a fresh install, for the sake of checking this.
Anyway, simply deleting the file C:\cygwin64\bin\ccache.exe
fixed it.
I did not get ccache installed by default, but maybe it is bundled with some other selection. To uninstall you just toggle the selection until it says "uninstall".
I just made a new page in the betaflight Wiki, https://github.com/betaflight/betaflight/wiki/Known-Build-Environment-Problems
Would that be OK ?
OK ! Thanks ! Closing now.
Commit 4d69682c9649d48e09ca97c3ec6f23213fdacc82 seems to have broken compilation on my (windows 8) machine :
I get these error messages: