Describe the bug
Building fails with fatal error.
To reproduce gmake CC='/usr/local/bin/gcc' CXX='/usr/local/bin/g++'
cd src && gmake all
gmake[1]: Entering directory `/root/tmp/redis-7.0.11/src'
CC debug.o
debug.c:47:10: fatal error: execinfo.h: No such file or directory
#include
^~~~~~~~~~~~
compilation terminated.
gmake[1]: *** [debug.o] Error 1
gmake[1]: Leaving directory `/root/tmp/redis-7.0.11/src'
Additional information
/usr/local/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-freebsd9.2/7.5.0/lto-wrapper Target: x86_64-unknown-freebsd9.2 Configured with: ./configure --with-gmp=/usr/local --with-mpc=/usr/local --with-mpfr=/usr/local Thread model: posix gcc version 7.5.0 (GCC)
Comment From: madolson
According to https://stackoverflow.com/questions/20388937/how-to-print-backtrace-in-a-freebsd-machine, it seems like exec info isn't available by default before FreeBSD 10.
Comment From: oranagra
@devnexen maybe you can help here.
Comment From: devnexen
hey @onthefly I find you here too 🙂, so again FreeBSD 9.2 is EOL since end of 2014, released in 2013. Still same question than in your PHP issue, any particular reason to use such old release ?
Comment From: devnexen
The only things I may suggest @oranagra, if you want to pursue :
- you decide to not support unsupported releases.
- or if you do want to, making HAVE_BACKTRACE optional for FreeBSD with the USE_BACKTRACE option like some other oses.
Comment From: oranagra
i'd generally prefer to support (or avoid braking), older platforms, even if they're obsolete. especially considering it's just one small thing in debug.c, and not really needed for redis to actually perform it's job.
however, i don't think requiring people to manually define USE_BACKTRACE is a good approach (in most cases people won't do that, and when they run into trouble, it'll already be too late).
the other solution could maybe be to somehow automatically detect that (maybe by matching the FreeBSD version). but considering this will only be added in the future (e.g. Redis 8.0 or 7.2), not sure it'll help much (as time passes the chances people use fresh redis builds, on obsolete platforms decrease, it's more likely that they'll be using v5.0 and 6.x). in theory we can "backport" this fix to 7.0 (and even 6.x), but i don't think it worth the trouble. instead, it's actually rather easy for anyone who runs into that problem to work around it with a simple patch.
Comment From: devnexen
the other solution could maybe be to somehow automatically detect that (maybe by matching the FreeBSD version). but considering this will only be added in the future (e.g. Redis 8.0 or 7.2).
ah yes that s better indeed (if you mean config.h I forgot about this). Ok fair enough your decision makes sense.