8000 [Bug]: lldb.sh doesn't work if NDK is placed in path that contains spaces · Issue #2144 · android/ndk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug]: lldb.sh doesn't work if NDK is placed in path that contains spaces #2144

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

Open
1 task done
kambala-decapitator opened this issue May 5, 2025 · 5 comments
Open
1 task done
Assignees
Labels

Comments

@kambala-decapitator
Copy link

Description

to reproduce:

  1. download dmg with NDK
  2. mount the dmg
  3. run lldb.sh directly from the dmg, e.g. by dragging the script file to Terminal
> /Volumes/Android\ NDK\ r28b/AndroidNDK13356709.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/lldb.sh 
/Volumes/Android NDK r28b/AndroidNDK13356709.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/lldb.sh: line 5: /Volumes/lldb: No such file or directory

Upstream bug

No response

Commit to cherry-pick

No response

I am using a supported NDK

  • I have checked and the NDK I'm using is currently supported

Affected versions

r28, r27

Host OS

Mac

Host OS version

macOS 14.7.5

Affected ABIs

x86_64, x86, arm64-v8a, armeabi-v7a

@github-project-automation github-project-automation bot moved this to Awaiting triage in LLVM May 5, 2025
@github-project-automation github-project-automation bot moved this to Unconfirmed in NDK r27d May 5, 2025
@github-project-automation github-project-automation bot moved this to Unconfirmed in NDK r28c May 5, 2025
@DanAlbert DanAlbert moved this from Unconfirmed to Needs prebuilt update in NDK r27d May 5, 2025
@DanAlbert DanAlbert moved this from Awaiting triage to Awaiting prebuilt drop in LLVM May 5, 2025
@DanAlbert DanAlbert moved this from Unconfirmed to Needs prebuilt update in NDK r28c May 5, 2025
@DanAlbert DanAlbert added this to NDK r29 May 5, 2025
@github-project-automation github-project-automation bot moved this to Unconfirmed in NDK r29 May 5, 2025
@DanAlbert DanAlbert added this to NDK r30 May 5, 2025
@github-project-automation github-project-automation bot moved this to Unconfirmed in NDK r30 May 5, 2025
@DanAlbert
Copy link
Member

Not discounting this bug, but FYI you're probably better off getting the NDK from the SDK manager in Studio.

This has probably always been broken, but until I've confirmed that, triaging to r27 and r28 as well. If it's not a regression from r26, we'll opportunistically cherry-pick a fix for r28c and r27d if those releases happen, but we won't spin up new releases for them.

I also haven't confirmed this for r29. I'll try to confirm that soon. If it is a problem, it's very nearly too late for us to get more fixes into this release, but we'll try.

@kambala-decapitator
Copy link
Author

you're probably better off getting the NDK from the SDK manager in Studio

the same issue would happen if I happen to have a space in my ANDROID_HOME path, of course

@DanAlbert
Copy link
Member

you're probably better off getting the NDK from the SDK manager in Studio

the same issue would happen if I happen to have a space in my ANDROID_HOME path, of course

True, though some NDK components (ndk-build, specifically) explicitly do not support being installed to paths with spaces in them.

The reason I recommend the SDK manager over the app bundle is that Apple doesn't really support app bundles in a format we need. That's going to be a non-standard workflow until Apple supports notarizing arbitrary zip files of executables with symlinks and rpaths.

@DanAlbert
Copy link
Member

@pirama-arumuga-nainar, it looks like I probably will be making an r28c, so it'd be nice if we could include a fix for this.

@pirama-arumuga-nainar
Copy link
Collaborator

Changing the first line of lldb.sh to be

CURDIR=$(cd "$(dirname "$0")" && pwd)

fixes the issue locally. I need to test it doesn't break on Linux.

@DanAlbert DanAlbert moved this from Unconfirmed to Merged in NDK r30 May 19, 2025
@DanAlbert DanAlbert moved this from Needs prebuilt update to Needs cherry-pick in NDK r27d May 19, 2025
@DanAlbert DanAlbert moved this from Needs prebuilt update to Needs cherry-pick in NDK r28c May 19, 2025
@DanAlbert DanAlbert moved this from Unconfirmed to Needs cherry-pick in NDK r29 May 19, 2025
@DanAlbert DanAlbert moved this from Awaiting prebuilt drop to Prebuilts submitted in LLVM May 19, 2025
@DanAlbert DanAlbert moved this from Needs cherry-pick to Needs prebuilt update in NDK r27d May 19, 2025
mindulmindul pushed a commit to mindulmindul/llvm_android that referenced this issue May 21, 2025
Bug: android/ndk#2144

Test: copy clang prebuilts into a path with spaces and run lldb.sh
Change-Id: I538187a200cb5ea29ff1af2ebfb6b05e28fb4c3f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Prebuilts submitted
Status: Needs prebuilt update
Status: Needs prebuilt update
Status: Needs cherry-pick
Status: Merged
Development

No branches or pull requests

3 participants
0