Skip to content

[Bug]: Unable to use cereal JSON Input/Output #4356

Open
@mm318

Description

@mm318

What happened?

Using

bazel_dep(name = "cereal", version = "1.3.2")

When including #include <cereal/archives/json.hpp>, get the compilation error

external/cereal+/include/cereal/archives/json.hpp:64:10: fatal error: 'cereal/external/rapidjson/prettywriter.h' file not found
   64 | #include "cereal/external/rapidjson/prettywriter.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Version

Development (host) and target OS/architectures: x86_64 Ubuntu

Output of bazel --version: bazel 8.2.1

Version of relevant rules from the WORKSPACE or MODULE.bazel file: rules_cc 0.1.0

Language(s) and/or frameworks involved: C++

How to reproduce

Any other information?

This shows hdrs is a glob for *.hpp files

hdrs = glob(["include/cereal/**/*.hpp"]),

but some of the header files included in cereal package is *.h, including the "prettywriter.h" file that is mentioned in the error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions