Summary: | sci-mathematics/octave-4.4.1 - liboctave/util/lo-utils.cc: In function 'double octave_read_fp_value(std::istream&)': liboctave/util/lo-utils.cc:264:13: error: 'streampos' is not a member of 'std::ios' {aka 'std::basic_ios<char>'} | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Helmut Jarausch <jarausch> |
Component: | Current packages | Assignee: | Gentoo Science Mathematics related packages <sci-mathematics> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | hydrapolic, rossi.f |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Helmut Jarausch
2019-01-14 14:55:23 UTC
Are you hitting an error during compilation? Please attach the full build log and the output of emerge --info. (In reply to Tomáš Mózes from comment #1) > Are you hitting an error during compilation? Please attach the full build > log and the output of emerge --info. I get liboctave/util/lo-utils.cc: In function 'double octave_read_fp_value(std::istream&)': liboctave/util/lo-utils.cc:264:13: error: 'streampos' is not a member of 'std::ios' {aka 'std::basic_ios<char>'} std::ios::streampos pos = is.tellg (); This error is only flagged if one uses -std=c++17 as I do. You can try to compile #include <fstream> int main() { std::ifstream is("T.c"); // std::streampos pos = is.tellg (); //OK std::ios::streampos pos = is.tellg (); // NOT OK } with g++ -c -std=c++17 According to http://www.cplusplus.com/reference/ios/streampos/ streampos is now a member of the namespace std but not of std::ios any more. It is safe to use std::streampos even if -std=c++14. Thanks for investigating about the root cause of the problem. IMHO the problem is in your CXXFLAGS, why are you specifying globally -std=c++17? Usually if a package needs particular flags like that than they are specified in the package build configuration system. Until the minimum required c++ standard version used by gcc is 2017 I am not sure if it makes sense to add a specific patch to portage, currently gcc-8 defines $ g++ -dM -E -x c++ /dev/null | grep -F __cplusplus #define __cplusplus 201402L The package maintainer should choose about fixing the issue or not. Anyway I have sent upstream a patch as in the code they are already using std::streampos everywhere else, here is reference: https://savannah.gnu.org/patch/index.php?9782 Thank you Helmut and Fabio! |