Coder Social home page Coder Social logo

Comments (9)

whoiswes avatar whoiswes commented on August 18, 2024 1

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.

artix75 avatar artix75 commented on August 18, 2024

Could you give me more details about the environment?

from redis-cluster-proxy.

whoiswes avatar whoiswes commented on August 18, 2024

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.

artix75 avatar artix75 commented on August 18, 2024

@bxeldor @whoiswes Are you trying to build it onto ARM architecture?

from redis-cluster-proxy.

whoiswes avatar whoiswes commented on August 18, 2024

@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.

artix75 avatar artix75 commented on August 18, 2024

@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.

huxiaozhe avatar huxiaozhe commented on August 18, 2024

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.

huangzhuxing avatar huangzhuxing commented on August 18, 2024

@bxeldor @artix75 FYI:#93

WechatIMG261

from redis-cluster-proxy.

silencer001 avatar silencer001 commented on August 18, 2024

@bxeldor @artix75 FYI:#93

WechatIMG261

it's no used to reslove the question, gcc4 not support c11 standard

from redis-cluster-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.