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

Build fails with clang-6: error: 'xsgetn' is a protected member of 'std::__1::basic_streambuf<char>' #56

Closed
yurivict opened this issue Jul 24, 2018 · 6 comments

Comments

@yurivict
Copy link

yurivict commented Jul 24, 2018

Getting these errors on FreeBSD 12:

/usr/local/include -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -c mstate.cc  -fPIC -DPIC -o .libs/mstate.o
mstate.cc:577:28: error: 'xsgetn' is a protected member of 'std::__1::basic_streambuf<char>'
      *nbuf_buffer = buf_->xsgetn(buffer,bufsize);
                           ^
/usr/include/c++/v1/streambuf:281:24: note: declared protected here
    virtual streamsize xsgetn(char_type* __s, streamsize __n);
                       ^
@yurivict
Copy link
Author

There are also errors like this:

disprep.cc:29:44: error: use of undeclared identifier 'endl'; did you mean 'std::endl'?
           << " dispersion coefficient" << endl;
                                           ^~~~
                                           std::endl

@yurivict
Copy link
Author

USING_NAMESPACE_STD and HAVE_SGETN are unset, this causes this problem.
I don't know of any situations when use std; can be optional depending on something.
And xsgetn is always protected, see here https://en.cppreference.com/w/cpp/io/basic_streambuf/sgetn

@evaleev
Copy link
Member

evaleev commented Aug 15, 2018

this is version 2.3.1?

@yurivict
Copy link
Author

I'll try the version 3.X and will get back to you.

@evaleev
Copy link
Member

evaleev commented Aug 15, 2018

@yurivict version 3.X is abandoned and will not be maintained. Version 4 is live in master and will be released (as 4.0.0-beta.1) any day now. I'd like to fix 2.3.1 though, if that version is giving you trouble.

@yurivict
Copy link
Author

2.3.1 builds fine. I may have tried version 3, not sure now.
I will wait for the version 4 then.
Please feel free to close these bug reports then.

@evaleev evaleev closed this as completed Aug 15, 2018
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