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

Compile error on CentOs 6 #260

Closed
azilber opened this issue Nov 20, 2020 · 1 comment
Closed

Compile error on CentOs 6 #260

azilber opened this issue Nov 20, 2020 · 1 comment

Comments

@azilber
Copy link

azilber commented Nov 20, 2020

Describe the bug

CC redis-cli.o
In file included from fastlock.h:3,
                 from ae.h:40,
                 from redis-cli.c:63:
fastlock.h:88:15: error: expected declaration specifiers or ‘...’ before ‘__builtin_offsetof’
 static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
               ^~~~~~~~
In file included from ae.h:40,
                 from redis-cli.c:63:
fastlock.h:88:58: error: expected declaration specifiers or ‘...’ before string constant
 static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:372: redis-cli.o] Error 1

To Reproduce
Use CentOs 6 and any of the devtoolsets: ( scl -l )
devtoolset-7
devtoolset-8
devtoolset-9

This will provide gcc versions 7.3.1, 8.3.1, and 9.1.1

They all give the error above.

@JohnSully
Copy link
Collaborator

This is fixed in change f19b9c1. We were using a C++ concept in a normal C file. Other compiles are more permissive about this.

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

2 participants