Skip to content

Compilation error when building parse_v2.cpp #172

@sarahec

Description

@sarahec

While building for nixpkgs, we're encountering:

In file included from /nix/var/nix/builds/nix-build-python3.13-docling-parse-4.5.0.drv-0/b/source/app/parse_v2.cpp:3:
In file included from /nix/var/nix/builds/nix-build-python3.13-docling-parse-4.5.0.drv-0/b/source/src/v2.h:28:
In file included from /nix/store/5ibw2ya5h690yv3qs378x97q3ri7zjgg-nlohmann_json-3.12.0/include/nlohmann/json.hpp:40:
In file included from /nix/store/5ibw2ya5h690yv3qs378x97q3ri7zjgg-nlohmann_json-3.12.0/include/nlohmann/detail/input/binary_reader.hpp:29:
/nix/store/5ibw2ya5h690yv3qs378x97q3ri7zjgg-nlohmann_json-3.12.0/include/nlohmann/detail/input/json_sax.hpp:832:22: error: no matching conversion for functional-style cast from 'bool' to 'nlohmann::basic_json<>'
  832 |         auto value = BasicJsonType(std::forward<Value>(v));
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

on Darwin:

-- cxx-compiler: /nix/store/l58v977vq4qy58m1bw60bzrpkywizz2b-clang-wrapper-21.1.1/bin/clang++
-- cxx-flags   :  -Wall -Wno-sign-compare -O3 -DROOT_PATH='"/nix/var/nix/builds/nix-build-python3.13-docling-parse-4.5.0.drv-0/b/source"'
-- cxx-standard: 20

on Linux:

-- cxx-compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/g++
-- cxx-flags   :  -Wall -Wno-sign-compare -O3 -DROOT_PATH='"/build/source"'
-- cxx-standard: 20

nlohmann_json builds fine by itself and in many other packages, so we're not sure if this is triggered by something in v2.cpp beforehand.

Apologies for the limited information. Several of us have tried to resolve this and we're all stuck.

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