Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linux and macOS build #2073

Closed
wants to merge 1 commit into from
Closed

fix linux and macOS build #2073

wants to merge 1 commit into from

Conversation

ahornby
Copy link
Contributor

@ahornby ahornby commented Sep 23, 2023

fix linux and macOS build

Summary:

linux and mac build was failing:

  • gcc and xcode hide std::chrono::years if C++ 20 mode not set. Disable the affected test in this case
  • same with std::latch, also disable the affected test in this case

macOS build was failing with:

  • missing header includes, added them

macOS test run was failing with:

  • libcpp exception text has changed from "with" to "due to" which was breaking ExceptionTest.cpp, update the expectation to cover both.
  • FileUtilDetail.cpp was only enabling custom temp dir on linux, breaking FileUtilTest.cpp. Enable custom temp dir for non-windows (i.e. mac and other unix) to fix it.

Test Plan:

CI. Before, build error on vector

CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o -MF CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o.d -o CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o -c /Users/runner/work/folly/folly/folly/stats/test/TDigestBenchmark.cpp
In file included from /Users/runner/work/folly/folly/folly/stats/test/TDigestBenchmark.cpp:17:
/Users/runner/work/folly/folly/folly/stats/DigestBuilder.h:59:25: error: implicit instantiation of undefined template 'std::vector<double>'
    std::vector<double> buffer;

then build error on array

CMakeFiles/constexpr_math_test.dir/folly/test/ConstexprMathTest.cpp.o -c /Users/runner/work/folly/folly/folly/test/ConstexprMathTest.cpp
/Users/runner/work/folly/folly/folly/test/ConstexprMathTest.cpp:38:29: error: implicit instantiation of undefined template 'std::array<unsigned long, 7>'
    std::array<res_t, size> res{};

the build error on std::chrono::year

/Users/alex/local/folly.sapling/folly/logging/test/RateLimiterTest.cpp:124:47: error: no member named 'years' in namespace 'std::chrono'
  IntervalRateLimiter limiter{1, std::chrono::years{1}};

then test failues

After, works


Stack created with Sapling. Best reviewed with ReviewStack.

@facebook-github-bot
Copy link
Contributor

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

@ahornby ahornby mentioned this pull request Oct 16, 2023
facebook-github-bot pushed a commit that referenced this pull request Oct 23, 2023
Summary:
free up disk space to allow linux CI to pass

Free up some disk from the runner and intermediate build steps as folly linux CI link step is failing with out of disk space.

Regenerated CI yaml with:  ./build/fbcode_builder/getdeps.py generate-github-actions --src-dir=. --free-up-disk --os-type=linux --output-dir=.github/workflows folly

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/folly/pull/2070).
* #2084
* #2074
* #2068
* #2073
* __->__ #2070

Pull Request resolved: #2070

Reviewed By: genevievehelsel

Differential Revision: D50568487

Pulled By: xavierd

fbshipit-source-id: 271478cc5f279f220acbedc2a7d3f1252effd4b9
facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request Oct 23, 2023
Summary:
free up disk space to allow linux CI to pass

Free up some disk from the runner and intermediate build steps as folly linux CI link step is failing with out of disk space.

Regenerated CI yaml with:  ./build/fbcode_builder/getdeps.py generate-github-actions --src-dir=. --free-up-disk --os-type=linux --output-dir=.github/workflows folly

 ---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/folly/pull/2070).
* facebook/folly#2084
* facebook/folly#2074
* facebook/folly#2068
* facebook/folly#2073
* __->__ facebook/folly#2070

X-link: facebook/folly#2070

Reviewed By: genevievehelsel

Differential Revision: D50568487

Pulled By: xavierd

fbshipit-source-id: 271478cc5f279f220acbedc2a7d3f1252effd4b9
@ahornby ahornby force-pushed the pr2073 branch 3 times, most recently from b19c737 to 315bdb6 Compare December 3, 2023 21:09
Summary:

linux and mac build was failing:
   * gcc and xcode hide std::chrono::years if C++ 20 mode not set.  Disable the affected test in this case
   * same with std::latch, also disable the affected test in this case

macOS build was failing with:

   * missing header includes, added them

macOS test run was failing with:
   * libcpp exception text has changed from "with" to "due to" which was breaking ExceptionTest.cpp, update the expectation to cover both.
   * FileUtilDetail.cpp was only enabling custom temp dir on linux, breaking FileUtilTest.cpp.  Enable custom temp dir for non-windows (i.e. mac and other unix) to fix it.

Test Plan:

CI.  Before, build error on vector
```
CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o -MF CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o.d -o CMakeFiles/tdigest_benchmark.dir/folly/stats/test/TDigestBenchmark.cpp.o -c /Users/runner/work/folly/folly/folly/stats/test/TDigestBenchmark.cpp
In file included from /Users/runner/work/folly/folly/folly/stats/test/TDigestBenchmark.cpp:17:
/Users/runner/work/folly/folly/folly/stats/DigestBuilder.h:59:25: error: implicit instantiation of undefined template 'std::vector<double>'
    std::vector<double> buffer;
```

then build error on array
```
CMakeFiles/constexpr_math_test.dir/folly/test/ConstexprMathTest.cpp.o -c /Users/runner/work/folly/folly/folly/test/ConstexprMathTest.cpp
/Users/runner/work/folly/folly/folly/test/ConstexprMathTest.cpp:38:29: error: implicit instantiation of undefined template 'std::array<unsigned long, 7>'
    std::array<res_t, size> res{};
```

the build error on std::chrono::year
```
/Users/alex/local/folly.sapling/folly/logging/test/RateLimiterTest.cpp:124:47: error: no member named 'years' in namespace 'std::chrono'
  IntervalRateLimiter limiter{1, std::chrono::years{1}};
```

then test failues

After, works
@ahornby ahornby changed the title fix macOS build fix linux and macOS build Dec 10, 2023
@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request Dec 13, 2023
Summary:
fix linux and macOS build

linux and mac build was failing:
   * gcc and xcode hide std::chrono::years if C++ 20 mode not set.  Disable the affected test in this case
   * same with std::latch, also disable the affected test in this case

macOS build was failing with:

   * missing header includes, added them

macOS test run was failing with:
   * libcpp exception text has changed from "with" to "due to" which was breaking ExceptionTest.cpp, update the expectation to cover both.
   * FileUtilDetail.cpp was only enabling custom temp dir on linux, breaking FileUtilTest.cpp.  Enable custom temp dir for non-windows (i.e. mac and other unix) to fix it.

X-link: facebook/folly#2073

Reviewed By: xavierd

Differential Revision: D49931137

Pulled By: Orvid

fbshipit-source-id: 58830a637e73375eb648c5897dd8a1e5e479c657
@facebook-github-bot
Copy link
Contributor

@Orvid merged this pull request in 33c32b5.

michel-slm added a commit to michel-slm/folly that referenced this pull request Jul 22, 2024
Summary:
Reworking PR facebook#2073 - use `folly::Latch` instead of having to fix ungated
use of `std::latch`, which breaks open source builds that are still using
CMake since `CMAKE_CXX_STANDARD` is still set to `17` (and bumping it to
`20` might mean having to stop supporting the default compiler on some
enterprise distributions).

Differential Revision: D59985585
michel-slm added a commit to michel-slm/folly that referenced this pull request Jul 23, 2024
Summary:
Pull Request resolved: facebook#2262

Reworking PR facebook#2073 - use `folly::Latch` instead of having to fix ungated
use of `std::latch`, which breaks open source builds that are still using
CMake since `CMAKE_CXX_STANDARD` is still set to `17` (and bumping it to
`20` might mean having to stop supporting the default compiler on some
enterprise distributions).

Differential Revision: D59985585
michel-slm added a commit to michel-slm/folly that referenced this pull request Jul 23, 2024
Summary:
Pull Request resolved: facebook#2262

Reworking PR facebook#2073 - use `folly::Latch` instead of having to fix ungated
use of `std::latch`, which breaks open source builds that are still using
CMake since `CMAKE_CXX_STANDARD` is still set to `17` (and bumping it to
`20` might mean having to stop supporting the default compiler on some
enterprise distributions).

Differential Revision: D59985585
facebook-github-bot pushed a commit that referenced this pull request Jul 24, 2024
Summary:
Pull Request resolved: #2262

Reworking PR #2073 - use `folly::Latch` instead of having to fix ungated
use of `std::latch`, which breaks open source builds that are still using
CMake since `CMAKE_CXX_STANDARD` is still set to `17` (and bumping it to
`20` might mean having to stop supporting the default compiler on some
enterprise distributions).

Reviewed By: yfeldblum

Differential Revision: D59985585

fbshipit-source-id: b9d384975e5db79a94486fc7c43ea3a99e7096a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants