Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make unroll-stacktrace ndk_stack resolution more robust #7044

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/unroll_stacktrace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ find_ndkstack() {
echo "$PROPS_FILE not found! NDK location cannot be determined"
exit 1
fi
NDK_STACK=$(grep "ndk.dir" "$PROPS_FILE" | cut -d = -f2)/ndk-stack
NDK_STACK=$(grep "^ndk.dir" "$PROPS_FILE" | cut -d = -f2)/ndk-stack
which $NDK_STACK || { echo "Could not find 'ndk_stack' at $NDK_STACK"; exit ;}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, but this doesn't work for me unless I remove this line set -euo pipefail . I don't remember why I added that to be honest, so probably safe to remove.

But it also looks like we need a new way to find ndk-stack. With the new NDK the default location seems to be $sdk_dir/ndk-bundle/prebuilt/darwin-x86_64/bin/ndk-stack

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which version of NDK is in $sdk_dir/ndk-bundle/prebuilt/darwin-x86_64/bin/ndk-stack. All my downloaded versions including latests 21.3.6528147 except are in $sdk_dir/ndk/<version>.

In my end it just failed due to multiple ndk.dir entries - some commented out. Sounds a bit to dangerous to remove the set -euo pipefail, as it probably catches some corner cases that we do not think off/test right now. Maybe it just fails in your end due to different NDK location?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question actually. You are right, it is probably safer to use the one under ndk/version.

The problem I had with set -euo pipefail set, was that it swallowed the errors printed out. So the echo you added above was never printed.

}

download_and_unzip_stripped_libs() {
Expand Down