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

Python bindings not working #94

Open
bcm0 opened this issue Oct 9, 2023 · 2 comments
Open

Python bindings not working #94

bcm0 opened this issue Oct 9, 2023 · 2 comments

Comments

@bcm0
Copy link

bcm0 commented Oct 9, 2023

I like to give hawktracer a try but how do I install python bindings? cmake builds the bindings but it can't find the python interpreter. Setting PYTHONPATH fails and I get ModuleNotFoundError: No module named 'hawktracer'

@loganek
Copy link
Member

loganek commented Oct 12, 2023

Hi @bcm0, thanks a lot for your interest. Could you please provide a bit more details about how do you compile/attempt to run the application and what are the errors? That'd help us debug the problem and provide a solution. Many thanks.

@bcm0
Copy link
Author

bcm0 commented Oct 12, 2023

Thanks a lot for your reply. How do you run the python bindings? What are the next steps?

$ mkdir build 
$ cd build
$ cmake -DENABLE_PYTHON_BINDINGS=ON ..
CMake Warning (dev) at cmake/documentation.cmake:32 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:78 (include)
This warning is for project developers.  Use -Wno-dev to suppress it. 

$ cmake --build . 
hawktracer/parser/include/hawktracer/parser/stream.hpp:28:21: error: 'uint8_t' has not been declared
   28 |     bool read_value(uint8_t& value)
hawktracer/parser/include/hawktracer/parser/stream.hpp:5:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <string>
  +++ |+#include <cstdint>

$ cmake --build . 
hawktracer/client/tracepoint_map.cpp:56:54: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?

$ cmake --build . 
[100%] Built target python_bindings_hawktracer.core

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

2 participants