question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ccache compilation issues?

See original GitHub issue

Hey guys, the new ccache compilation route causes me issues… I haven’t tried to step through the code to see exactly what’s going on but have included some error messages below in case you can spot anything obvious…

My problem is that i get an error when linking a bunch of compiled c++ “.o” files for one of the packages I’m including in my android distribution.

The P4A call I’m using to set off compilation looks like this:

python -m pythonforandroid.toolchain apk --private /home/hottwaj/prog/src/testapp --package=org.hottwaj.testapp --name="testapp" --version=0.2 --requirements=sdl,python2,audiostream,my_cpp_lib --dist_name=testapp

The command executed by P4A that’s going wrong looks like this:

/usr/bin/ccache -lm -L/home/hottwaj/.local/share/python-for-android/build/libs_collections/testapp/armeabi-L/home/hottwaj/.local/share/python-for-android/build/libs_collections/testapp -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/hottwaj/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -I/home/hottwaj/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/sdl/include -I/home/hottwaj/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/sdl_mixer  ... BIG LIST OF .o FILES ... -L/home/hottwaj/.buildozer/android/platform/android-ndk-r9c/sources/cxx-stl/stlport/libs/armeabi-v7a -L/home/hottwaj/.local/share/python-for-android/build/other_builds/python2/armeabi/python2/python-install/lib -lstlport_shared -llog -lpython2.7 -o my_linked_so_file_thing.so -fexceptions -frtti -fPIC -shared

The error message is:

/usr/bin/ccache: invalid option -- 'l'

If I roll back to before the ccache changes were made, e.g. https://github.com/kivy/python-for-android/commit/9916cb56f3b8a92eaff1f3f944ab9f2b49931b1e then I don’t have this problem anymore…

Other calls to ccache that I can see were executed by P4A look like this - but the problem call above is missing the gcc part - is that the cause?

/usr/bin/ccache arm-linux-androideabi-gcc

Thanks

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hottwajcommented, Jan 25, 2019

Sorry for never coming back on this. I ended up writing some custom code to disable ccache for a couple of my own cython recipes. Closing for now as seems like it might have just been me… Thanks!

0reactions
AndreMirascommented, Oct 8, 2018

I think I actually saw that and other weird things with audiostream too while working on #1382. I’ll come back to it when I’m done with conditional builds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is 'compile failed' a cache miss? · Issue #765 · ccache ... - GitHub
My understanding is that compile failed and preprocessor error are not technically cache misses since they don't even participate in caching. On ...
Read more >
Pocket article: Debugging ccache misses - Interrupt
ccache : The C Compiler Cache · Diagnosing cache misses. 1. Measure total cache misses; 2. Identify objects that are missing the cache;...
Read more >
ccache(1)
Ccache is a compiler cache. It speeds up recompilation by caching the result of previous compilations and detecting when the same compilation is ......
Read more >
Using ccache with clang 5 causes different results from just ...
Your compilation error is probably rooted in the same reason: clang probably ignores errors in some or all system headers like <byteswap.h> but ......
Read more >
Speeding up Slicer builds with CCache - Development
Ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found