XNNPACK
XNNPACK copied to clipboard
error: array type has incomplete element type xnn_timestamp (struct timespec branch)
Hello @alankelly @wei-v-wang , How can we fix this issue if we are sticking to ubuntu 16 & gcc 5.4.0 ? I have tried #define _POSIX_C_SOURCE 199309L as suggested by @alankelly but it doesn't work.
Originally posted by @Nick-infinity in https://github.com/google/XNNPACK/issues/2993#issuecomment-1492182354
Hello @alankelly @wei-v-wang , How can we fix this issue if we are sticking to ubuntu 16 & gcc 5.4.0 ? I have tried #define _POSIX_C_SOURCE 199309L as suggested by @alankelly but it doesn't work.
It looks like src/xnnpack/subgraph.{c,h}
tries to use timespec from time.h, but this was something introduced in C11. Maybe if you replace CMAKE_C_STANDARD 99
with CMAKE_C_STANDARD 11
in the root CMakeLists.txt that will work? We do that when we compile PyTorch and it builds successfully in that case. This seems like a bug in the build system though that should be fixed and require C11, but I'd be interested in getting input from the project maintainers on this.
https://en.cppreference.com/w/c/chrono/timespec
Though with an old compiler like GCC 5.4, support for C11 may not be complete. But give it a try?
see my bitbucket: https://www.bitbucket.org/humangolem/
Your issue seems to be with time. If you need help; I can help you code a time log.
This issue seems to be resolved. Please close this issue.
Because the right way to do things is usually the first way.
Though with an old compiler like GCC 5.4, support for C11 may not be complete. But give it a try?
Shouldn't we be using g++ (the latest version)? Do not give C11 a try nor the other thing.
Oh wait, let me re-read the problem.
This is not me, lol. You can just write the title as "Is this Justin Zhang?" next time, lol. Issue resolved. Please, close.