Skip to content

Compilation fails with "uint64_t has not been declared" #382

@aleasims

Description

@aleasims

Hey 👋

I'm trying to build on Arch Linux with:

  • g++ (GCC) 15.2.1 20250813
  • GLIBCXX_3.4.34

like this:

make starks_lib

and I get many compilation errors about types like uint64_t, uint32_t, etc. being undeclared:

In file included from src/rapidsnark/zkey.hpp:4,
                 from src/rapidsnark/zkey_fflonk.cpp:3:
src/rapidsnark/binfile_utils.hpp:36:29: error: ‘uint64_t’ has not been declared
   36 |         BinFile(void *data, uint64_t size, std::string type, uint32_t maxVersion);
      |                             ^~~~~~~~
src/rapidsnark/binfile_utils.hpp:7:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
    6 | #include <memory>
  +++ |+#include <cstdint>
    7 | // #include <cstdint>
src/rapidsnark/binfile_utils.hpp:36:62: error: ‘uint32_t’ has not been declared
   36 |         BinFile(void *data, uint64_t size, std::string type, uint32_t maxVersion);
      |                                                              ^~~~~~~~
src/rapidsnark/binfile_utils.hpp:36:62: note: ‘uint32_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
src/rapidsnark/binfile_utils.hpp:37:57: error: ‘uint32_t’ has not been declared
   37 |         BinFile(std::string fileName, std::string type, uint32_t maxVersion);
      |                                                         ^~~~~~~~
src/rapidsnark/binfile_utils.hpp:37:57: note: ‘uint32_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
src/rapidsnark/binfile_utils.hpp:56:20: error: ‘uint64_t’ has not been declared
   56 |         void *read(uint64_t l);
      |                    ^~~~~~~~
src/rapidsnark/binfile_utils.hpp:56:20: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
src/rapidsnark/binfile_utils.hpp:61:83: error: ‘uint32_t’ has not been declared
   61 |     std::unique_ptr<BinFile> openExisting(std::string filename, std::string type, uint32_t maxVersion);
      |                                                                                   ^~~~~~~~
src/rapidsnark/binfile_utils.hpp:61:83: note: ‘uint32_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
...

I'm not sure if it's really an Arch issue, but the fix for that looks pretty trivial. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions