You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: use of undeclared identifier 'isascii' while compiling strstream.cpp #33678
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> includes (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.
Activity
llvmbot commentedon Aug 25, 2017
assigned to @mclow
mclow commentedon Aug 27, 2017
This is odd.
<__locale> includes (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.
llvmbot commentedon Aug 28, 2017
-E output part1
llvmbot commentedon Aug 28, 2017
-E part2
llvmbot commentedon Aug 28, 2017
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
mclow commentedon Aug 29, 2017
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.
mclow commentedon Feb 7, 2019
Do you have an update on this?
Is this a newlib problem? (because I can't see anything that libc++ is doing wrong here)
llvmbot commentedon Feb 7, 2019
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