cc -std=c11 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -MMD -o sds.o -c sds.c
cc -std=c11 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -MMD -o zmalloc.o -c zmalloc.c
zmalloc.c:59:5: error: function-like macro 'sizeof' is not defined
#if PREFIX_SIZE > 0
^
zmalloc.c:55:22: note: expanded from macro 'PREFIX_SIZE'
#define PREFIX_SIZE (sizeof(size_t))
^
1 error generated.
gmake[3]: *** [Makefile:339: zmalloc.o] Error 1
gmake[3]: Leaving directory 'redis-6.0.11/src'
gmake[2]: *** [Makefile:6: all] Error 2
gmake[2]: Leaving directory 'redis-6.0.11'
*** Error code 1
Here's the patch to fix the build issue. patch-src-zmalloc.c.txt
Comment From: oreilco
seeing the same in 5.0.11 on FreeBSD 12.2-RELEASE-p3
zmalloc.c:59:5: error: function-like macro 'sizeof' is not defined
#if PREFIX_SIZE > 0
^
zmalloc.c:55:22: note: expanded from macro 'PREFIX_SIZE'
#define PREFIX_SIZE (sizeof(size_t))
^
1 error generated.
gmake[3]: *** [Makefile:262: zmalloc.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory '/usr/ports/databases/redis5/work/redis-5.0.11/src'
gmake[2]: *** [Makefile:6: all] Error 2
gmake[2]: Leaving directory '/usr/ports/databases/redis5/work/redis-5.0.11'
===> Compilation failed unexpectedly.
Comment From: osokin
seeing the same in 5.0.11 on FreeBSD 12.2-RELEASE-p3
``` zmalloc.c:59:5: error: function-like macro 'sizeof' is not defined
if PREFIX_SIZE > 0
^zmalloc.c:55:22: note: expanded from macro 'PREFIX_SIZE'
define PREFIX_SIZE (sizeof(size_t))
^1 error generated. gmake[3]: *** [Makefile:262: zmalloc.o] Error 1 gmake[3]: *** Waiting for unfinished jobs.... gmake[3]: Leaving directory '/usr/ports/databases/redis5/work/redis-5.0.11/src' gmake[2]: *** [Makefile:6: all] Error 2 gmake[2]: Leaving directory '/usr/ports/databases/redis5/work/redis-5.0.11' ===> Compilation failed unexpectedly. ```
I've just committed a fix, https://svnweb.freebsd.org/changeset/ports/566418
Comment From: oranagra
Sorry about that. Already solved in unstable: https://github.com/redis/redis/pull/8533 I guess we'll have to release these versions again very soon
Comment From: osokin
Sorry about that. Already solved in unstable: #8533 I guess we'll have to release these versions again very soon
Please note: this issue is related to all recent releases, i.e.: 6.2.0, 6.0.11, 5.0.11.
Comment From: oreilco
Thanks - validated as fixed for me (I use 5.0.11) - plus it prompted me to switch from portsnap to using git to keep my ports tree updated. 👍
Comment From: yossigo
@osokin Please also note #8545, this was overlooked and will improve memory usage.
Comment From: osokin
@osokin Please also note #8545, this was overlooked and will improve memory usage.
Thanks very much, @yossigo ! While we are here, would you mind to take a look on databases/redis repo in FreeBSD ports tree, https://svnweb.freebsd.org/ports/head/databases/redis/files/. There're several patches there, hope some of those are useful at least in some cases. Thanks in advance!