Hi all,
This is fixed in the gem5 repo (i.e. "non-stable"), also for gcc >= 4.6.
Andreas
From: [email protected] [mailto:[email protected]] On
Behalf Of Andrew Cebulski
Sent: 02 May 2012 07:57
To: gem5 users mailing list
Subject: Re: [gem5-users] Build Error due to ptrdiff_t
If I recall correctly, I experienced this before on an older version of gem5
when using gcc 4.6.0 or higher (regardless of version of swig I think) on
Ubuntu. From the error output there, I see you're using gcc 4.6.0. Try
installing gcc 4.5.3, then changing your gcc path to it.
-Andrew
On Wed, May 2, 2012 at 2:38 AM, James Stadtmiller
<[email protected]<mailto:[email protected]>>
wrote:
Hi,
After following the steps here: http://gem5.org/BBench-gem5
I attempted
scons build/ARM_FS/m5.debug
(I've cloned the gem5-stable repository)
I get the following error:
[ CXX] ARM_FS/python/swig/stats_wrap.cc -> .do
build/ARM_FS/python/swig/stats_wrap.cc:2698:13: error: 'ptrdiff_t' does not name
a type
build/ARM_FS/python/swig/stats_wrap.cc:2724:21: error: expected ';' at end of
member declaration
build/ARM_FS/python/swig/stats_wrap.cc:2724:39: error: expected ')' before 'n'
build/ARM_FS/python/swig/stats_wrap.cc:2739:34: error: declaration of
'operator+=' as non-function
build/ARM_FS/python/swig/stats_wrap.cc:2739:30: error: expected ';' at end of
member declaration
build/ARM_FS/python/swig/stats_wrap.cc:2739:44: error: expected ')' before 'n'
build/ARM_FS/python/swig/stats_wrap.cc:2744:34: error: declaration of
'operator-=' as non-function
build/ARM_FS/python/swig/stats_wrap.cc:2744:30: error: expected ';' at end of
member declaration
build/ARM_FS/python/swig/stats_wrap.cc:2744:44: error: expected ')' before 'n'
build/ARM_FS/python/swig/stats_wrap.cc:2749:33: error: declaration of
'operator+' as non-function
build/ARM_FS/python/swig/stats_wrap.cc:2749:30: error: expected ';' at end of
member declaration
build/ARM_FS/python/swig/stats_wrap.cc:2749:43: error: expected ')' before 'n'
build/ARM_FS/python/swig/stats_wrap.cc:2754:33: error: declaration of
'operator-' as non-function
build/ARM_FS/python/swig/stats_wrap.cc:2754:30: error: expected ';' at end of
member declaration
build/ARM_FS/python/swig/stats_wrap.cc:2754:43: error: expected ')' before 'n'
build/ARM_FS/python/swig/stats_wrap.cc:2759:5: error: 'ptrdiff_t' does not name
a type
build/ARM_FS/python/swig/stats_wrap.cc:2915:23: error: 'SWIG_From_ptrdiff_t'
declared as an 'inline' variable
build/ARM_FS/python/swig/stats_wrap.cc:2915:23: error: 'ptrdiff_t' was not
declared in this scope
build/ARM_FS/python/swig/stats_wrap.cc:2915:23: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:2916:1: error: expected ',' or ';' before
'{' token
build/ARM_FS/python/swig/stats_wrap.cc:2968:39: error: 'ptrdiff_t' has not been
declared
build/ARM_FS/python/swig/stats_wrap.cc: In function 'int
SWIG_AsVal_ptrdiff_t(PyObject*, int*)':
build/ARM_FS/python/swig/stats_wrap.cc:2972:50: error: expected type-specifier
before 'ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:2972:50: error: expected '>' before
'ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:2972:50: error: expected '(' before
'ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:2972:50: error: 'ptrdiff_t' was not
declared in this scope
build/ARM_FS/python/swig/stats_wrap.cc:2972:50: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:2972:64: error: expected ')' before ';'
token
build/ARM_FS/python/swig/stats_wrap.cc: At global scope:
build/ARM_FS/python/swig/stats_wrap.cc:3620:15: error: 'swig::check_index'
declared as an 'inline' variable
build/ARM_FS/python/swig/stats_wrap.cc:3620:15: error: 'ptrdiff_t' was not
declared in this scope
build/ARM_FS/python/swig/stats_wrap.cc:3620:15: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
/usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++config.h:156:28: note:
'std::ptrdiff_t'
build/ARM_FS/python/swig/stats_wrap.cc:3620:35: error: expected
primary-expression before 'size'
build/ARM_FS/python/swig/stats_wrap.cc:3620:41: error: expected
primary-expression before 'bool'
build/ARM_FS/python/swig/stats_wrap.cc:3620:60: error: expression list treated
as compound expression in initializer [-fpermissive]
build/ARM_FS/python/swig/stats_wrap.cc:3620:62: error: expected ',' or ';'
before '{' token
build/ARM_FS/python/swig/stats_wrap.cc:17033:1: error: expected '}' at end of
input
scons: *** [build/ARM_FS/python/swig/stats_wrap.do] Error 1
scons: building terminated because of errors.
Searching on this error led me to
http://www.mail-archive.com/[email protected]/msg01648.html
which led me to try adding a '#include <cstddef>>' using ptrdiff_t to
src/python/m5/SimObject.py as specified by the changes checked into source
control.
This did not fix the error when trying to build.
I'm running Python 2.7.3 and swig 1.3.34
Any thoughts?
Thanks
_______________________________________________
gem5-users mailing list
[email protected]<mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you._______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users