-
Notifications
You must be signed in to change notification settings - Fork 477
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
Avoid using the hard-coded /usr/share/pcm/ path #480
Comments
thanks for reporting this issue. We had seen a similar one (introduced in the recent version) and which will be fixed in the next release. Could you please try the previous release: https://github.com/intel/pcm/releases/tag/202210 |
It works fine, thanks for quick reply |
another problem, pcm-iio running fine when executed from the build directory, but not when running from /usr/share/sbin/, seems that install script dont copy the opCode-* to /usr/share/pcm/, they're present in /usr/local/share/pcm but pcm-iio only looks for /usr/share/pcm. |
The code looks in the current directory first, fn is only a file name, then in /usr/share/pcm/. This should be made configurable based on cmake parameters or enforced by the cmake magic to always install in this /usr/share/pcm directory. User should have last say so I think it should become configurable. Perhaps @markovamaria can make this change? |
This might be tricky because of rpm build process that need a custom ${CMAKE_INSTALL_PREFIX} during the rpm build process. For example: https://build.opensuse.org/package/live_build_log/home:opcm/OPCM/openSUSE_Leap_15.1/x86_64 When the rpm is installed pcm files should end up in /usr/share/pcm . For rpm the ${CMAKE_INSTALL_PREFIX} and the final location differ... |
Yes for this there is BUILDROOT, cmake has support for this and the rpm need to mention that it want to use BUILDROOT during building. |
good to know. I would like to see how this works. |
https://stackoverflow.com/questions/8084796/what-actually-is-rpm-build-root The first answer explains it pretty well what the purpose of the rpm build root is. cmake also supports DESTDIR make install DESTDIR=/my/special/buildroot/ and now everything will be installed using that as base root. The opCodeXYZ.txt fille will end up under /my/special/buildroot/usr/share/pcm/opCodeXYZ.txt. Buildroot set to this path in the SPEC file will cause this path to be added as base path for all files directives. A normal installation can use / for DESTDIR and it all ends up where it was meant to go. A BuildRoot like this "BuildRoot: %{_tmppath}/%{name}-buildroot-%{version}-%{release}" as proposed by MarkHu is good practise. It might be that SUSE, RedHat or Fedora defines its own BuildRoot in the default rpmrc file but the SPEC file overrides it anyway and does no harm, iirc it is cleaned up anyway after building. |
ok. Then we could pass ${CMAKE_INSTALL_PREFIX} to cpp with -D parameter and use it instead of the hard-coded path prefix and use make install DESTDIR during the rpm build. |
When running pcm-iio for monitoring PCIe bandwidth, tool says that detected IceLake-SP processors but doesn't have proper event file :
building from master branch, also copied opCode-106 to /usr/local/share/pcm but problem still exists.
some basic tools such pcm, pcm-memory, pcm-numa, pcm-pcie are working, but pcm-iio doesn't work.
The text was updated successfully, but these errors were encountered: