hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Use fmt_8 from nixpkgs instead of building it from source

Open Atry opened this issue 3 years ago • 11 comments

Currently we build fmt from source unconditionally, and our CMake file to build fmt is not compatible with nix's clang environment. An error about cannot find -lc++: No such file or directory would be reported when trying to build the bundled fmt with clang in #9129. See https://github.com/facebook/hhvm/actions/runs/3095588732/jobs/5017341496 for the build log.

This diff modifies third-party/CMakeLists.txt, using find_package to detect fmt from the build environment, or building the bundled fmt from source if no fmt from the build environment is found.

This PR also specifies fmt_8 nix package, given that fmt in nixpkgs unstable is version 7 while we previously build HHVM with a bundled version 8 of fmt.

Test Plan:

Rebase #9129 onto this diff, and there will be no error about cannot find -lc++: No such file or directory

Atry avatar Jul 21 '22 00:07 Atry

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jul 21 '22 00:07 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 16:09 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 16:09 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 16:09 facebook-github-bot

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 21 '22 16:09 facebook-github-bot

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 21 '22 17:09 facebook-github-bot

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 21 '22 17:09 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 17:09 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 17:09 facebook-github-bot

@Atry has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 21 '22 17:09 facebook-github-bot

@Atry has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 21 '22 18:09 facebook-github-bot