boegel / MICA

a Pin tool for collecting microarchitecture-independent workload characteristics
http://users.ugent.be/~kehoste/ELIS/MICA
Other
59 stars 34 forks source link

Fail to build MICA #9

Closed twang15 closed 6 years ago

twang15 commented 6 years ago

I download Pin-2.10-45467 (https://drive.google.com/file/d/0B-AkmAlNRsymNVl1RndzbFVpZEU/view?usp=sharing), and follow instructions to build mica.

However, make fails with the following messages:

Makefile:7: ../Config/makefile.config: No such file or directory Makefile:8: /Config/makefile.default.rules: No such file or directory make: *** No rule to make target `/Config/makefile.default.rules'. Stop.

The reason is that mica's Makefile tries to find makefile.config and makefile.default.rules under ../Config, which does not exist.

twang15 commented 6 years ago

The version of MICA is v1.0 in this repository, not the one (mica-v0.4) in the downloaded Pin-2.10-45467.

twang15 commented 6 years ago

Apparently, the documentation should be updated along with the code.

To build MICA 1.0, we need Pin3 from Intel, https://software.intel.com/en-us/articles/pin-a-binary-instrumentation-tool-downloads

After download Pin3, put mica-1.0 under source/tools, and then build it.

twang15 commented 6 years ago

With GCC, the build would fail with -Werror flags, which can be removed it from source/tool/Config/makefile.unix.config, line 109

twang15 commented 6 years ago

To run MICA with ls (replace it with other app of your interest), do the following:

  1. cp mica.conf.example mica.conf
  2. add extras/xed-intel64/lib/, intel64/runtime/pincrt/, intel64/lib-ext/ into LD_LIBRARY_PATH
  3. cd source/tools/mica_v1.0/
  4. cp obj-intel64/mica.so ../
  5. ../../../pin -t mica.so -- ls -l
amirjamez commented 6 years ago

Thanks, @twang15 for mentioning this. I confirm this is the correct way.