ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

Build is broken on gcc 8.3.0 #345

Open acnologia000 opened 5 years ago

acnologia000 commented 5 years ago

In file included from /data/data/com.termux/files/home/crow/include/crow.h:8, from /data/data/com.termux/files/home/crow/examples/example_chat.cpp:1: /data/data/com.termux/files/home/crow/include/crow/json.h: In function ‘void crow::json::escape(const string&, std::__cxx11::string&)’: /data/data/com.termux/files/home/crow/include/crow/json.h:50:31: warning: comparison is always true due to limited range of data type [-Wtype-limits] if (0 <= c && c < 0x20) ~~^~~~ In file included from /data/data/com.termux/files/home/crow/include/crow.h:23, from /data/data/com.termux/files/home/crow/examples/example_chat.cpp:1: /data/data/com.termux/files/home/crow/include/crow/app.h: In instantiation of ‘typename std::result_of<decltype (& crow::Router::new_rule_tagged<Tag>)(crow::Router, std::__cxx11::basic_string<char>&&)>::type crow::Crow<Middlewares>::route(std::__cxx11::string&&) [with long long unsigned int Tag = 1; Middlewares = {}]’: /data/data/com.termux/files/home/crow/examples/example_chat.cpp:91:1: required from here /data/data/com.termux/files/home/crow/include/crow/app.h:63:14: internal compiler error: in write_expression, at cp/mangle.c:3050 auto route(std::string&& rule) ^~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://github.com/archlinuxarm/PKGBUILDs/issues> for instructions. make[2]: *** [examples/CMakeFiles/example_chat.dir/build.make:63: examples/CMakeFiles/example_chat.dir/example_chat.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:181: examples/CMakeFiles/example_chat.dir/all] Error 2 make: *** [Makefile:95: all] Error 2

Bu11etmagnet commented 5 years ago
internal compiler error: in write_expression, at cp/mangle.c:3050
 auto route(std::string&& rule)
 ^~~~~
 Please submit a full bug report, with preprocessed source if appropriate. See <https://github.com/archlinuxarm/PKGBUILDs/issues> for instructions.

This is a bug in the compiler. Report it to your distro.

acnologia000 commented 5 years ago

@Bu11etmagnet how can be arch and ubuntu be broken at same time ? for reassurance , i will run build on fedora

Bu11etmagnet commented 5 years ago

@acnologia000 they can be broken at the same time if they use GCC versions which contain the same bug.

FirstLoveLife commented 5 years ago

you should post a thread on gcc's bugzilla

moneroexamples commented 5 years ago

It was already fixed on gcc 9.2

For other gcc, check here: https://github.com/ipkn/crow/issues/303

Using clang would be easiest fix.