Skip to content

libcxx/cctype: error: no member named 'isalnum' in the global namespace #7253

@rth

Description

@rth

I'm trying to build scipy as part of the pyodide project with emsdk 1.38.12 and I am getting a few errors of the form,

em++  -Wno-implicit-function-declaration -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -I[...] -c scipy/sparse/sparsetools/sparsetools.cxx -o build/temp.linux-x86_64-3.7/scipy/sparse/sparsetools/sparsetools.bc -MMD -MF build/temp.linux-x86_64-3.7/scipy/sparse/sparsetools/sparsetools.o.d
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:104:9:
   error: no member named 'isalnum' in the global namespace; did you mean 'iswalnum'?
using ::isalnum;
      ~~^

The same error message is also obtained for isalpha, isblank, iscntrl, isdigit, isgraph, islower, isprint, isspace, isupper, isxdigit, tolower and toupper functions.
While the initial include that triggers it at scipy/sparse/sparsetools/sparsetools.cxx:29: is just,

#include <string>

The full error logs can be found below,

Details
em++ -I../../CLAPACK-WA/F2CLIBS/libf2c/ -Wno-implicit-function-declaration -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/home/rth/src/pyodide/cpython/build/3.7.0/host/lib/python3.7/site-packages/numpy-1.15.1-py3.7-linux-x86_64.egg/numpy/core/include -I/home/rth/src/pyodide/cpython/installs/python-3.7.0/include/python3.7 -c scipy/sparse/sparsetools/sparsetools.cxx -o build/temp.linux-x86_64-3.7/scipy/sparse/sparsetools/sparsetools.bc -MMD -MF build/temp.linux-x86_64-3.7/scipy/sparse/sparsetools/sparsetools.o.d
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:104:9: error: no member named 'isalnum' in the global namespace; did you mean 'iswalnum'?
using ::isalnum;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:159:11: note: 'iswalnum' declared here
int       iswalnum(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:105:9: error: no member named 'isalpha' in the global namespace; did you mean 'iswalpha'?
using ::isalpha;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:160:11: note: 'iswalpha' declared here
int       iswalpha(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:106:9: error: no member named 'isblank' in the global namespace; did you mean 'iswblank'?
using ::isblank;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:161:11: note: 'iswblank' declared here
int       iswblank(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:107:9: error: no member named 'iscntrl' in the global namespace; did you mean 'iswcntrl'?
using ::iscntrl;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:162:11: note: 'iswcntrl' declared here
int       iswcntrl(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:108:9: error: no member named 'isdigit' in the global namespace
using ::isdigit;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:109:9: error: no member named 'isgraph' in the global namespace; did you mean 'iswgraph'?
using ::isgraph;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:164:11: note: 'iswgraph' declared here
int       iswgraph(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:110:9: error: no member named 'islower' in the global namespace; did you mean 'iswlower'?
using ::islower;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:165:11: note: 'iswlower' declared here
int       iswlower(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:111:9: error: no member named 'isprint' in the global namespace; did you mean 'iswprint'?
using ::isprint;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:166:11: note: 'iswprint' declared here
int       iswprint(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:112:9: error: no member named 'ispunct' in the global namespace; did you mean 'iswpunct'?
using ::ispunct;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:167:11: note: 'iswpunct' declared here
int       iswpunct(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:113:9: error: no member named 'isspace' in the global namespace; did you mean 'iswspace'?
using ::isspace;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:168:11: note: 'iswspace' declared here
int       iswspace(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:114:9: error: no member named 'isupper' in the global namespace; did you mean 'iswupper'?
using ::isupper;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:169:11: note: 'iswupper' declared here
int       iswupper(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:115:9: error: no member named 'isxdigit' in the global namespace
using ::isxdigit;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:116:9: error: no member named 'tolower' in the global namespace; did you mean 'towlower'?
using ::tolower;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:172:11: note: 'towlower' declared here
wint_t    towlower(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:29:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/string:481:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwchar:107:
In file included from /home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cwctype:54:
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libcxx/cctype:117:9: error: no member named 'toupper' in the global namespace; did you mean 'towupper'?
using ::toupper;
      ~~^
/home/rth/src/pyodide/emsdk/emsdk/emscripten/tag-1.38.12/system/include/libc/wchar.h:173:11: note: 'towupper' declared here
wint_t    towupper(wint_t);
          ^
In file included from scipy/sparse/sparsetools/sparsetools.cxx:34:
In file included from /home/rth/src/pyodide/cpython/build/3.7.0/host/lib/python3.7/site-packages/numpy-1.15.1-py3.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /home/rth/src/pyodide/cpython/build/3.7.0/host/lib/python3.7/site-packages/numpy-1.15.1-py3.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1821:
/home/rth/src/pyodide/cpython/build/3.7.0/host/lib/python3.7/site-packages/numpy-1.15.1-py3.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
1 warning and 14 errors generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting

while the C++ file being being built can be found here.

I have not seen such errors in other existing emscripten issues / mailing list posts and I assume #include <string> does work in other projects. Maybe it's a usage question but then because the error happens inside system/include/libcxx/cctype I though it still might be worth reporting on Github.

Any suggestions would be very much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions