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

Unable to compile in Termux #760

Open
jose1711 opened this issue Apr 27, 2022 · 2 comments
Open

Unable to compile in Termux #760

jose1711 opened this issue Apr 27, 2022 · 2 comments

Comments

@jose1711
Copy link

I am getting this trying to compile in Termux:

In file included from regex.c:68:
In file included from ./regex_internal.h:25:
In file included from ./stdio.h:43:
In file included from /data/data/com.termux/files/usr/include/stdio.h:47:
In file included from ./string.h:41:
In file included from /data/data/com.termux/files/usr/include/string.h:187:
/data/data/com.termux/files/usr/include/bits/fortify/string.h:91:47: error: use of undeclared identifier '__USE_FORTIFY_LEVEL'
        __clang_error_if(__bos_unevaluated_le(__bos(dst), __builtin_strlen(src)),
                                              ^
./cdefs.h:123:48: note: expanded from macro '__bos'
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
                                               ^
In file included from regex.c:68:
In file included from ./regex_internal.h:25:
In file included from ./stdio.h:43:
In file included from /data/data/com.termux/files/usr/include/stdio.h:47:
In file included from ./string.h:41:
In file included from /data/data/com.termux/files/usr/include/string.h:187:
/data/data/com.termux/files/usr/include/bits/fortify/string.h:91:47: error: use of undeclared identifier '__USE_FORTIFY_LEVEL'
$ gcc --version                                                                                                                  62% (CHG)─╯
clang version 14.0.1
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
@igalic
Copy link

igalic commented Apr 28, 2022

__USE_FORTIFY_LEVEL is an internal glibc thing.
While Android supports, or supported? FORTIFY_SOURCE, internally that might be implemented differently.

@DimitryAndric
Copy link
Contributor

It looks like Termux comes with its own C headers, as I see /data/data/com.termux/files/usr/include/stdio.h, /data/data/com.termux/files/usr/include/string.h, etc. And these seem to clash a bit with ./stdio.h, ./string.h and others, which appear to come from gnulib. Might be tricky to untangle.

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

No branches or pull requests

3 participants