Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coz install fails on CentOS8 Stream #203

Open
michaelcordero opened this issue Oct 8, 2022 · 6 comments
Open

Coz install fails on CentOS8 Stream #203

michaelcordero opened this issue Oct 8, 2022 · 6 comments

Comments

@michaelcordero
Copy link

Building from source:

Tried to run the command in the benchmarks directory:
cmake . && make && cd ../..

and got:

fatal error: coz.h: No such file or directory
#include "coz.h"

@emeryberger
Copy link
Member

Unfortunately, you can't build Coz that way. Please follow the instructions given here:

https://github.com/plasma-umass/coz#building-coz-from-source

I just followed them on Ubuntu and everything works as anticipated.

@emeryberger
Copy link
Member

Full instructions copied here:

Building Coz From Source

To build Coz from source, you will need:

  • A copy of the source code for this project
  • A compiler with C++0x support (clang++ or g++)
  • A Python interpreter (Python 3.x is required)
  • OPTIONAL: for building the profiler viewer, you need NodeJS and npm -- sudo apt-get install nodejs npm

Once you have all dependencies in place, build Coz with CMake. On Debian-based distributions, the following commands should take care of the entire process:

sudo apt-get install build-essential cmake docutils-common git python3 pkg-config
git clone https://github.com/antoyo/libelfin && cd libelfin && make && sudo make install && cd ..
git clone https://github.com/plasma-umass/coz && cd coz && cmake . && make && sudo make install && cd ..

Next, you need to change the "perf_event_paranoia" level so Coz can run.

sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid'

Now you can test Coz. Build the benchmark suite and run one of the benchmarks (the SQLite3 benchmark takes a while to build).

sudo apt-get install libbz2-dev libsqlite3-dev
cd coz/benchmarks && cmake . && make && cd ../..
coz run --- ./coz/benchmarks/toy/toy

Finally, use the Coz viewer to see the results. This command will open up a browser tab, from which you will need to load the file profile.coz.

coz plot

@michaelcordero
Copy link
Author

michaelcordero commented Oct 8, 2022

How can you close this as completed? Those instructions maybe work on Debian-based distributions, not on Fedora/RHEL/CentOS. If Coz does not support the other family of Linux distros that's fine. (I tried to translate them to dnf install btw, but to no avail. The code snippet I listed is how far I got in the installation. I of course ran the previous commands.)

@emeryberger
Copy link
Member

I apparently misread your report as just having run cmake . && make && cd ../..; apologies. I'll see if I can install another distro locally to test.

@emeryberger emeryberger reopened this Oct 8, 2022
@josephnicholas
Copy link

Any updates on this? I'm also trying to build with CentOS Stream 8.

@Zannick
Copy link

Zannick commented Mar 3, 2023

I'm trying to install on Fedora. libelfin installed just fine through make && sudo make install but cmake . fails for coz afterward with the below error (and pkg-config does not find libelf++), though I can verify that /usr/local/lib/libelf++.so exists. Is there a step missing?

$ cmake . && make
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (libelfin).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  cmake/Findlibelfin.cmake:1 (include)
  CMakeLists.txt:13 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'libelf++'
--   Package 'libelf++', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:607 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:829 (_pkg_check_modules_internal)
  cmake/Findlibelfin.cmake:2 (pkg_check_modules)
  CMakeLists.txt:13 (find_package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants