plasma-umass / coz

Coz: Causal Profiling
Other
4.03k stars 160 forks source link

Build broken for benchmarks? #186

Open chadbrewbaker opened 2 years ago

chadbrewbaker commented 2 years ago

Am I doing something stupid here? The docs on the benchmarks seem to refer to the old makefiles.

cd coz/benchmarks
mkdir build
cd build
cmake  -Wno-dev  .. 
#Scanning dependencies of target histogram
#[  3%] Building C object histogram/CMakeFiles/histogram.dir/histogram-pthread.o
#[  6%] Linking C executable histogram
#/usr/bin/ld: cannot find -lcoz-instrumentation
YoonaKim95 commented 2 years ago

I am getting exactly the same error message saying "cannot find -lcoz-instrumentation"

Anyone can help?

ionuttamas commented 2 years ago

Having similar issues. Can someone pretty please update the readme? @emeryberger

ionuttamas commented 2 years ago

@chadbrewbaker checking out the repo at this state works fine: https://github.com/plasma-umass/coz/tree/c9af2bcc172ee4af66082c1ea9ae75a19d2cd0f6

emeryberger commented 2 years ago

That's useful information! I will look into this.

ionuttamas commented 2 years ago

@chadbrewbaker I managed to fully build & successfully an older version of coz: Steps:

  1. I'm using Linux Ubuntu Server 20.04 (Focal Fossa): https://cloud-images.ubuntu.com/focal/ (created a VM from scratch)
  2. Followed the instructions from https://github.com/plasma-umass/coz/tree/381cbe57f2b47e8a8ca8a010978a09343246a4ec => but after checking out the repo and doing cd coz, I did a 'git checkout 381cbe57f2b47e8a8ca8a010978a09343246a4ec' to be in this exact state
  3. Did make to compile coz
  4. Added libcoz to PATH

After these instructions, I was able to make bench and run coz commands on a particular program and get a valid profile.coz :).

@emeryberger newer versions of the repo don't seem to work out of the box (i.e. having a simple program e.g. toy to be "profile-able") - maybe is a problem with newer versions of Ubuntu. https://github.com/plasma-umass/coz/issues/107 this conversation also helped.

frithrah commented 2 years ago

I can help. The reason for the build errors is due to running cmake inside the benchmark directory - that's why it can't find the coz-instrumentation target.

The answer is to configure from the root directory using the main CMakeLists like this:

cmake -B build -DBUILD_BENCHMARKS=on -DCMAKE_BUILD_TYPE=Debug
cd build
make

That will make the lib and all the benchmark targets.