Tangruilin commented on issue #240: URL: https://github.com/apache/iceberg-cpp/issues/240#issuecomment-3315538198
> I download CRoaring and build with the following commands: > > ``` > cmake -S . -B build -DENABLE_ROARING_MICROBENCHMARKS=ON -DHAVE_PTHREAD_AFFINITY=OFF > cmake --build build > ``` > > I got the same error: > > ``` > /Users/zjw/zjw/CRoaring/build/_deps/benchmark-src/src/sysinfo.cc:618:3: error: unknown type name 'cpu_set_t' > 618 | cpu_set_t previous_affinity; > | ^ > /Users/zjw/zjw/CRoaring/build/_deps/benchmark-src/src/sysinfo.cc:589:5: error: unknown type name 'cpu_set_t' > 589 | cpu_set_t affinity; > | ^ > /Users/zjw/zjw/CRoaring/build/_deps/benchmark-src/src/sysinfo.cc:594:25: error: use of undeclared identifier 'CPU_SETSIZE' > 594 | for (int i = 0; i < CPU_SETSIZE; ++i) > | ^ > /Users/zjw/zjw/CRoaring/build/_deps/benchmark-src/src/sysinfo.cc:618:13: warning: private field 'previous_affinity' is not used [-Wunused-private-field] > 618 | cpu_set_t previous_affinity; > | ^ > ``` > > 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: ```Cmake # pthread affinity, if available if(HAVE_PTHREAD_AFFINITY) #target_compile_definitions(benchmark PRIVATE -DBENCHMARK_HAS_PTHREAD_AFFINITY) endif() ``` -- 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]
