google / kati

An experimental GNU make clone
Apache License 2.0
941 stars 111 forks source link

Instructions do not work #150

Open mschwart opened 6 years ago

mschwart commented 6 years ago

When following the instructions from the README.md I end up with the following error:

$ build/kati/m2n --kati_stats --goma
using /run/user/314079/goma_schwartzmi as tmpdir
Auto update is skipped because latest/MANIFEST was updated recently.
Using goma VERSION=163 (latest)
GOMA version fdabf1b6311be985cf5e8c8483fafab271828dff@1537516851

goma is already running.

*kati*: Stack size: 8376320 bytes
[1/1] initializing build system ...
build/make/core/config.mk:53: *** unknown variable: OUT_DIR

Instrumenting a normal build and passing the variables results in more errors.

Also notable is that both methods provided in README are marked as deprecated.

What is the right way to invoke this tool?

danw commented 6 years ago

That's the deprecated instructions (for Android M or earlier). Newer versions use kati automatically (either from source build/kati for Android-N or as a prebuilt in prebuilts/build-tools/linux-x86/bin/ckati for later versions)

mschwart commented 6 years ago

Can we also get instructions on how to use gdb when building Android? That was the intent behind trying to directly invoke anyway... I see that now soong is making the invocation so it looks like it might not be trivial.

danw commented 6 years ago

Yeah, that's not necessarily easy, depending on how true you want to keep the environment. It's generally a lot easier to debug a smaller example build if you can create one.

To debug kati within soong_ui, it's probably best to create an option that pauses execution with SIGSTOP, or spins (etc) waiting for gdb to connect.

danw commented 6 years ago

Reopening to handle the gdb request