to solve the problems such as under Ubuntu:
Python/dynload_shlib.c:94: undefined reference to `dlsym'
dynload_shlib.c:130: undefined reference to `dlopen'
Python/dynload_shlib.c:141: undefined reference to `dlsym'
Python/dynload_shlib.c:133: undefined reference to `dlerror'
To solve this linking problem, run 'python-config -libs', then you got the dynamic library list. Find where these libs are, and add their paths to LD_LIBRARY_PATH before 'scons ./build/ARM/gem5.opt'
Finally, it works!