You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.
Seems like bitshares/libraries/fc/src/io/sstream.cpp cannot be compiled with gcc-5.1
[ 26%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o
In file included from /home/alexxy/Src/bitshares/libraries/fc/src/io/sstream.cpp:2:0:
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp: In instantiation of 'void fc::check_size() [with long unsigned int RequiredSize = 392ul; long unsigned int ProvidedSize = 368ul]':
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp:63:43: required from 'fc::fwd<T, S, Align>::fwd(U&&) [with U = std::__cxx11::basic_string&; T = fc::stringstream::impl; unsigned int S = 368u; Align = double]'
/home/alexxy/Src/bitshares/libraries/fc/src/io/sstream.cpp:24:8: required from here
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp:58:25: error: static assertion failed: Failed to reserve enough space in fc::fwd<T,S>
void check_size() { static_assert( (ProvidedSize >= RequiredSize), "Failed to reserve enough space in fc::fwd<T,S>" ); }
^
libraries/fc/CMakeFiles/fc.dir/build.make:583: recipe for target 'libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o' failed
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o] Error 1
CMakeFiles/Makefile2:263: recipe for target 'libraries/fc/CMakeFiles/fc.dir/all' failed
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
The error just means you need to increase the size allocated for the stream under gcc-5.1 in the fc header that wraps the stream class. Fc "hardcodes" the sizes of some objects (it's done to speed up compilation, don't ask...) and apparently the size has gone up under gcc-5.1. In this case, you need to change the allocated size from 368 to 392, from looking at the error message.
There's no way to remove it, it's a tradeoff BM chose to potentially speed up compilation time. Well, I take that back, we could just use the regular stream classes instead of the fc ones. It's the way I would have chosen, but I don't think it's worth the headache to debate it and make the necessary changes. This technique is used in a number of places for boost objects, for example.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi all!
Seems like bitshares/libraries/fc/src/io/sstream.cpp cannot be compiled with gcc-5.1
[ 26%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o
In file included from /home/alexxy/Src/bitshares/libraries/fc/src/io/sstream.cpp:2:0:
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp: In instantiation of 'void fc::check_size() [with long unsigned int RequiredSize = 392ul; long unsigned int ProvidedSize = 368ul]':
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp:63:43: required from 'fc::fwd<T, S, Align>::fwd(U&&) [with U = std::__cxx11::basic_string&; T = fc::stringstream::impl; unsigned int S = 368u; Align = double]'
/home/alexxy/Src/bitshares/libraries/fc/src/io/sstream.cpp:24:8: required from here
/home/alexxy/Src/bitshares/libraries/fc/include/fc/fwd_impl.hpp:58:25: error: static assertion failed: Failed to reserve enough space in fc::fwd<T,S>
void check_size() { static_assert( (ProvidedSize >= RequiredSize), "Failed to reserve enough space in fc::fwd<T,S>" ); }
^
libraries/fc/CMakeFiles/fc.dir/build.make:583: recipe for target 'libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o' failed
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o] Error 1
CMakeFiles/Makefile2:263: recipe for target 'libraries/fc/CMakeFiles/fc.dir/all' failed
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: