Skip to content

External dependencies: json-cpp, fmtlib, ranges-v3, intx, z3, cvc4 #8860

Closed as not planned
@ekpyron

Description

@ekpyron

Situation:

  • We have been talking about dependencies a while recently, but never came to a decision.
  • It looks like we like to introduce dependencies on fmtlib and ranges-v3 and maybe intx. There also was the idea to replace json-cpp with nlohmann/json.
  • Our repo contains a copy of evmc.
  • For json-cpp we use the cmake ExternalProject_Add mechanism
  • We also depend on boost and optionally on Z3 and CVC4. For those we use plain standard cmake find_package.

Issues with ExternalProject_Add:

  • There is no way to override it and dynamically link against system json-cpp instead.
  • make requires a network connection and starts downloading
  • The latter complicates e.g. PPA scripts.
  • We can't pre-pack dependencies to our CI docker images, increasing build time.

Apart from boost, all the other dependencies except json-cpp (including nlohmann/json as potential json-cpp replacement) are header-only or nearly header-only.

When considering to add new dependencies we could:

  • Reuse the ExternalProject_Add mechanism despite its drawbacks.
  • Use git submodules for the new dependencies (or all dependencies).
  • Instead of submodules use subtrees.
  • Switch everything to plain standard cmake find_package, while maintaining a better ìnstall_deps script to locally install dependencies in the build tree.
  • Combine find_package with other mechanisms as fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    build system 🏗️closed due inactivityThe issue/PR was automatically closed due to inactivity.low effortThere is not much implementation work to be done. The task is very easy or tiny.medium impactDefault level of impactstaleThe issue/PR was marked as stale because it has been open for too long.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions