I'm trying to upgrade to 3.2.0 from 3.1.3, but the build fails in md5.cpp with
the following error:
g++ -c -o build/gcc-O3/core/md5.o -g -Werror -funsigned-char -W -Wall
-Wno-unused-result -O3 -Icore core/md5.cpp
core/md5.cpp: In member function ‘EString MD5::hash()’:
core/md5.cpp:152: error: #pragma GCC diagnostic not allowed inside functions
core/md5.cpp:153: error: #pragma GCC diagnostic not allowed inside functions
core/md5.cpp:157: error: #pragma GCC diagnostic not allowed inside functions
cc1plus: warnings being treated as errors
At global scope:
cc1plus: error: unrecognized command line option "-Wno-unused-result"
make: *** [compile] Error 1
Both 'make install' and 'jam install' fail in the same way, so as far as I can understand this is a g++ issue rather
than a make/jam issue.
I'm on CentOS 6.5 x64, 'g++ --version' reports:
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
From a quick Google search it looks like the '#pragma diagnostic' is supported on GCC >= 4.6. I've tried removing
'-Werror' from the Jamfile but it didn't solve the issue.
Is there a way of compile 3.2.0 with a gcc 4.4 or my only option is installing
a more recent version of gcc?