Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘ICONV_CONST’ undeclared, maybe a bug in the code? #35

Open
vineetsoni opened this issue Nov 29, 2019 · 1 comment
Open

error: ‘ICONV_CONST’ undeclared, maybe a bug in the code? #35

vineetsoni opened this issue Nov 29, 2019 · 1 comment

Comments

@vineetsoni
Copy link

I'm getting the following build error after the configuration:

  CC       src/frontend/src_frontend_libmcxx_la-cxx-dyninit.lo
  CC       src/frontend/src_frontend_libmcxx_la-cxx-tltype.lo
  CC       src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo
../src/frontend/cxx-exprtype.c: In function ‘string_literal_type’:
../src/frontend/cxx-exprtype.c:2449:13: error: ‘ICONV_CONST’ undeclared (first use in this function); did you mean ‘CV_CONST’?
             ICONV_CONST char* inbuff = (ICONV_CONST char*)codepoints;
             ^~~~~~~~~~~
             CV_CONST
../src/frontend/cxx-exprtype.c:2449:13: note: each undeclared identifier is reported only once for each function it appears in
../src/frontend/cxx-exprtype.c:2449:25: error: expected ‘;’ before ‘char’
             ICONV_CONST char* inbuff = (ICONV_CONST char*)codepoints;
                         ^~~~
../src/frontend/cxx-exprtype.c:2455:45: error: ‘inbuff’ undeclared (first use in this function); did you mean ‘outbuff’?
             size_t conv_result = iconv(cd, &inbuff, &inbyteslefts, &outbuff, &outbytesleft);
                                             ^~~~~~
                                             outbuff
Makefile:8167: recipe for target 'src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo' failed
make[2]: *** [src/frontend/src_frontend_libmcxx_la-cxx-exprtype.lo] Error 1

This is what I get whether I use --with-libiconv-prefix=<path> or --without-libiconv-prefix flag in the configuration.

Maybe it looks like a bug in the src?

@rofirrim
Copy link
Contributor

rofirrim commented Feb 5, 2020

This is a macro that is defined during configure.

In principle GNU libc has its own iconv implementation so there is no need to specify --with-libiconv-prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants