Discussion:
gem5 build problem
(too old to reply)
Tao Zhang
2013-03-21 02:52:38 UTC
Permalink
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
Steve Reinhardt
2013-03-21 03:09:07 UTC
Permalink
The quickest fix is to delete this line in src/SConscript:

swig_env.Append(CCFLAGS='-Werror')

Steve
Post by Tao Zhang
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*
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 <http://core_wrap.fo>]
Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/event_**wrap.cc: In function '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*
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 <http://event_wrap.fo>]
Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/range_**wrap.cc: In function '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 <http://range_wrap.fo>]
Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/debug_**wrap.cc: In function '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 <http://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
http://m5sim.org/cgi-bin/**mailman/listinfo/gem5-users<http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users>
Tao Zhang
2013-03-21 03:11:16 UTC
Permalink
Hi Steve,

Yes, I know this "tricky" solution. I just worried about there is any
issue for this compilation error. It looks weird.

Anyway, thanks a lot!

-Tao
Post by Steve Reinhardt
swig_env.Append(CCFLAGS='-Werror')
Steve
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*
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
<http://core_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/event_wrap.cc: In function '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*
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
<http://event_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/range_wrap.cc: In function '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
<http://range_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/debug_wrap.cc: In function '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
<http://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 <tel:814-863-1047>
(Mobile) 408-930-8930 <tel:408-930-8930>
Homepage: www.cse.psu.edu/~tzz106 <http://www.cse.psu.edu/%7Etzz106>
**********************************
("`-''-/").___..--''"`-._
`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
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Steve Reinhardt
2013-03-21 03:16:03 UTC
Permalink
The code is automatically generated by swig, so there's not much to be done
about cleaning it up. It's just a warning so there's no real harm.

Steve
Post by Tao Zhang
**
Hi Steve,
Yes, I know this "tricky" solution. I just worried about there is any
issue for this compilation error. It looks weird.
Anyway, thanks a lot!
-Tao
swig_env.Append(CCFLAGS='-Werror')
Steve
Post by Tao Zhang
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*
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*
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*
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*
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*
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 <http://www.cse.psu.edu/%7Etzz106>
**********************************
("`-''-/").___..--''"`-._
`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
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Rio Xiangyu Dong
2013-03-21 17:00:53 UTC
Permalink
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-***@gem5.org [mailto:gem5-users-***@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 <***@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
Tao Zhang
2013-03-21 17:24:16 UTC
Permalink
Hi Xiangyu,

As Matt said, my swig is too old (1.3.40). I just fixed the problem by
updating it to 2.0.9 (latest one).

Maybe the dependency on the official website should be updated
accordingly... http://www.gem5.org/Dependencies

-Tao
Post by Rio Xiangyu Dong
The root cause is that the new src/SConscript does not set up GCC
environment for version 4.4 correctly
# 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')*
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.
new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor')
swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized')
*Sent:* Wednesday, March 20, 2013 8:09 PM
*To:* gem5 users mailing list
*Subject:* Re: [gem5-users] gem5 build problem
swig_env.Append(CCFLAGS='-Werror')
Steve
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*
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
<http://core_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/event_wrap.cc: In function '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*
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
<http://event_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/range_wrap.cc: In function '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
<http://range_wrap.fo>] Error 1
cc1plus: warnings being treated as errors
build/ALPHA/python/swig/debug_wrap.cc: In function '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
<http://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 <tel:814-863-1047>
(Mobile) 408-930-8930 <tel:408-930-8930>
Homepage: www.cse.psu.edu/~tzz106 <http://www.cse.psu.edu/%7Etzz106>
**********************************
("`-''-/").___..--''"`-._
`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
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Steve Reinhardt
2013-03-21 17:29:39 UTC
Permalink
swig 1.3.40 actually works fine, the problem is that the SConscript is
irrationally terminating on an irrelevant compiler warning.

Steve
Post by Tao Zhang
**
Hi Xiangyu,
As Matt said, my swig is too old (1.3.40). I just fixed the problem by
updating it to 2.0.9 (latest one).
Maybe the dependency on the official website should be updated
accordingly... http://www.gem5.org/Dependencies
-Tao
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')****
** **
** **
** **
*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****
** **
** **
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*
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*
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*
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*
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*
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 <http://www.cse.psu.edu/%7Etzz106>
**********************************
("`-''-/").___..--''"`-._
`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
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users****
** **
_______________________________________________
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Rio Xiangyu Dong
2013-03-21 18:39:44 UTC
Permalink
Latest is not always the best. You can see swig 2.0.9 caused many issues in
gem5-dev discussion.



From: gem5-users-***@gem5.org [mailto:gem5-users-***@gem5.org] On
Behalf Of Tao Zhang
Sent: Thursday, March 21, 2013 10:24 AM
To: gem5 users mailing list
Subject: Re: [gem5-users] gem5 build problem



Hi Xiangyu,

As Matt said, my swig is too old (1.3.40). I just fixed the problem by
updating it to 2.0.9 (latest one).

Maybe the dependency on the official website should be updated
accordingly... http://www.gem5.org/Dependencies

-Tao

On 03/21/2013 01:00 PM, Rio Xiangyu Dong wrote:

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-***@gem5.org [mailto:gem5-users-***@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 <***@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 <http://www.cse.psu.edu/%7Etzz106>
**********************************

("`-''-/").___..--''"`-._
`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
Continue reading on narkive:
Loading...