can't use ccache in cygwin

671 views
Skip to first unread message

mrzerg

unread,
Nov 23, 2011, 6:05:52 AM11/23/11
to android-ndk
Hello:
I tried to use ccache under ndk-r7 and ndk-r5b, but both result in
error message like:

Compile++ arm : qqrestaurant <= link_entry.cpp
Compile++ arm : lm_restaurant1 <= Game.cpp
Compile++ arm : lm_restaurant1 <= Global.cpp
Compile++ arm : lm_restaurant1 <= CharacterSkinDB.cpp
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/
link_entry.tmp.zhicai-pc.6508.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/qqrestaurant/link_entry.o]
Error 1

I'm using cygwin 1.7.9-1 and ccache 2.4.
In the .ccache dir, only 2 files are generated, and they are all 0
bytes.
zhicai@zhicai-pc ~/.ccache
$ ls
0 1 2 3 4 5 6 7 8 9 DishDB.tmp.zhicai-pc.5088.ii a b c
d e f stats tmp.cpp_stderr.zhicai-pc.5088

I'm attaching the whole ndk-build log here

--------------------------------------------------------------------------------------------
F:\restaurant\trunk\Client\Project\Android>call setlocal.bat

F:\restaurant\trunk\Client\Project\Android>set CYGWIN_BASH=D:\DEV
\cygwin\bin\bash.exe

F:\restaurant\trunk\Client\Project\Android>set CYGWIN_PROJECT_PATH=/
cygdrive/f/restaurant/trunk/Client/Project/Android/

F:\restaurant\trunk\Client\Project\Android>D:\DEV\cygwin\bin\bash.exe
--login -c "cd /cygdrive/f/restaurant/trunk/Client/Project/A
ndroid/ && ${NDK}/ndk-build V=0 NDK_LOG=1 NDK_DEBUG=1 -j4 -k"
Android NDK: NDK installation path auto-detected: '/cygdrive/d/android/
android-ndk-r7'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Found /bin/uname.exe on Windows host
Android NDK: uname -s returned: CYGWIN_NT-6.1
Android NDK: Cygwin detected!
Android NDK: Host operating system detected: cygwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host tools prebuilt directory: /cygdrive/d/android/
android-ndk-r7/prebuilt/windows/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'awk' tool: awk
Android NDK: Host 'awk' test returned: Pass
Android NDK: Probing for 'cygpath' program
Android NDK: 'cygpath' found as: /usr/bin/cygpath
Using cygwin substitution rules:
/cygdrive/f => F:
/cygdrive/e => E:
/cygdrive/d => D:
/cygdrive/c => C:
/cygdrive/F => F:
/cygdrive/E => E:
/cygdrive/D => D:
/cygdrive/C => C:
/usr/lib => D:/DEV/cygwin/lib
/usr/bin => D:/DEV/cygwin/bin
/ => D:/DEV/cygwin
Android NDK: This NDK supports the following toolchains and target
ABIs:
Android NDK: arm-linux-androideabi-4.4.3: armeabi armeabi-v7a
Android NDK: x86-4.4.3: x86
Android NDK: Found platform root directory: /cygdrive/d/android/
android-ndk-r7/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4
android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-14/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-3/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-3/arch-x86
Android NDK: PLATFORM android-4 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-4/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-4/arch-x86
Android NDK: PLATFORM android-5 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-5/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-8/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-8/arch-x86
Android NDK: PLATFORM android-9 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-9/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/android/android-ndk-r7/
platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK: Found project path: .
Android NDK: Parsing ./jni/Application.mk
Android NDK: Found APP_PLATFORM=android-8 in ./project.properties
Android NDK: Defaulted to APP_BUILD_SCRIPT=./jni/Android.mk
Android NDK: Application 'local' forced debuggable through NDK_DEBUG
Android NDK: Selecting optimization mode through Application.mk: debug
Android NDK: Adding import directory: /cygdrive/d/android/android-ndk-
r7/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for
'armeabi' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/stlport'
Android NDK: Probing /cygdrive/d/android/android-ndk-r7/sources/cxx-
stl/stlport/Android.mk
Android NDK: Found in /cygdrive/d/android/android-ndk-r7/sources/
cxx-stl/stlport
Android NDK: Using prebuilt STLport libraries
Android NDK: Module 'lm_restaurant1' has C++ sources
Android NDK: Module 'lm_restaurant2' has C++ sources
Android NDK: Module 'lm_src' has C++ sources
Android NDK: Module 'qqrestaurant' has C++ sources
Compile++ arm : qqrestaurant <= link_entry.cpp
Compile++ arm : lm_restaurant1 <= Game.cpp
Compile++ arm : lm_restaurant1 <= Global.cpp
Compile++ arm : lm_restaurant1 <= CharacterSkinDB.cpp
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/
link_entry.tmp.zhicai-pc.6508.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/qqrestaurant/link_entry.o]
Error 1
Compile++ arm : lm_restaurant1 <= DaliyPresentDB.cpp
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/Game.tmp.zhicai-pc.
3700.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Game.o] Error 1
Compile++ arm : lm_restaurant1 <= DishDB.cpp
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/Global.tmp.zhicai-
pc.10232.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Global.o] Error 1
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/
CharacterS.tmp.zhicai-pc.8920.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Database/CharacterSkinDB.o] Error 1
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/
DaliyPrese.tmp.zhicai-pc.10172.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Database/DaliyPresentDB.o] Error 1
Compile++ arm : lm_restaurant1 <= DishMaterialsDB.cpp
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Database/DishDB.o] Interrupt
Compile++ arm : lm_restaurant1 <= ItemDB.cpp
Compile++ arm : lm_restaurant1 <= LoginPresentDB.cpp
arm-linux-androideabi-g++.exe: /home/zhicai/.ccache/
DishMateri.tmp.zhicai-pc.7900.ii: No such file or directory
arm-linux-androideabi-g++.exe: no input files
make: *** [obj/local/armeabi/objs-debug/lm_restaurant1/__/__/__/Src/
Restaurant/Database/DishMaterialsDB.o] Error 1
终止批处理操作吗(Y/N)?

David Turner

unread,
Nov 23, 2011, 6:46:08 AM11/23/11
to andro...@googlegroups.com
On Wed, Nov 23, 2011 at 12:05 PM, mrzerg <mrzer...@gmail.com> wrote:
Hello:
   I tried to use ccache under ndk-r7 and ndk-r5b, but both result in
error message like:

Yes, 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).

Wonder if I shouldn't provide one with a future NDK release though.
 

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


mrzerg

unread,
Nov 23, 2011, 7:22:44 AM11/23/11
to android-ndk
> Wonder if I shouldn't provide one with a future NDK release though.

Thank you, that's surely welcome for lot's of guys using cygwin

On 11月23日, 下午7时46分, David Turner <di...@android.com> wrote:

Reply all
Reply to author
Forward
0 new messages