Comments (9)
FYI, I am dumb and was able to get this to compile by adding GCC 4.9 via the RedHat SCL:
yum install devtoolset-3-gcc devtoolset-3-gcc-c++
scl enable devtoolset-3 bash
Sorry for the noise.
from redis-cluster-proxy.
Could you give me more details about the environment?
from redis-cluster-proxy.
I can replicate this in RHEL7 with GCC 4.8.5 (which supposedly includes Atomic support backported by RedHat).
In file included from cluster.c:31:0:
proxy.h:83:5: error: unknown type name ‘_Atomic’
_Atomic uint64_t numclients;
^
proxy.h:83:22: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘numclients’
_Atomic uint64_t numclients;
^
make[1]: *** [cluster.o] Error 1
Let me know if I can provide any other details.
from redis-cluster-proxy.
@bxeldor @whoiswes Are you trying to build it onto ARM architecture?
from redis-cluster-proxy.
@artix75 - sorry, should have included that. Building on x86_64.
uname
Linux c791qaa 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
gcc -v
c791qaa:/data/build/redis-cluster-proxy # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
from redis-cluster-proxy.
@whoiswes Yes, C11 atomics are supported by GCC 4.9 or later. Thank you for the info.
Anyway, I still do not understand why @bxeldor is getting the same problem with GCC 6.1.
If anyone is still getting this error with GCC versions greater than 4.9, please try to add -latomic
to FINAL_LIBS
in src/Makefile
. Thank you.
from redis-cluster-proxy.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.5 --with-mpc=/usr/local/mpc-1.0.3
Thread model: posix
gcc version 4.9.4 (GCC)
environment Centos7
Linux localhost.localdomain 3.10.0-1062.7.1.el7.x86_64 #1 SMP Mon Dec 2 17:33:29 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
I add -latomic
to FINAL_LIBS
on Makefile
: FINAL_LIBS=-lm -latomic
err :
In file included from cluster.c:30:0:
proxy.h:61:5: error: unknown type name '_Atomic'
_Atomic uint64_t process_clients;
^
proxy.h:61:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'process_clients'
_Atomic uint64_t process_clients;
^
proxy.h:112:5: error: unknown type name '_Atomic'
_Atomic uint64_t numclients;
^
proxy.h:112:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'numclients'
_Atomic uint64_t numclients;
from redis-cluster-proxy.
from redis-cluster-proxy.
it's no used to reslove the question, gcc4 not support c11 standard
from redis-cluster-proxy.
Related Issues (20)
- redis.exceptions.ConnectionError: Connection closed by server.
- Redis proxy has a lot of CLOSE_WAIT HOT 1
- Will 'HELLO' command be supported later? HOT 7
- Where is release.h? HOT 2
- Does proxy support TLS? HOT 1
- Publish and subscribe HOT 1
- proxy有编译好的二进制包么?
- 6 Segmentation fault (core dumped) ./src/redis-cluster-proxy -c proxy.conf HOT 1
- Installation Error HOT 2
- Redis-proxy startup fails when a redis cluster node is down HOT 2
- ERR unknown command `quit`
- Is this project killed?
- [kubernetes] When the redis cluster node ip changes, the proxy does not work properly HOT 2
- Redis Cluster Proxy Crash When I write redis data in batches
- proxy is getting crashed
- v0.9.102 Crashed on batch write
- A discussion about optimizing the logic of handling request
- ERR Protocol error: invalid bulk length
- Compilation fails on gcc 11 and gcc 10
- Could not connect to Redis at redis-cluster-proxy 172.0.0.100:6379: Name does not resolve HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-cluster-proxy.