ygrek / mldonkey

cross-platform multi-network p2p daemon (previously at http://mldonkey.sourceforge.net/)
Other
259 stars 46 forks source link

gcc 11 /CryptoPP.{cc,h} breakage, and workaround with CXXFLAGS=-std=c++14 #62

Closed HinTak closed 3 years ago

HinTak commented 3 years ago

gcc 11 defaults to c++17, which introduces std::byte, which causes a lot of breakage when compiling src/utils/lib/CryptoPP.hsrc/utils/lib/CryptoPP.{cc,h} .

Apparently the problem has been anticipated upstream, https://cryptopp.com/wiki/Std::byte , and somewhat address with cryptopp 6.x . (while mldonkey has 5. x according to the header). For the time being, doing CXXFLAGS=-std=c++14 works; but it is probably best upgrading...

HinTak commented 3 years ago

Since it already checks g++ version and try a few flags https://github.com/ygrek/mldonkey/blob/333868a12bb6cd25fed49391dd2c3a767741cb51/config/configure.in#L1180 , it may be a good idea to include ...std=c++14 in any case?

HinTak commented 3 years ago

Pull in https://github.com/ygrek/mldonkey/pull/63 as outlined

HinTak commented 3 years ago

63 merged. Can close.