Created attachment 248254 [details] databases/redis build log The environment is FreeBSD 13.2-RELEASE-p9 with security/openssl installed. cc -lpthread -lm -lexecinfo -Wl,-rpath,/usr/local/lib -fstack-protector-strong -pthread -o redis-server adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a -lm ../deps/hiredis/libhiredis_ssl.a -L/usr/local/lib -lssl -L/usr/local/lib -lcrypto ld: error: undefined symbol: SSL_get_peer_certificate >>> referenced by tls.c >>> tls.o:(connTLSGetPeerCert) >>> did you mean: SSL_get0_peer_certificate >>> defined in: /usr/local/lib/libssl.so cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [Makefile:408: redis-server] Error 1 gmake[3]: *** Waiting for unfinished jobs.... gmake[3]: Leaving directory '/usr/ports/databases/redis/work/redis-7.2.4/src' gmake[2]: *** [Makefile:6: all] Error 2 gmake[2]: Leaving directory '/usr/ports/databases/redis/work/redis-7.2.4' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/databases/redis *** Error code 1 Stop. make: stopped in /usr/ports/databases/redis root@FreeBSD[/usr/ports/databases/redis]#
For me it looks like the same issue as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274512 , the hotfix provided there also works here.
(In reply to Jekyll Chen from comment #0) Do you add 'DEFAULT_VERSIONS+=ssl=openssl' in /etc/make.conf?
(In reply to Yasuhiro Kimura from comment #2) Yes, I added it since long ago. I tried commenting it out, and it warns "You have security/openssl installed but do not have DEFAULT_VERSIONS+=ssl=openssl set in your make.conf" and build still failed.
(In reply to Jekyll Chen from comment #3) I tried following steps. 1. Make clean install of 13.2-RELEASE amd64 2. Checkout latest main branch of ports tree 3. Add 'DEFAULT_VERSIONS+=ssl=openssl' to /etc/make.conf 4. cd /usr/ports/databases/redis 5. make And build succeeds without any problem.
(In reply to Yasuhiro Kimura from comment #4) Is there anything I can do for trouble shooting?
(In reply to Jekyll Chen from comment #5) Q1. Did you make clean install of 13.2-RELEASE or upgrade from pervious version? Q2. Are all installed packages built after 'DEFAULT_VERSIONS+=ssl=openssl' is added to /etc/make.conf Q3. Are there any non-default option settings about all installed packages? Q4. Do you have any other settings in /etc/make.conf?
(In reply to Yasuhiro Kimura from comment #6) A1. It's been upgraded from previous versions several times with building from source. A2. I believe so, since it was added long time ago. A3. I bet yes... but I can't detail what were changed. A4. The other setting there is OPTIONS_UNSET=X11 .
(In reply to Jekyll Chen from comment #7) Are all installed packages up-to-date? If not update all outdated packages and try again.
(In reply to Yasuhiro Kimura from comment #8) They are. Only redis is behind head.
(In reply to Jekyll Chen from comment #9) Umm...then my suggestion is to deinstall all packages and reinstall them again. IMHO such weirdness sometimes happnes if you have used FreeBSD ports collecton under non-cleanroom environment. That's why I switched to use poudriere except one system that is used for ports development. And for the system I periodically do the cleanup of installed packages by deinstalling all of them and installing necessary ones again.
(In reply to Yasuhiro Kimura from comment #10) I'm trying portmaster -af and will update the result. Thank you.
(In reply to Yasuhiro Kimura from comment #10) Unfortunately, portmaster -af failed again. However, I compared the failed log with succeeded log from my other machine, I found that there are two additional "-L/usr/local/lib" near the end of the failing command below. I tried manually running the command with them deleted and the command executed successfully. Do you have any idea what might cause this issue? cc -lpthread -lm -lexecinfo -Wl,-rpath,/usr/local/lib -fstack-protector-strong -pthread -o redis-server adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a -lm ../deps/hiredis/libhiredis_ssl.a -L/usr/local/lib -lssl -L/usr/local/lib -lcrypto
Created attachment 250169 [details] Patch to Makefile Just hit the problem, compiling 2024Q2 on releng/13.3. Solved by patching as suggested in the 1st comment of bug 274512