compilation (svn) throws errors on CentOS 5.6

Noris Datum norisdata at gmail.com
Fri May 6 04:45:29 PDT 2011


Hi Juli,

I tried compiling wanproxy (svn788) on an up-to-date CentOS 5.6 x86_64  
constituting the build environment below;

Linux 2.6.18-238.9.1.el5 #1 2011 x86_64 x86_64 x86_64 GNU/Linux

gcc-c++-4.1.2-50.el5 libgcc-4.1.2-50.el5


It throws errors when compilation reaches;

g++ -I../.. -DNDEBUG=1 -Wno-deprecated -include common/common.h -pipe -O2  
-W -Wall -Werror -Wno-system-headers -Wno-uninitialized -Wpointer-arith  
-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align  
-Wunused-parameter -Wchar-subscripts -Wreorder -c -o  
wanproxy_config_type_codec.o wanproxy_config_type_codec.cc

and errors are;

cc1plus: warnings being treated as errors
../../config/config_exporter.h:8: warning: ‘class ConfigExporter’ has  
virtual functions but non-virtual destructor
.
.
(6 times the same error for rest of the compilation chain)
.
.
make[1]: *** [wanproxy_config_type_codec.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1plus: warnings being treated as errors
../../config/config_exporter.h:8: warning: ‘class ConfigExporter’ has  
virtual functions but non-virtual destructor
make[1]: *** [wanproxy_config_class_interface.o] Error 1
make[1]: *** [wanproxy_config_class_peer.o] Error 1
cc1plus: warnings being treated as errors
../../config/config_exporter.h:8: warning: ‘class ConfigExporter’ has  
virtual functions but non-virtual destructor
make[1]: *** [wanproxy_config_class_monitor.o] Error 1
make[1]: *** [wanproxy_config_class_proxy_socks.o] Error 1
make[1]: *** [wanproxy_config_class_proxy.o] Error 1
make[1]: *** [wanproxy_config_class_codec.o] Error 1
make[1]: *** [wanproxy_config.o] Error 1
make[1]: Leaving directory `/root/wp778/programs/wanproxy'
make: *** [all] Error 2


So I installed a minimal F14 x86_64 from scratch just to see it my  
previous build environment differed somehow but everything compiled well  
on F14 upon providing dependent packages, namely libuuid-devel for uuid.h  
and zlib-devel for zlib.h (On CentOS uuid.h is provided by e2fsprogs-devel)

Obviously commenting out -Werror from ../common/program.mk:64 lets  
compilation continue and wanproxy binary seems operational (though I have  
not tested it extensively). Once again I presume the problem is related to  
gcc version on Centos but wanted to let you and the list know about the  
situation.


By the way WANProxy 0.7.2 from releases/ builds happily w/o throwing any  
errors or warnings on the same CentOS system (which also bears  
CFLAGS+=-Werror in ../common/program.mk). And please also note that I only  
compile sources under programs/ path.


cheers,
noris



More information about the wanproxy mailing list