gcc_termux icon indicating copy to clipboard operation
gcc_termux copied to clipboard

error: 'aligned_alloc' was not declared in this scope

Open MisesEnForce opened this issue 3 years ago • 2 comments

This is described here for gcc 8.0 :

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83662

but appears also for 8.4, for 9.x and 10.x and impacts the version your provide in your repo. Patchs were provided for this. Could you please use patch versions of the sources to regenerate the gcc's 8.x, 8.x and 10.x from your repos ?

Note : using -D_ISOC11_SOURCE doesn't help

MisesEnForce avatar Aug 10 '20 09:08 MisesEnForce

#if ANDROID_API >= 28 void* aligned_alloc(size_t __alignment, size_t __size) __INTRODUCED_IN(28); #endif /* ANDROID_API >= 28 */

it is in stdlib.h but requires android_api to be 28 or above. If your device is 28 (android 7 is 24 android 9 is 28) or above you can set -D__ANDROID_API__=28 and it will probably work.

its-pointless avatar Aug 11 '20 01:08 its-pointless

Thx for the tip. It is not my case, but millions of android phone are ANDROID_API<28. What do you propose for them ? Question : could you provide how you build (or cross build) the gcc's/g++'s for android please ? (Be it with android sdk/ndk or not.) I am really interested.

MisesEnForce avatar Aug 12 '20 09:08 MisesEnForce