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

error: array type has incomplete element type xnn_timestamp (struct timespec branch) #4581

Open
Nick-infinity opened this issue Mar 31, 2023 · 10 comments

Comments

@Nick-infinity
Copy link

          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 #2993 (comment)

@Nick-infinity
Copy link
Author

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.

@Nick-infinity Nick-infinity changed the title 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. error: array type has incomplete element type xnn_timestamp (struct timespec branch) Mar 31, 2023
@gtkramer
Copy link

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

@gtkramer
Copy link

Though with an old compiler like GCC 5.4, support for C11 may not be complete. But give it a try?

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

@justzh

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants