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

Fails to Compile on GCC6 #1

Open
SDNick484 opened this issue Feb 16, 2017 · 1 comment
Open

Fails to Compile on GCC6 #1

SDNick484 opened this issue Feb 16, 2017 · 1 comment

Comments

@SDNick484
Copy link

When trying to compile with GCC 6.1.0 on Gentoo, I run into the following error:

Scanning dependencies of target harmony
[ 20%] Building CXX object libharmony/CMakeFiles/harmony.dir/csocket.cpp.o
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/bits/basic_string.h:5402:0,
from /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/string:52,
from /home/neandrad/harmony/libharmony/csocket.hpp:15,
from /home/neandrad/harmony/libharmony/csocket.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/ext/string_conversions.h: In function ‘_Ret __gnu_cxx::__stoa(_TRet ()(const _CharT, _CharT**, _Base ...), const char*, const _CharT*, std::size_t*, _Base ...)’:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include/g++-v6/ext/string_conversions.h:72:25: error: ‘ERANGE’ was not declared in this scope
else if (errno == ERANGE
^~~~~~
make[2]: *** [libharmony/CMakeFiles/harmony.dir/build.make:63: libharmony/CMakeFiles/harmony.dir/csocket.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: libharmony/CMakeFiles/harmony.dir/all] Error 2

Not a major issue as compiling works fine with GCC 5.4.0, but just wanted to raise awareness in case you're interested in updating the code.

@yuri-sevatz
Copy link
Owner

Looks like #include is exploding.

I don't think this is anything specific to this library just because that header is supposed to have no external dependencies.

It may have something to do with CMake setting up the include path in a way that GCC 6.1 doesn't expect. I can't speak from experience there, though some googling seems to hint that this is probably closer to what's going on vs anything about including std::string.

(You can probably test that with a cmake sample "Hello World", and if that doesn't reproduce the issue, try linking Qt with CMake and seeing if the problem starts)

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