3 ms·
Edit Makefile.common and remove -Werror from there. This is a widespread mistake, using -Werror unconditionally. This flag forbids all warning messages from th
by j1elo 8y ago
Edit Makefile.common and remove -Werror from there.
This is a widespread mistake, using -Werror unconditionally. This flag forbids all warning messages from the compiler, no matter how superficial the actual issue is. -Werror is a very good tool to use during development, i.e. for private (Debug) builds, but it should be disabled for publicly released code (aka Release), or at least a shortcut should always be provided for people who are not interested in editing the code, only in compiling it (e.g. maintainers).
New warnings are added every day so to speak, so with -Werror you never know if your code will stop compiling any time soon. But sadly not many people account for that in their Makefiles.
- morganvachon 8y agoGotcha, thanks! I'll give it a whirl. +++ And it worked! Thanks for that! I'll file that in my notes for building on Ubuntu and derivatives for the future.
- j1elo 8y agoYou'd better write it in the compiler-specific notes! ;-) As I said, new warnings are added to each new version of the compiler, that's why -Werror is dangerous for code that is intended to keep compiling without changes. The unused-result warning was added in GCC 4.5, I bet in some of those older distros you can try and it will compile just fine, because they come with GCC 4.4 or older... Likewise, probably the author used an sufficiently old GCC version when this code was written.
- morganvachon 8y agoGot it. As I said I'm certainly not a developer but you've given me a lot of great info here. I do a good bit of compiling from source on Slackware for packages not available in the official or third party repos, and I've rarely had build issues similar to this one. Now I know one more thing to look for. Thanks again!