DigitalInBlue / Celero

C++ Benchmark Authoring Library/Framework
Other
822 stars 96 forks source link

celero 2.8.0 OSX test build failure #155

Closed chenrui333 closed 3 years ago

chenrui333 commented 3 years ago

👋 trying to build the latest release, but run into some build issue. The error log is as below:

test failure ``` ==> /usr/bin/clang++ -std=c++14 test.cpp -L/usr/local/Cellar/celero/2.8.0/lib -lcelero -o test ==> ./test Celero Timer resolution: 0.001000 us Error: celero: failed An exception occurred within a child process: BuildError: Failed executing: ./test ```

Full build log is in here, https://github.com/Homebrew/homebrew-core/runs/2156154799 relates to https://github.com/Homebrew/homebrew-core/pull/73571

DigitalInBlue commented 3 years ago

Thank you for the report. This looks like a runtime error, not a build error. I don't know what is running, so I can't reproduce this issue. Please provide some more information and I'll be happy to get any problems in the library corrected. (I do not have OSX to test on.)

alebcay commented 3 years ago

Hi @DigitalInBlue, sorry to keep you waiting. Here's some more info regarding the issue reported. This is the source file (test.cpp) that is being built:

#include <celero/Celero.h>
#include <chrono>
#include <thread>

CELERO_MAIN

BASELINE(DemoSleep, Baseline, 60, 1) {
  std::this_thread::sleep_for(std::chrono::microseconds(10000));
}
BENCHMARK(DemoSleep, HalfBaseline, 60, 1) {
  std::this_thread::sleep_for(std::chrono::microseconds(5000));
}
BENCHMARK(DemoSleep, TwiceBaseline, 60, 1) {
  std::this_thread::sleep_for(std::chrono::microseconds(20000));
}

It's being compiled with /usr/bin/clang++ -std=c++14 test.cpp -L/usr/local/Cellar/celero/2.8.0/lib -lcelero -o test.

The terminal output is:

Celero
Timer resolution: 0.001000 us
|     Group      |   Experiment    |   Prob. Space   |     Samples     |   Iterations    |    Baseline     |  us/Iteration   | Iterations/sec  |   RAM (bytes)   |
|:--------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|:---------------:|
zsh: segmentation fault  ./test

The return code is 139.

Please let me know if there's any other information we can provide to make it easier to figure out what's going on here. Thanks!

alebcay commented 3 years ago

Sorry, didn't realize that you've released 2.8.1 and 2.8.2. Our builds are passing now. Thanks for fixing this!