The latest update removed gcc and g++ and replaced it with clang.
Although I prefer the clang compiler in general, there are too many thjngs that clang cannot do to remove gcc just yet. For example, transactional memory. I'm not sure if gcc ever worked or it was a wrapper around clang, but the package is gone now.
Update: It definitely broke several of my projects...
g++ defaults to the current version of C++, but clang++ defaults to a very old version. At minimum, you now need to add -std=c++14 to clang++ whereas with g++ this was a default option. Also g++ has better support for C++1z last time I checked.
Imo g++ should not have been removed. It does seem to have some bugs on android but these are minor if you need transactional memory, etc.
I think gcc should at least reside in disabled-packages.
I could provide the previous package (as a link outside the apt repo) with a warning that it's unsupported. That said, the situation is clearly moving towards that "if you want to target Android you need to target clang" due to the Android project only supporting clang. See https://android.googlesource.com/platform/ndk.git/+/master/CHANGELOG.md:
GCC is no longer supported. It will not be removed from the NDK just yet,
but is no longer receiving backports. It cannot be removed until after libc++
has become stable enough to be the default, as some parts of gnustl are
still incompatible with Clang. It will likely be removed after that point.
That is, even if a gcc package is provided inside Termux (that will fall behind in versions and/or get more buggy over time), outside of Termux you will need clang compatibility to work on Android anyway.
For many use cases clang should work like a drop-in replacement. Let me know if there is anything that can be done to improve the clang package!
I'd like to join the petition to keep gcc available, at least in some form.
The reason why I would prefer to stick with gcc, is mainly the language extensions. I don't want to go into philosophical discussion whether using non-standard features is good or bad, but those features do exist and some of them are quite useful. Clang "aims to support" most gcc language extensions, but "aims to support" is not the same as "supports". So far I haven't been able to find an exhaustive and definitive list of which are or are not currently supported. Of course, since gcc is being dropped from Android NDK, it makes perfect sense to switch to the supported tools and stop using features unsupported by clang - but only for Android projects.
Obviously, I can't speak for everyone, but I don't see Termux as development environment for Android. I see it as a generic Linux/POSIX environment, which happens to run on Android and which I can use to work with all my projects that are not specific to Android in any way. In that context it is largely irrelevant what C compiler Google provides/supports in Android NDK. Of course, I realize that it may be to much effort to keep maintaining gcc when it's abandoned by Google. In that case just keeping the current gcc version available, without further maintenance, would be already better than nothing. Personally, I would be satisfied, and grateful, if the current version were available for manual download and installation, even if unsupported.
I installed termux as an easier alternative to installing debian on my phone. Even if GCC isn't supported by Android, Android still runs the Linux kernel, and I develop for Linux.
Plus, supported or not, it will be possible to use gcc anyway using "extern C" at the least...
clang is unuseful for me
IF gcc makes it possible to install numpy+scipy python packages, then it makes sense to make it available in some form. (see #136 )
Having gcc would be nice. Having a maintained termux without gcc is also nice. Just throwing my hat in for gcc until clang can replace it for numpy.
I would add my vote to retain gcc. At least installed via pip, clang seems to also produce broken cython .so's - segfaulting in module inits. I don't really see a problem with both being installed. With both, people trying to link against other Android c++/other google stuff can use clang, but people trying to use termux as a POSIX-ish environment can just use gcc which seems more compatible with (or at least assumed by) other tools.
Maybe better remove clang at all as unstable and not production ready?
What is important here is to ascertain whether the critical (for any scientist) packages like scipy and matplotlib are installable if gcc was available. If they are, then, sure, clang should be thrown away (and Google, btw, should be resisted and not blindly obeyed --- remember the good old days when we resisted Microsoft and now we (Linux community) have won and nobody (in his right mind) even remembers what "Microsoft" or "Windows" are, hopefully). Who cares what Google supports --- in the coming new epoch (aka "New Age") there won't be any likes of Google or Apple, but Linux and the brotherhood of all who dedicate their lives to loving and unselfish service of mankind will remain forever.
its not about that. People are busy and maintaining 2 different compilers is a lot of work. And the less support google gives gcc the harder it will be. That is the issue. Its open source and fornwall is but one man....
Linus Torvalds was also "but one man" and he even himself said originally (in his announcement of this new toy called "linux") that "it (meaning Linux) won't ever be as professional as GNU (meaning "Hurd")" --- but look what happened. Determination of one inspired man assisted by a myriad of like-minded freedom-loving helpers can and does "turn the world upside down".
Consider a sociologist. A materialistic sociologist, to be exact. He surveys a community, makes his report thereon and... leaves the people exactly as he found them. And now consider the unlearned Galileans 1900 years ago --- they surveyed one man giving his life as a FREE contribution to the enlightenment and growth of all men and women and then they went out and turned the whole Roman empire upside down.
Let me add one thing to clarify: the man himself doesn't necessarily have to be aware that he is "inspired" or that he is in fact "building the foundation for the New Age of Brotherhood". I once told the maintainers of Library Genesis that they are in fact being monitored and assisted by none other than the same great Melchizedek (who serves in planetary government of our world) who taught Abraham 4000 years ago and they laughed at me. They are all humble guys and have no idea of the greatness of the work they are doing (emanating from the greatness of their own selves being identified with the great Spirit of my Father within them).
I would love to see gcc remain too. clang doesnt work on the project I am working on.
I do linux dev on Termux.
Please do something to retain gcc.
Please gcc is the best C/C++ compiler for me. If there is anyway to have it in termux, I am totally fine
@JosiasAurel install it from its-pointless repository: https://github.com/its-pointless/gcc_termux
Most helpful comment
IF gcc makes it possible to install numpy+scipy python packages, then it makes sense to make it available in some form. (see #136 )