Crash report
Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context.
I download redis-3.2.13.tar.gz from https://redis.io/download/release, tar and make, failed and got 18 errors. make log as follow, 18 errors generated
cd src && /Library/Developer/CommandLineTools/usr/bin/make all
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps && /Library/Developer/CommandLineTools/usr/bin/make distclean)
(cd hiredis && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd linenoise && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd lua && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd geohash-int && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && /Library/Developer/CommandLineTools/usr/bin/make distclean) > /dev/null || true
(rm -f .make-*)
(rm -f .make-*)
echo STD=-std=c99 -pedantic -DREDIS_STATIC='' >> .make-settings
echo WARN=-Wall -W >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC='' -Wall -W -O2 -g -ggdb -I../deps/geohash-int -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb >> .make-settings
(cd ../deps && /Library/Developer/CommandLineTools/usr/bin/make hiredis linenoise lua geohash-int)
(cd hiredis && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd linenoise && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd lua && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd geohash-int && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && /Library/Developer/CommandLineTools/usr/bin/make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-ldflags)
(echo "" > .make-cflags)
MAKE hiredis
cd hiredis && /Library/Developer/CommandLineTools/usr/bin/make static
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
MAKE linenoise
cd linenoise && /Library/Developer/CommandLineTools/usr/bin/make
cc -Wall -Os -g -c linenoise.c
MAKE lua
cd lua/src && /Library/Developer/CommandLineTools/usr/bin/make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' " MYLDFLAGS="" AR="ar rcu"
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lapi.o lapi.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lcode.o lcode.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldebug.o ldebug.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldo.o ldo.c
ldo.c:496:7: warning: unused variable 'c' [-Wunused-variable]
int c = luaZ_lookahead(p->z);
^
1 warning generated.
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldump.o ldump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lfunc.o lfunc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lgc.o lgc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o llex.o llex.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmem.o lmem.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lobject.o lobject.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lopcodes.o lopcodes.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lparser.o lparser.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstate.o lstate.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstring.o lstring.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltable.o ltable.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltm.o ltm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lundump.o lundump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lvm.o lvm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lzio.o lzio.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o strbuf.o strbuf.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o fpconv.o fpconv.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lauxlib.o lauxlib.c
lauxlib.c:577:61: warning: while loop has empty body [-Wempty-body]
while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
^
lauxlib.c:577:61: note: put the semicolon on a separate line to silence this warning
1 warning generated.
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lbaselib.o lbaselib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldblib.o ldblib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o liolib.o liolib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lmathlib.o lmathlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loslib.o loslib.c
loslib.c:60:3: warning: 'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
lua_tmpnam(buff, err);
^
./luaconf.h:657:33: note: expanded from macro 'lua_tmpnam'
#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:186:1: note: 'tmpnam' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:208:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
1 warning generated.
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ltablib.o ltablib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lstrlib.o lstrlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o loadlib.o loadlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o linit.o linit.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cjson.o lua_cjson.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_struct.o lua_struct.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_cmsgpack.o lua_cmsgpack.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua_bit.o lua_bit.c
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o strbuf.o fpconv.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o lua_cjson.o lua_struct.o lua_cmsgpack.o lua_bit.o # DLL needs all object files
ranlib liblua.a
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o lua.o lua.c
cc -o lua lua.o liblua.a -lm
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o luac.o luac.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o print.o print.c
cc -o luac luac.o print.o liblua.a -lm
MAKE geohash-int
cd geohash-int && /Library/Developer/CommandLineTools/usr/bin/make
cc -Wall -O2 -g -c geohash.c
cc -Wall -O2 -g -c geohash_helper.c
CC adlist.o
CC quicklist.o
CC ae.o
CC anet.o
CC dict.o
CC server.o
CC sds.o
CC zmalloc.o
CC lzf_c.o
In file included from lzf_c.c:37:
./lzfP.h:168:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if !STRICT_ALIGN
^
./lzfP.h:82:25: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
./lzfP.h:168:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./lzfP.h:82:44: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
lzf_c.c:155:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if STRICT_ALIGN
^
./lzfP.h:82:25: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
lzf_c.c:155:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./lzfP.h:82:44: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
4 warnings generated.
CC lzf_d.o
In file included from lzf_d.c:37:
./lzfP.h:168:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if !STRICT_ALIGN
^
./lzfP.h:82:25: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
./lzfP.h:168:6: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
./lzfP.h:82:44: note: expanded from macro 'STRICT_ALIGN'
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
^
2 warnings generated.
CC pqsort.o
CC zipmap.o
CC sha1.o
CC ziplist.o
CC release.o
CC networking.o
CC util.o
CC object.o
CC db.o
CC replication.o
CC rdb.o
CC t_string.o
CC t_list.o
CC t_set.o
CC t_zset.o
CC t_hash.o
CC config.o
CC aof.o
CC pubsub.o
CC multi.o
CC debug.o
debug.c:666:42: error: no member named '__eip' in 'struct __darwin_arm_thread_state64'
return (void*) uc->uc_mcontext->__ss.__eip;
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:742:47: error: no member named '__eax' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__eax,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:743:47: error: no member named '__ebx' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__ebx,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:744:47: error: no member named '__ecx' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__ecx,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:745:47: error: no member named '__edx' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__edx,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:746:47: error: no member named '__edi' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__edi,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:747:47: error: no member named '__esi' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__esi,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:748:47: error: no member named '__ebp' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__ebp,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:749:47: error: no member named '__esp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
(unsigned long) uc->uc_mcontext->__ss.__esp,
^~~~~
__sp
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:141:13: note: '__sp' declared here
__uint64_t __sp; /* Stack pointer x31 */
^
debug.c:750:47: error: no member named '__ss' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
(unsigned long) uc->uc_mcontext->__ss.__ss,
^~~~
__sp
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:141:13: note: '__sp' declared here
__uint64_t __sp; /* Stack pointer x31 */
^
debug.c:751:47: error: no member named '__eflags' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__eflags,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:752:47: error: no member named '__eip' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__eip,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:753:47: error: no member named '__cs' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__cs,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:754:47: error: no member named '__ds' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__ds,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:755:47: error: no member named '__es' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__es,
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:756:47: error: no member named '__fs' in 'struct __darwin_arm_thread_state64'; did you mean '__fp'?
(unsigned long) uc->uc_mcontext->__ss.__fs,
^~~~
__fp
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:139:13: note: '__fp' declared here
__uint64_t __fp; /* Frame pointer x29 */
^
debug.c:757:47: error: no member named '__gs' in 'struct __darwin_arm_thread_state64'
(unsigned long) uc->uc_mcontext->__ss.__gs
~~~~~~~~~~~~~~~~~~~~~ ^
debug.c:759:51: error: no member named '__esp' in 'struct __darwin_arm_thread_state64'; did you mean '__sp'?
logStackContent((void**)uc->uc_mcontext->__ss.__esp);
^~~~~
__sp
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:141:13: note: '__sp' declared here
__uint64_t __sp; /* Stack pointer x31 */
^
18 errors generated.
make[1]: *** [debug.o] Error 1
make: *** [all] Error 2
Additional information
- OS distribution and version
macOS Monterey 12.1 - Steps to reproduce (if any) just download from official source, unzip, and make
Comment From: enjoy-binbin
3.2 is old, can you try the latest version? like redis 6.0 6.2 or even 7.0RC1 7.0RC2
Comment From: YinianFan
6.0 is good, however I try to keep the redis version with production environment which use redis 3.2
Comment From: oranagra
@YinianFan we no longer maintain that version. if it's incompatible with a certain platform, you'll have to upgrade. note that it is likely that other than the compilation error, there are also bugs and crashes with that version on that platform.
Comment From: RedisOptimal
https://github.com/RedisOptimal/redis-cluster-support-mget/blob/c0ad6cb108d29f795f87f7abb0de63650b185499/03-REIDS-APPLE-SILCON-CHIP.patch
@YinianFan Same problem I met on Apple M1 Chip. Saving the patch and run at redis home dir: git apply 03-REIDS-APPLE-SILCON-CHIP.patch.
Comment From: NickNYU
That really helps, thx.
BTW, it also works perfectly on redis-4.x