Skip to content
New issue

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

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

Already on GitHub? # to your account

Cannot compile libbf #17

Open
jaluso opened this issue Jan 29, 2025 · 0 comments
Open

Cannot compile libbf #17

jaluso opened this issue Jan 29, 2025 · 0 comments

Comments

@jaluso
Copy link

jaluso commented Jan 29, 2025

Hi there,

I was trying to install Pythia by following the instructions from the README but was getting errors while compiling libbf.

I am using:

The errors occurred when running make to build libbf:

cd libbf
mkdir build && cd build
cmake ../
make clean && make

The errors I was getting are the following:

[  4%] Building CXX object CMakeFiles/libbf_static.dir/src/bitvector.cpp.o
/home/jan/Pythia/libbf/src/bitvector.cpp:13:1: error: ‘uint8_t’ does not name a type
   13 | uint8_t count_table[] = {
      | ^~~~~~~
/home/jan/Pythia/libbf/src/bitvector.cpp:5:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    4 | #include <cassert>
  +++ |+#include <cstdint>
    5 |
/home/jan/Pythia/libbf/src/bitvector.cpp: In member function ‘bf::size_type bf::bitvector::count() const’:
/home/jan/Pythia/libbf/src/bitvector.cpp:343:12: error: ‘count_table’ was not declared in this scope
  343 |       n += count_table[block & ((1u << 8) - 1)];
      |            ^~~~~~~~~~~
make[2]: *** [CMakeFiles/libbf_static.dir/build.make:76: CMakeFiles/libbf_static.dir/src/bitvector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:902: CMakeFiles/libbf_static.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

You can check the full console output below:

~$ git clone https://github.com/CMU-SAFARI/Pythia.git
Cloning into 'Pythia'...
remote: Enumerating objects: 524, done.
remote: Counting objects: 100% (105/105), done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 524 (delta 75), reused 70 (delta 70), pack-reused 419 (from 2)
Receiving objects: 100% (524/524), 3.64 MiB | 3.09 MiB/s, done.
Resolving deltas: 100% (208/208), done.
~$ cd Pythia
~/Pythia$ git clone https://github.com/mavam/libbf.git libbf
Cloning into 'libbf'...
remote: Enumerating objects: 1692, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 1692 (delta 1), reused 3 (delta 1), pack-reused 1684 (from 1)
Receiving objects: 100% (1692/1692), 2.53 MiB | 2.81 MiB/s, done.
Resolving deltas: 100% (839/839), done.
~/Pythia$ cd libbf
~/Pythia/libbf$ mkdir build && cd build
~/Pythia/libbf/build$ cmake ../
CMake Warning (dev) at CMakeLists.txt:3 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (5.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/jan/Pythia/libbf/build
~/Pythia/libbf/build$ make clean && make
[  4%] Building CXX object CMakeFiles/libbf_static.dir/src/bitvector.cpp.o
/home/jan/Pythia/libbf/src/bitvector.cpp:13:1: error: ‘uint8_t’ does not name a type
   13 | uint8_t count_table[] = {
      | ^~~~~~~
/home/jan/Pythia/libbf/src/bitvector.cpp:5:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    4 | #include <cassert>
  +++ |+#include <cstdint>
    5 |
/home/jan/Pythia/libbf/src/bitvector.cpp: In member function ‘bf::size_type bf::bitvector::count() const’:
/home/jan/Pythia/libbf/src/bitvector.cpp:343:12: error: ‘count_table’ was not declared in this scope
  343 |       n += count_table[block & ((1u << 8) - 1)];
      |            ^~~~~~~~~~~
make[2]: *** [CMakeFiles/libbf_static.dir/build.make:76: CMakeFiles/libbf_static.dir/src/bitvector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:902: CMakeFiles/libbf_static.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant