tplgy / bonefish

C++ WAMP application router that enables building applications from loosely-coupled components.
Apache License 2.0
55 stars 33 forks source link

Compile environment #1

Closed allspace closed 9 years ago

allspace commented 9 years ago

This is just a question. As there is no discussion group, I have to post it here.

I found if remove "-fdiagnostics-color=always", then the code can be compiled using gcc 4.8.

My question is, do you really need a very recent compiler? Or you have used any c++11 feature?

Most recent compiler means we have to ship a libstdc++ library along with bonefish binary.

jpetso commented 9 years ago

Bonefish uses C++11 extensively, however we have built it using GCC 4.8 ourselves until pretty recently. If it's just the color option then we can find a way around that for sure.

The most annoying thing about GCC 4.8 is that the libstdc++ that it ships with doesn't yet support std::to_string() for numbers (one of the last C++11 features it doesn't support), so one has to use boost::lexical_cast instead. We ran into this issue several times but I guess bonefish doesn't use std::to_string() right now so we should be okay.

davidchappelle commented 9 years ago

@allspace If you would like to submit a patch for working around the compiler flag that would be great as I am sure that others will encounter the same issue.

jpetso commented 9 years ago

A CMake check like in http://stackoverflow.com/questions/14933172/how-can-i-add-a-minimum-compiler-version-requisite might be a way to keep color diagnostics for newer GCCs while disabling the flag for old ones.

jpetso commented 9 years ago

@allspace, please try if my pull request #3 works for your build environment. I only have GCC 4.9 around so I can't check if the check actually works as intended.

allspace commented 9 years ago

Confirm the latest source code can be compiled using gcc 4.8.