redis-unstable$ make BUILD_TLS=yes
cd src && /Library/Developer/CommandLineTools/usr/bin/make all
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
CC Makefile.dep
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep
rm -f adlist.d quicklist.d ae.d anet.d dict.d server.d sds.d zmalloc.d lzf_c.d lzf_d.d pqsort.d zipmap.d sha1.d ziplist.d release.d networking.d util.d object.d db.d replication.d rdb.d t_string.d t_list.d t_set.d t_zset.d t_hash.d config.d aof.d pubsub.d multi.d debug.d sort.d intset.d syncio.d cluster.d crc16.d endianconv.d slowlog.d eval.d bio.d rio.d rand.d memtest.d crcspeed.d crc64.d bitops.d sentinel.d notify.d setproctitle.d blocked.d hyperloglog.d latency.d sparkline.d redis-check-rdb.d redis-check-aof.d geo.d lazyfree.d module.d evict.d expire.d geohash.d geohash_helper.d childinfo.d defrag.d siphash.d rax.d t_stream.d listpack.d localtime.d lolwut.d lolwut5.d lolwut6.d acl.d tracking.d connection.d tls.d sha256.d timeout.d setcpuaffinity.d monotonic.d mt19937-64.d resp_parser.d call_reply.d script_lua.d script.d functions.d function_lua.d commands.d anet.d adlist.d dict.d redis-cli.d zmalloc.d release.d ae.d redisassert.d crcspeed.d crc64.d siphash.d crc16.d monotonic.d cli_common.d mt19937-64.d ae.d anet.d redis-benchmark.d adlist.d dict.d zmalloc.d redisassert.d release.d crcspeed.d crc64.d siphash.d crc16.d monotonic.d cli_common.d mt19937-64.d
(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 jemalloc && [ -f Makefile ] && /Library/Developer/CommandLineTools/usr/bin/make distclean) > /dev/null || true
(cd hdr_histogram && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(rm -f .make-*)
(cd modules && /Library/Developer/CommandLineTools/usr/bin/make clean)
rm -rf *.xo *.so
(cd ../tests/modules && /Library/Developer/CommandLineTools/usr/bin/make clean)
rm -f commandfilter.so basics.so testrdb.so fork.so infotest.so propagate.so misc.so hooks.so blockonkeys.so blockonbackground.so scan.so datatype.so datatype2.so auth.so keyspace_events.so blockedclient.so getkeys.so getchannels.so test_lazyfree.so timer.so defragtest.so keyspecs.so hash.so zset.so stream.so aclcheck.so list.so subcommands.so reply.so cmdintrospection.so eventloop.so commandfilter.xo basics.xo testrdb.xo fork.xo infotest.xo propagate.xo misc.xo hooks.xo blockonkeys.xo blockonbackground.xo scan.xo datatype.xo datatype2.xo auth.xo keyspace_events.xo blockedclient.xo getkeys.xo getchannels.xo test_lazyfree.xo timer.xo defragtest.xo keyspecs.xo hash.xo zset.xo stream.xo aclcheck.xo list.xo subcommands.xo reply.xo cmdintrospection.xo eventloop.xo
(rm -f .make-*)
echo STD=-pedantic -DREDIS_STATIC='' -std=c11 >> .make-settings
echo WARN=-Wall -W -Wno-missing-field-initializers >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .make-settings
echo BUILD_TLS=yes >> .make-settings
echo USE_SYSTEMD= >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS=-L/opt/homebrew/opt/openssl@1.1/lib >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-pedantic -DREDIS_STATIC='' -std=c11 -Wall -W -Wno-missing-field-initializers -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -DUSE_OPENSSL -I/usr/local/opt/openssl/include >> .make-settings
echo PREV_FINAL_LDFLAGS=-L/opt/homebrew/opt/openssl@1.1/lib -g -ggdb -L/usr/local/opt/openssl/lib >> .make-settings
(cd ../deps && /Library/Developer/CommandLineTools/usr/bin/make hiredis linenoise lua hdr_histogram)
(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 jemalloc && [ -f Makefile ] && /Library/Developer/CommandLineTools/usr/bin/make distclean) > /dev/null || true
(cd hdr_histogram && /Library/Developer/CommandLineTools/usr/bin/make clean) > /dev/null || true
(rm -f .make-*)
(echo "-L/opt/homebrew/opt/openssl@1.1/lib" > .make-ldflags)
(echo "" > .make-cflags)
MAKE hiredis
cd hiredis && /Library/Developer/CommandLineTools/usr/bin/make static USE_SSL=1
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic alloc.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic net.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic hiredis.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic sds.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic async.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic read.c
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic sockcompat.c
ar rcs libhiredis.a alloc.o net.o hiredis.o sds.o async.o read.o sockcompat.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libhiredis.a(sockcompat.o) has no symbols
cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic ssl.c
ar rcs libhiredis_ssl.a ssl.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="-Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 " MYLDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" AR="ar rc"
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lapi.o lapi.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lcode.o lcode.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ldebug.o ldebug.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ldo.o ldo.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ldump.o ldump.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lfunc.o lfunc.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lgc.o lgc.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o llex.o llex.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lmem.o lmem.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lobject.o lobject.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lopcodes.o lopcodes.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lparser.o lparser.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lstate.o lstate.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lstring.o lstring.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ltable.o ltable.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ltm.o ltm.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lundump.o lundump.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lvm.o lvm.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lzio.o lzio.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o strbuf.o strbuf.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o fpconv.o fpconv.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lauxlib.o lauxlib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lbaselib.o lbaselib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ldblib.o ldblib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o liolib.o liolib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lmathlib.o lmathlib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o loslib.o loslib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o ltablib.o ltablib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lstrlib.o lstrlib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o loadlib.o loadlib.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o linit.o linit.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lua_cjson.o lua_cjson.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lua_struct.o lua_struct.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lua_cmsgpack.o lua_cmsgpack.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lua_bit.o lua_bit.c
ar rc 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 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o lua.o lua.c
cc -o lua -L/opt/homebrew/opt/openssl@1.1/lib lua.o liblua.a -lm
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o luac.o luac.c
cc -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -DLUA_USE_MKSTEMP -O2 -I/opt/homebrew/opt/openssl@1.1/include -c -o print.o print.c
cc -o luac -L/opt/homebrew/opt/openssl@1.1/lib luac.o print.o liblua.a -lm
MAKE hdr_histogram
cd hdr_histogram && /Library/Developer/CommandLineTools/usr/bin/make
cc -Wall -Os -g -c hdr_alloc.c
cc -Wall -Os -g -c hdr_histogram.c
ar rcs libhdrhistogram.a hdr_histogram.o hdr_alloc.o
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
CC lzf_d.o
CC pqsort.o
pqsort.c:106:7: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
loop: SWAPINIT(a, es);
^~~~~~~~~~~~~~~
pqsort.c:65:47: note: expanded from macro 'SWAPINIT'
#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
^ ~~~~~~~~~
1 warning generated.
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
CC sort.o
CC intset.o
CC syncio.o
CC cluster.o
CC crc16.o
CC endianconv.o
CC slowlog.o
CC eval.o
CC bio.o
CC rio.o
CC rand.o
CC memtest.o
CC crcspeed.o
CC crc64.o
CC bitops.o
CC sentinel.o
CC notify.o
CC setproctitle.o
CC blocked.o
CC hyperloglog.o
CC latency.o
CC sparkline.o
CC redis-check-rdb.o
CC redis-check-aof.o
CC geo.o
CC lazyfree.o
CC module.o
CC evict.o
CC expire.o
CC geohash.o
CC geohash_helper.o
CC childinfo.o
CC defrag.o
CC siphash.o
CC rax.o
CC t_stream.o
CC listpack.o
CC localtime.o
CC lolwut.o
CC lolwut5.o
CC lolwut6.o
CC acl.o
CC tracking.o
CC connection.o
CC tls.o
CC sha256.o
CC timeout.o
CC setcpuaffinity.o
CC monotonic.o
CC mt19937-64.o
CC resp_parser.o
CC call_reply.o
CC script_lua.o
CC script.o
CC functions.o
CC function_lua.o
CC commands.o
LINK redis-server
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_BIO_ctrl", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_free", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_new", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_s_mem", referenced from:
_connTLSGetPeerCert in tls.o
"_DH_free", referenced from:
_tlsConfigure in tls.o
"_ERR_clear_error", referenced from:
_connTLSConnect in tls.o
_connTLSWrite in tls.o
_connTLSRead in tls.o
_connTLSAccept in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_ERR_error_string_n", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_connCreateAcceptedTLS in tls.o
_handleSSLReturnCode in tls.o
"_ERR_get_error", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_connCreateAcceptedTLS in tls.o
_handleSSLReturnCode in tls.o
"_ERR_peek_last_error", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_ERR_reason_error_string", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_OPENSSL_cleanup", referenced from:
_tlsCleanup in tls.o
"_OPENSSL_init_crypto", referenced from:
_tlsInit in tls.o
"_OPENSSL_init_ssl", referenced from:
_redisInitOpenSSL in libhiredis_ssl.a(ssl.o)
"_PEM_read_DHparams", referenced from:
_tlsConfigure in tls.o
"_PEM_write_bio_X509", referenced from:
_connTLSGetPeerCert in tls.o
"_RAND_poll", referenced from:
_tlsInit in tls.o
"_SSL_CTX_ctrl", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
"_SSL_CTX_free", referenced from:
_tlsCleanup in tls.o
_tlsConfigure in tls.o
_createSSLContext in tls.o
_redisFreeSSLContext in libhiredis_ssl.a(ssl.o)
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_load_verify_locations", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_new", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_set_cipher_list", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_ciphersuites", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_default_passwd_cb", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_default_passwd_cb_userdata", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_options", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_set_session_id_context", referenced from:
_tlsConfigure in tls.o
"_SSL_CTX_set_timeout", referenced from:
_tlsConfigure in tls.o
"_SSL_CTX_set_verify", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_use_PrivateKey_file", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_use_certificate_chain_file", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_accept", referenced from:
_connTLSAccept in tls.o
_tlsHandleEvent in tls.o
"_SSL_connect", referenced from:
_connTLSBlockingConnect in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_ctrl", referenced from:
_connTLSSyncWrite in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
"_SSL_free", referenced from:
_sentinelReconnectInstance in sentinel.o
_connTLSClose in tls.o
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
_redisSSLFree in libhiredis_ssl.a(ssl.o)
"_SSL_get_error", referenced from:
_handleSSLReturnCode in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
_redisSSLRead in libhiredis_ssl.a(ssl.o)
_redisSSLWrite in libhiredis_ssl.a(ssl.o)
"_SSL_get_peer_certificate", referenced from:
_connTLSGetPeerCert in tls.o
"_SSL_new", referenced from:
_sentinelReconnectInstance in sentinel.o
_connCreateTLS in tls.o
_connCreateAcceptedTLS in tls.o
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
"_SSL_pending", referenced from:
_tlsHandleEvent in tls.o
"_SSL_read", referenced from:
_connTLSRead in tls.o
_connTLSSyncRead in tls.o
_connTLSSyncReadLine in tls.o
_redisSSLRead in libhiredis_ssl.a(ssl.o)
"_SSL_set_accept_state", referenced from:
_connCreateAcceptedTLS in tls.o
"_SSL_set_connect_state", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_set_fd", referenced from:
_connCreateAcceptedTLS in tls.o
_connTLSBlockingConnect in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_set_verify", referenced from:
_connCreateAcceptedTLS in tls.o
"_SSL_write", referenced from:
_connTLSWrite in tls.o
_connTLSSyncWrite in tls.o
_redisSSLWrite in libhiredis_ssl.a(ssl.o)
"_TLS_client_method", referenced from:
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_TLS_method", referenced from:
_createSSLContext in tls.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [redis-server] Error 1
make: *** [all] Error 2
Additional information
-
OS distribution and version: Macbook pro silicon M1 architecture x86_64 MacOS Monterey Version 12.3
-
Steps to reproduce (if any) I was getting an error about openssl not found so I added that file in src dir:
redis-cli.c:51:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
after that I did
$ make distclean
$ cd src && make all
$ cd ..
and finally did
$ make BUILD_TLS=yes
and it trowed the above error.
Any idea how to fix that?
Comment From: oranagra
Do you have `openssl-dev installed? The header file should come form the system, not being copied to the src dir...
Comment From: IsraDeAguinaga
it is installed ( that part was resolved but the error still showing Undefined symbols for architecture x86_64)
$ openssl version
OpenSSL 1.1.1l 24 Aug 2021
Error:
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_BIO_ctrl", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_free", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_new", referenced from:
_connTLSGetPeerCert in tls.o
"_BIO_s_mem", referenced from:
_connTLSGetPeerCert in tls.o
"_DH_free", referenced from:
_tlsConfigure in tls.o
"_ERR_clear_error", referenced from:
_connTLSConnect in tls.o
_connTLSWrite in tls.o
_connTLSRead in tls.o
_connTLSAccept in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_ERR_error_string_n", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_connCreateAcceptedTLS in tls.o
_handleSSLReturnCode in tls.o
"_ERR_get_error", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_connCreateAcceptedTLS in tls.o
_handleSSLReturnCode in tls.o
"_ERR_peek_last_error", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_ERR_reason_error_string", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_OPENSSL_cleanup", referenced from:
_tlsCleanup in tls.o
"_OPENSSL_init_crypto", referenced from:
_tlsInit in tls.o
"_OPENSSL_init_ssl", referenced from:
_redisInitOpenSSL in libhiredis_ssl.a(ssl.o)
"_PEM_read_DHparams", referenced from:
_tlsConfigure in tls.o
"_PEM_write_bio_X509", referenced from:
_connTLSGetPeerCert in tls.o
"_RAND_poll", referenced from:
_tlsInit in tls.o
"_SSL_CTX_ctrl", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
"_SSL_CTX_free", referenced from:
_tlsCleanup in tls.o
_tlsConfigure in tls.o
_createSSLContext in tls.o
_redisFreeSSLContext in libhiredis_ssl.a(ssl.o)
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_load_verify_locations", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_new", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_set_cipher_list", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_ciphersuites", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_default_passwd_cb", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_default_passwd_cb_userdata", referenced from:
_createSSLContext in tls.o
"_SSL_CTX_set_options", referenced from:
_tlsConfigure in tls.o
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_set_session_id_context", referenced from:
_tlsConfigure in tls.o
"_SSL_CTX_set_timeout", referenced from:
_tlsConfigure in tls.o
"_SSL_CTX_set_verify", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_use_PrivateKey_file", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_CTX_use_certificate_chain_file", referenced from:
_createSSLContext in tls.o
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_SSL_accept", referenced from:
_connTLSAccept in tls.o
_tlsHandleEvent in tls.o
"_SSL_connect", referenced from:
_connTLSBlockingConnect in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_ctrl", referenced from:
_connTLSSyncWrite in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
"_SSL_free", referenced from:
_sentinelReconnectInstance in sentinel.o
_connTLSClose in tls.o
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
_redisSSLFree in libhiredis_ssl.a(ssl.o)
"_SSL_get_error", referenced from:
_handleSSLReturnCode in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
_redisSSLRead in libhiredis_ssl.a(ssl.o)
_redisSSLWrite in libhiredis_ssl.a(ssl.o)
"_SSL_get_peer_certificate", referenced from:
_connTLSGetPeerCert in tls.o
"_SSL_new", referenced from:
_sentinelReconnectInstance in sentinel.o
_connCreateTLS in tls.o
_connCreateAcceptedTLS in tls.o
_redisInitiateSSLWithContext in libhiredis_ssl.a(ssl.o)
"_SSL_pending", referenced from:
_tlsHandleEvent in tls.o
"_SSL_read", referenced from:
_connTLSRead in tls.o
_connTLSSyncRead in tls.o
_connTLSSyncReadLine in tls.o
_redisSSLRead in libhiredis_ssl.a(ssl.o)
"_SSL_set_accept_state", referenced from:
_connCreateAcceptedTLS in tls.o
"_SSL_set_connect_state", referenced from:
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_set_fd", referenced from:
_connCreateAcceptedTLS in tls.o
_connTLSBlockingConnect in tls.o
_tlsHandleEvent in tls.o
_redisSSLConnect in libhiredis_ssl.a(ssl.o)
"_SSL_set_verify", referenced from:
_connCreateAcceptedTLS in tls.o
"_SSL_write", referenced from:
_connTLSWrite in tls.o
_connTLSSyncWrite in tls.o
_redisSSLWrite in libhiredis_ssl.a(ssl.o)
"_TLS_client_method", referenced from:
_redisCreateSSLContext in libhiredis_ssl.a(ssl.o)
"_TLS_method", referenced from:
_createSSLContext in tls.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [redis-server] Error 1
make: *** [all] Error 2
Comment From: oranagra
It could be some issue on your system.
But I also notice you did make BUILD_TLS=yes after already building redis.
Please try this:
make distclean
make BUILD_TLS=yes
Comment From: devnexen
if that helps... it seems to be a typical mac M1 build environment issue. I see here and there compiler/linker flags pointing to a typical homebrew installation path for x86_64/Rosetta mixed with the path for ARM64.
e.g. PREV_FINAL_LDFLAGS=-L/opt/homebrew/opt/openssl@1.1/lib -g -ggdb -L/usr/local/opt/openssl/lib
e.g. cc -std=c99 -c -O3 -fPIC -I/opt/homebrew/opt/openssl@1.1/include -DHIREDIS_TEST_SSL -I/usr/local/opt/openssl/include -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb -pedantic alloc.c
Comment From: IsraDeAguinaga
Sorry, I was busy on other stuff, so the way how I solved this was:
After some search I had to look at where the cpp compiler is searching at " where #include <...> search starts "
cpp -v /dev/null -o /dev/nul
output looks something like this:
...
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
# 1 "/dev/null"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
...
from the output, I copied the include openSSL files in:
/Library/Developer/CommandLineTools/usr/include
command:
sudo cp -r /opt/homebrew/opt/openssl@1.1/include/openssl /Library/Developer/CommandLineTools/usr/include/
then I ran:
make BUILD_TLS=yes and it ran fine, then I test it make test and finally sudo install -m 755 src/redis-cli /usr/local/bin/.
All working fine now. ( all this I had to do it on the bash shell since it wasn't working on zsh ).
Comment From: IsraDeAguinaga
BTW I did this on the redis-stable version. Not sure if it works on Redis-unstable ( it should ). Thank for the help.