Skip to content

cgen: fix function-like macro '_BIONIC_AVAILABILITY_GUARD' is not defined in termux#26345

Merged
spytheman merged 2 commits into
vlang:masterfrom
Krchi:fix-build-in-termux
Jan 14, 2026
Merged

cgen: fix function-like macro '_BIONIC_AVAILABILITY_GUARD' is not defined in termux#26345
spytheman merged 2 commits into
vlang:masterfrom
Krchi:fix-build-in-termux

Conversation

@Krchi

@Krchi Krchi commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

fix compiler error in termux(0.118.0)
Snipaste_2026-01-13_22-48-08
Snipaste_2026-01-13_22-50-07

@spytheman

Copy link
Copy Markdown
Contributor

I do not get it - currently V works fine on Termux. What problem does this solve?

@Krchi

Krchi commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

does
_BIONIC_AVAILABILITY_GUARD need ndk, and i cant build v

@spytheman

Copy link
Copy Markdown
Contributor

Sorry, but I already do use Termux on my own phone which is running Android 14 and is RMX3630.
V works there, and I use it ~ once per week. Many other people have used V on Termux too (search the Discord). It even has a dedicated section in the readme, documenting the steps needed to install it there:

pkg install clang libexecinfo libgc libgc-static make git
pkg update
git clone --depth=1 https://github.com/vlang/v
cd v
make
./v symlink

If you have a specific problem with it, please file an issue, describing the actual details, like Termux version, Android level etc.

That:

_BIONIC_AVAILABILITY_GUARD need ndk, and i cant build v

is not enough to understand the issue.

@spytheman

Copy link
Copy Markdown
Contributor

Thanks for the edit of the description.

@spytheman

Copy link
Copy Markdown
Contributor

What is your cc --version ?

@spytheman

Copy link
Copy Markdown
Contributor

for me, using make:

Screenshot_2026-01-13-17-00-21-47_84d3000e3f4017145260f7618db1d683.jpg

@spytheman

Copy link
Copy Markdown
Contributor

termux-info shows that mine is 0.118.3, and has TERMUX_APK_RELEASE=GITHUB

@Krchi

Krchi commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the edit of the description.

fix compiler error in termux(0.118.0)

make also cant work, because _BIONIC_AVAILABILITY_GUARD is old code, and i had to fix macro in v.c, and #if __BIONIC_AVAILABILITY_GUARD && __BIONIC_AVAILABILITY_GUARD(28) is not robust when macro not defined

@Krchi

Krchi commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

What is your cc --version ?

20.1.7

@spytheman

spytheman commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Have you run pkg install clang libexecinfo libgc libgc-static make git and have you installed Termux from the Google Play store, or from https://github.com/termux/termux-app ?

@Krchi

Krchi commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

pkg install clang libexecinfo libgc libgc-static make git

➜ v git:(e32aa73) ✗ pkg install clang libexecinfo libgc libgc-static make git
Checking availability of current mirror:
[*] https://packages-cf.termux.dev/apt/termux-main: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libandroid-execinfo' instead of 'libexecinfo'
The following additional packages will be installed:
libllvm lld llvm
Suggested packages:
perl
The following packages will be upgraded:
clang git libandroid-execinfo libgc libgc-static libllvm lld llvm make
9 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
Need to get 83.6 MB of archives.
After this operation, 13.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

It seems like I haven't updated in a long time.

@spytheman

Copy link
Copy Markdown
Contributor

Does it still fail (after the update) on the master branch @Krchi ?

@Krchi

Krchi commented Jan 14, 2026

Copy link
Copy Markdown
Contributor Author

Does it still fail (after the update) on the master branch @Krchi ?

it ok after update, may be old ndk version is 27,
but the currcent check is wrong, it should check with two #if or ensure have before use

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @Krchi 🙇🏻 .
Excellent work.

@spytheman spytheman merged commit 19e79c4 into vlang:master Jan 14, 2026
85 checks passed
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