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

fix empty glob() error #98

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

gdevillele
Copy link
Contributor

tl;dr : the issue description and repro: https://github.com/gdevillele/debug_bazel

I am trying to build native C libs for Android using Bazel and rules_android_ndk, and am getting the following error:

glob pattern 'lib64/**/*' didn't match anything, but allow_empty is set to False

This is due to a breaking change introduced in Bazel 8.0.
(bazelbuild/bazel#8195)

Note: I am still a beginner with Bazel, so let me know if this is not the correct way of fixing this.
Thank you 🙂

@gdevillele
Copy link
Contributor Author

gdevillele commented Jan 29, 2025

Additional info:

  • old NDK versions (at least 25.2.9519653) did have lib & lib64 directories
  • more recent ones (at least 26.3.11579264 and 27.2.12479018) only have the lib directory

In the future, we might be able to remove the lib64 mention in the rules_android_ndk repo...

Someone else experiencing the same issue: https://bazelbuild.slack.com/archives/CD9FZL3KR/p1737971124191359

@@ -49,7 +49,7 @@ filegroup(
"bin/*",
"lib64/**/*",
"lib/**/*",
]),
], allow_empty = True),
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be helpful if you could add a comment either here or line 50 explaining the context: old NDKs had both lib and lib64, new NDKs only have lib.

Could you also run buildifier on this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review!
Doing that 👍

@ted-xie ted-xie mentioned this pull request Jan 29, 2025
@gdevillele gdevillele force-pushed the fix_glob_empty_error branch from d00c0a6 to f07a8fe Compare January 29, 2025 21:19
@gdevillele gdevillele requested a review from ted-xie January 29, 2025 21:20
@ted-xie ted-xie merged commit 4904acb into bazelbuild:main Jan 29, 2025
2 checks passed
@gdevillele gdevillele deleted the fix_glob_empty_error branch January 29, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants