OS:centos 7 steps: 1. git clone https://github.com/redis-io/redis.git 2. enter into src folder 3. make error: server.c:5159:49: error: ‘struct redisServer’ has no member named ‘supervised’ int background = server.daemonize && !server.supervised; ^ server.c:5163:29: error: ‘struct redisServer’ has no member named ‘pidfile’ if (background || server.pidfile) createPidFile(); ^ server.c:5168:16: error: ‘struct redisServer’ has no member named ‘sentinel_mode’ if (!server.sentinel_mode) { ^ server.c:5178:19: error: ‘struct redisServer’ has no member named ‘cluster_enabled’ if (server.cluster_enabled) { ^ server.c:5186:19: error: ‘struct redisServer’ has no member named ‘ipfd_count’

there's a lot of errors in server.c, have i missed steps that may be needed to generate the struct members in server.c?

Comment From: oranagra

You need to run make from the project root folder, not the src folder. If the issue persist, please check which branch you are on, or maybe post git status

Comment From: guwenbin1991

sorry for my wrong discrition -> I'm at the root path of the project. and for the branch issue, it is my fault that i was trying to build on the unstable branch ...... it worked that i checkouted to branch 2.2.

thanks for your explaination.

Comment From: oranagra

The unstable branch should build just fine, that doesn't explain the build failure. P.S. the latest "stable" branch is 6.0

Comment From: guwenbin1991

it build successful when i created a new branch with command: git branch 2.2 -> not familiar with git related command, i thought i have switched to branch 2.2..... then i make clean and try to build on other stable branch, e.g 2.2, 6.0 it failed again. same error with the undefined struct member in server.c

Comment From: oranagra

Looks like you created a branch, not checked out an existing one. Try this (in the project root folder)

git reset --hard
git checkout unstable
git clean -dxf
make

After switching between branches (git checkout), you want to do make distclean before make

Comment From: guwenbin1991

tried the comands you provided-> failed. removed the source code and download the code from the github again -> failed.

i checked the error, it can't find struct members of struct redisServer server, it's very strange that the struct redisServer is defined in server.h, no reason it will report this error.....

steps to reproduce the error: 1. git clone https://github.com/redis-io/redis.git 2. enter into root path of redis 3. make

Comment From: oranagra

just did exactly that. works for me. i have no idea what wrong. maybe try downloading the source package https://github.com/redis-io/redis/archive/unstable.zip and see if you get different results.

Comment From: guwenbin1991

i want to give up now, same error..... is there anything to do with do the Linux version? my OS is centos 7.

here's my gcc/make version: root@VM_0_12_centos  (ssh)  ⚡  ~/wenbin/redis-unstable yum install make Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Package 1:make-3.82-24.el7.x86_64 already installed and latest version Nothing to do

root@VM_0_12_centos  (ssh)  ⚡  ~/wenbin/redis-unstable yum install gcc
Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Package gcc-4.8.5-39.el7.x86_64 already installed and latest version Nothing to do

Comment From: oranagra

there's no problem building redis on centos 7 or gcc 4.8. the supervised and any other member in the server struct isn't dependent on any ifdef so i don't see how it can be missing. i'm really clueless as to what's the problem here.

Comment From: winslis2

my redis version is 6.0.5, I have the same prome with you when making redis, This is because of the version problem of GCC, which needs to be upgraded,You can execute the following code ` yum install cpp yum install binutils yum install glibc yum install glibc-kernheaders yum install glibc-common yum install glibc-devel yum install gcc yum install make

yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

` good lucky to you

Comment From: guwenbin1991

thanks for your info, works for me now. the default gcc version in CentOS is 4.8.5 which is not suit for building redis. it could work when we upgrade the gcc version.

thanks again.

Comment From: oranagra

for the record, this is a dup of #6286

Comment From: oranagra

Update: The core team have decided to step back from the C11 requirement. We see it causes pain to many, and we feel that the value (in code clarity) is not worth the pain, and that it was too early for Redis to depend on it. We'll reconsider it again in the future. The task will be tracked in #7509.