The root cause is that the new src/SConscript does not set up GCC environment for version 4.4 correctly
if env['GCC']: # Depending on the SWIG version, we also need to supress # warnings about missing field initializers. swig_env.Append(CCFLAGS='-Wno-missing-field-initializers') # suppress warning from GCC 4.4 if compareVersions(env['GCC_VERSION'], '4.4') >= 0: swig_env.Append(CCFLAGS='-Wno-uninitialized') if compareVersions(env['GCC_VERSION'], '4.6') >= 0: swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable') # If gcc supports it, also warn for deletion of derived # classes with non-virtual desctructors. For gcc >= 4.7 we # also have to disable warnings about the SWIG code having # potentially uninitialized variables. if compareVersions(env['GCC_VERSION'], '4.7') >= 0: new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor') swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized') From: gem5-users-boun...@gem5.org [mailto:gem5-users-boun...@gem5.org] On Behalf Of Steve Reinhardt Sent: Wednesday, March 20, 2013 8:09 PM To: gem5 users mailing list Subject: Re: [gem5-users] gem5 build problem The quickest fix is to delete this line in src/SConscript: swig_env.Append(CCFLAGS='-Werror') Steve On Wed, Mar 20, 2013 at 7:52 PM, Tao Zhang <tao.zhang.0...@gmail.com> wrote: Dear all, When I built the latest gem5, the following compilation erros came up. More interesting, it only happens when buiding gem5.fast. gem5.debug can still be built successfully. Any clue to fix it? (swig--1.3.40, scons--2.1.0, python--2.6.6, gcc--4.4.5) ============================================================ cc1plus: warnings being treated as errors build/ALPHA/python/swig/core_wrap.cc: In function 'PyObject* _wrap_new_Cycles(PyObject*, PyObject*)': build/ALPHA/python/swig/core_wrap.cc:3323: error: 'argv[0]' may be used uninitialized in this function scons: *** [build/ALPHA/python/swig/core_wrap.fo] Error 1 cc1plus: warnings being treated as errors build/ALPHA/python/swig/event_wrap.cc: In function 'PyObject* _wrap_new_Cycles(PyObject*, PyObject*)': build/ALPHA/python/swig/event_wrap.cc:3380: error: 'argv[0]' may be used uninitialized in this function build/ALPHA/python/swig/event_wrap.cc: In function 'PyObject* _wrap_simulate(PyObject*, PyObject*)': build/ALPHA/python/swig/event_wrap.cc:4590: error: 'argv[0]' may be used uninitialized in this function scons: *** [build/ALPHA/python/swig/event_wrap.fo] Error 1 cc1plus: warnings being treated as errors build/ALPHA/python/swig/range_wrap.cc: In function 'PyObject* _wrap_new_Cycles(PyObject*, PyObject*)': build/ALPHA/python/swig/range_wrap.cc:3120: error: 'argv[0]' may be used uninitialized in this function scons: *** [build/ALPHA/python/swig/range_wrap.fo] Error 1 cc1plus: warnings being treated as errors build/ALPHA/python/swig/debug_wrap.cc: In function 'PyObject* _wrap_new_Cycles(PyObject*, PyObject*)': build/ALPHA/python/swig/debug_wrap.cc:10624: error: 'argv[0]' may be used uninitialized in this function scons: *** [build/ALPHA/python/swig/debug_wrap.fo] Error 1 scons: building terminated because of errors. ============================================================ Regards, -- ********************************** Tao Zhang Department of Computer Science& Engineering, College of Engineering, Pennsylvania State University 354B IST Building University Park, PA 16802 (Office) 814-863-1047 (Mobile) 408-930-8930 Homepage: www.cse.psu.edu/~tzz106 ********************************** ("`-''-/").___..--''"`-._ `6_ 6 ) `-. ( ).`-.__.`) GO LIONS!!! (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' ,' (il),-'' (li),' ((!.-' Happiness is like a butterfly which, when pursued, is always beyond your grasp, but if you will sit down quietly, may alight upon you. --- Nathaniel Hawthorne _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users