s5z / zsim

A fast and scalable x86-64 multicore simulator
GNU General Public License v2.0
337 stars 186 forks source link

Error while running ./build/opt/zsim tests/simple.cfg #235

Open vishnu3741 opened 4 years ago

vishnu3741 commented 4 years ago

scons -j16 is running fine but when I run ./build/opt/zsim tests/simple.cfg I am getting the following error

E: E: Unable to load /home/vishnu/Desktop/simulator/zsim/build/opt/libzsim.so: /home/vishnu/Desktop/simulator/zsim/build/opt/libzsim.so: undefined symbol: _ZN7DRAMSim23getMemorySystemInstanceERKSsS1_S1_S1_jPSs Unable to load /home/vishnu/Desktop/simulator/zsim/build/opt/libzsim.so: /home/vishnu/Desktop/simulator/zsim/build/opt/libzsim.so: undefined symbol: _ZN7DRAMSim23getMemorySystemInstanceERKSsS1_S1_S1_jPSs

I am not able to find a way to get around this issue and any advice would be helpful. Thank you.

my569 commented 4 years ago

The reason for the problem is the mismatch of libzsim.so's c++ abi and libdramsim.so's c++ abi. You can check it with nm, c++filt and other tools. You you can refer @bakhshalipour's answer in #174 Finally, i recompile dramsim with flags -DBIGARRAY_MULTIPLIER=0;

dramsim's Makefile
#CXXFLAGS=-DNO_STORAGE -Wall -DDEBUG_BUILD 
CXXFLAGS=-DNO_STORAGE -Wall -DDEBUG_BUILD  -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=2
zsim's SConstruct 
env["CPPFLAGS"] += " -MMD -DBIGARRAY_MULTIPLIER=1 -DUSING_XED -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=2"