Created attachment 19043 [details] Build log file with error messages I'm running into a problem building libcxx in conjunction with newlib. The attached log file contains the error messages. ^ The problem appears to be that isascii is referenced in __locale, but the include file cctype doesn't contain a definition. __locale: return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false; __locale: *__vec = isascii(*__low) ? __tab_[static_cast<int>(*__low)] : 0; __locale: if (isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m)) __locale: if (!(isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m))) A definition of isascii can be found in newlib's ctype.h. What's the best way to fix this? Thanks, Catherine
This is odd. <__locale> includes <cctype> (line 20), which includes <ctype.h> (line 39) So you should be getting the definition of isascii. Can you run the compile line again, removing the -c and using '-E' instead? That should give some preprocessed output, and we can see the exact sequence of includes.
Created attachment 19053 [details] -E output part1
Created attachment 19054 [details] -E part2
Created attachment 19055 [details] newlib's ctype.h After examining the -E output, I see that newlib's ctype.h is picked up. The isascii declarations are guarded, though: #if (__MISC_VISIBLE || __XSI_VISIBLE) && !defined _AEABI_PORTABLE int _EXFUN(isascii, (int __c)); int _EXFUN(toascii, (int __c)); #define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a') #define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A') #endif I don't know whether libcxx's use of isascii ought to be changed or if my defines wrt to newlib are incorrect. Do you know? Thanks, Catherine
(In reply to Catherine_Moore from comment #4) > I don't know whether libcxx's use of isascii ought to be changed or if my > defines wrt to newlib are incorrect. Do you know? No; I don't know. I *suspect* that you should define __MISC_VISIBLE to 1. But I'm not a Newlib expert, so that's just a guess.
Do you have an update on this? Is this a newlib problem? (because I can't see anything that libc++ is doing wrong here)
No, I don't have an update and I'm not currently tracking this problem. I will close it out and resubmit if we encounter in the future. Thanks, Catherine