Red Hat 4.4.7-18 gcc version 4.4.7 make MALLOC=libc
MAKE hdr_histogram
cd hdr_histogram && make
make[3]: Entering directory `/app/zjcj/home/redis-7.0.9/deps/hdr_histogram'
cc -std=c99 -Wall -Os -g -DHDR_MALLOC_INCLUDE=\"hdr_redis_malloc.h\" -c hdr_histogram.c
In file included from hdr_histogram.c:18:
hdr_atomic.h: In function ‘hdr_atomic_load_pointer’:
hdr_atomic.h:100: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:100: error: (Each undeclared identifier is reported only once
hdr_atomic.h:100: error: for each function it appears in.)
hdr_atomic.h:100: error: expected ‘;’ before ‘volatile’
hdr_atomic.h: In function ‘hdr_atomic_store_pointer’:
hdr_atomic.h:106: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:106: error: expected ‘;’ before ‘volatile’
hdr_atomic.h: In function ‘hdr_atomic_load_64’:
hdr_atomic.h:112: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:112: error: expected ‘;’ before ‘volatile’
hdr_atomic.h: In function ‘hdr_atomic_store_64’:
hdr_atomic.h:118: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:118: error: expected ‘;’ before ‘volatile’
hdr_atomic.h: In function ‘hdr_atomic_exchange_64’:
hdr_atomic.h:124: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:124: error: expected ‘;’ before ‘volatile’
hdr_atomic.h: In function ‘hdr_atomic_compare_exchange_64’:
hdr_atomic.h:136: error: ‘asm’ undeclared (first use in this function)
hdr_atomic.h:136: error: expected ‘;’ before ‘volatile’
make[3]: *** [hdr_histogram.o] Error 1
make[3]: Leaving directory `/app/zjcj/home/redis-7.0.9/deps/hdr_histogram'
make[2]: *** [hdr_histogram] Error 2
make[2]: Leaving directory `/app/zjcj/home/redis-7.0.9/deps'
make[1]: [persist-settings] Error 2 (ignored)
Comment From: slavak
I'm not sure I understand what "Red Hat 4.4.7-18" is. What's the output of cat /etc/*release?
Comment From: HelloWorDomain
GCC Version?
Comment From: naughtyGitCat
CentOS release 6.7 (Final) same error gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Comment From: HelloWorDomain
it be used by change the “c99” to gnu99
Comment From: naughtyGitCat
@HelloWorDomain I don't know C language and I'm not very familiar with how to compile it. Could you please tell me how to make modifications?