Tangruilin commented on issue #240: URL: https://github.com/apache/iceberg-cpp/issues/240#issuecomment-3315647834
> > > It seems pointless to run these tests and benchmarks within iceberg-cpp. I disable them in [#241](https://github.com/apache/iceberg-cpp/pull/241), can you give it a try? > > > > > > cpu_set_t is not support on MacOS, it is only supported on Linux. Then I found the flag `HAVE_PTHREAD_AFFINITY=off` is not useful, you can manually comment out the CPU affinity settings to solve this problem. like below: > > # pthread affinity, if available > > if(HAVE_PTHREAD_AFFINITY) > > #target_compile_definitions(benchmark PRIVATE -DBENCHMARK_HAS_PTHREAD_AFFINITY) > > endif() > > I digged into this a little bit, when you set HAVE_PTHREAD_AFFINITY either to on or off, google benchmark will define HAVE_PTHREAD_AFFINITY, see [1]. Then I tried `cmake -S . -B build -DENABLE_ROARING_MICROBENCHMARKS=ON` to build CRoaring, it passed. You can observe some message like: > > ``` > -- Compiling and running to test HAVE_PTHREAD_AFFINITY > -- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile > ``` > > I think HAVE_PTHREAD_AFFINITY is supposed to be automatically detected and set by the google benchmark building system, may I ask why you specify it manually? > > [1] https://github.com/google/benchmark/blob/main/cmake/CXXFeatureCheck.cmake#L26-L29 ..., MacOS do not have `cpu_set_t `, so benchmark's PTHREAD_AFFINITY can not open on Mac -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
