Discussion:
[gem5-users] Error when building gem5
Tariq Azmy
2018-06-19 17:44:47 UTC
Permalink
Hi,

I got a fresh new gem5 from google repo (
https://gem5.googlesource.com/public/gem5) and built the X86 with scons.
But there's an error from xbar:

In file included from build/X86/mem/xbar.hh:57:0,
from build/X86/mem/noncoherent_xbar.hh:54,
from build/X86/mem/noncoherent_xbar.cc:50:
build/X86/base/addr_range_map.hh:221:35: error: 'std::function' has not
been declared
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^~~~~~~~
build/X86/base/addr_range_map.hh:221:43: error: expected ',' or '...'
before '<' token
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^
scons: *** [build/X86/mem/noncoherent_xbar.o] Error 1
scons: building terminated because of errors.

Hope it can get fixed.

Thanks
Jason Lowe-Power
2018-06-19 18:01:35 UTC
Permalink
HI Tariq,

You can fix it and submit a patch to gerrit :). Likely, you just need
#include <functional> at the top of addr_range_map.hh.

See https://gem5.googlesource.com/public/gem5/+/master/CONTRIBUTING.md for
more details.

Cheers,
Jason
Post by Tariq Azmy
Hi,
I got a fresh new gem5 from google repo (
https://gem5.googlesource.com/public/gem5) and built the X86 with scons.
In file included from build/X86/mem/xbar.hh:57:0,
from build/X86/mem/noncoherent_xbar.hh:54,
build/X86/base/addr_range_map.hh:221:35: error: 'std::function' has not
been declared
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^~~~~~~~
build/X86/base/addr_range_map.hh:221:43: error: expected ',' or '...'
before '<' token
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^
scons: *** [build/X86/mem/noncoherent_xbar.o] Error 1
scons: building terminated because of errors.
Hope it can get fixed.
Thanks
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Jason Lowe-Power
2018-06-20 18:35:08 UTC
Permalink
Hi Tariq,

Thanks for letting us know about this issue. Nikos just merged a change
that fixes it: https://gem5-review.googlesource.com/c/public/gem5/+/11429

Cheers,
Jason
Post by Jason Lowe-Power
HI Tariq,
You can fix it and submit a patch to gerrit :). Likely, you just need
#include <functional> at the top of addr_range_map.hh.
See https://gem5.googlesource.com/public/gem5/+/master/CONTRIBUTING.md
for more details.
Cheers,
Jason
Post by Tariq Azmy
Hi,
I got a fresh new gem5 from google repo (
https://gem5.googlesource.com/public/gem5) and built the X86 with scons.
In file included from build/X86/mem/xbar.hh:57:0,
from build/X86/mem/noncoherent_xbar.hh:54,
build/X86/base/addr_range_map.hh:221:35: error: 'std::function' has not
been declared
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^~~~~~~~
build/X86/base/addr_range_map.hh:221:43: error: expected ',' or '...'
before '<' token
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^
scons: *** [build/X86/mem/noncoherent_xbar.o] Error 1
scons: building terminated because of errors.
Hope it can get fixed.
Thanks
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Tariq Azmy
2018-06-21 15:50:48 UTC
Permalink
Hi Jason,

No problem. I've never contributed patches to gerrit before, maybe I'll try
it next time :) Glad that it has been fixed. Thanks for the update.
Post by Jason Lowe-Power
Hi Tariq,
Thanks for letting us know about this issue. Nikos just merged a change
that fixes it: https://gem5-review.googlesource.com/c/public/gem5/+/11429
Cheers,
Jason
Post by Jason Lowe-Power
HI Tariq,
You can fix it and submit a patch to gerrit :). Likely, you just need
#include <functional> at the top of addr_range_map.hh.
See https://gem5.googlesource.com/public/gem5/+/master/CONTRIBUTING.md
for more details.
Cheers,
Jason
Hi,
I got a fresh new gem5 from google repo (https://gem5.googlesource.
com/public/gem5) and built the X86 with scons. But there's an error
In file included from build/X86/mem/xbar.hh:57:0,
from build/X86/mem/noncoherent_xbar.hh:54,
build/X86/base/addr_range_map.hh:221:35: error: 'std::function' has not
been declared
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^~~~~~~~
build/X86/base/addr_range_map.hh:221:43: error: expected ',' or '...'
before '<' token
find(const AddrRange &r, std::function<bool(const AddrRange)> cond)
const
^
scons: *** [build/X86/mem/noncoherent_xbar.o] Error 1
scons: building terminated because of errors.
Hope it can get fixed.
Thanks
_______________________________________________
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
Loading...