Hello!
I am facing a problem, it was easier with Redis 4, I can compile 4.0.11 no problem, but now with the latest jemalloc is giving me an error saying:
src/background_thread.c:89:12: warning: implicit declaration of function 'sched_setaffinity'; did you mean 'SYS_sched_setaffinity'? [-Wimplicit-function-declaration]
int ret = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset);
^~~~~~~~~~~~~~~~~
SYS_sched_setaffinity
src/background_thread.c:89:40: error: 'cpu_set_t' undeclared (first use in this function); did you mean 'cpuset'?
int ret = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset);
^~~~~~~~~
cpuset
src/background_thread.c:89:40: note: each undeclared identifier is reported only once for each function it appears in
src/background_thread.c: In function 'background_thread_entry':
src/background_thread.c:512:2: warning: implicit declaration of function 'pthread_setname_np'; did you mean 'pthread_setcanceltype'? [-Wimplicit-function-declaration]
pthread_setname_np(pthread_self(), "jemalloc_bg_thd");
^~~~~~~~~~~~~~~~~~
pthread_setcanceltype
Makefile:349: recipe for target 'src/background_thread.sym.o' failed
make[3]: *** [src/background_thread.sym.o] Error 1
make[3]: Leaving directory '/build/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/redis-5.0-rc4/deps/jemalloc'
Makefile:91: recipe for target '/build/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/redis-5.0-rc4/.built' failed
make[2]: *** [/build/source/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/redis-5.0-rc4/.built] Error 2
make[2]: Leaving directory '/build/source/feeds/redis/redis'
Command exited with non-zero status 2
time: package/feeds/redis/redis/compile#14.84#1.41#15.66
package/Makefile:107: recipe for target 'package/feeds/redis/redis/compile' failed
make[1]: *** [package/feeds/redis/redis/compile] Error 2
make[1]: Leaving directory '/build/source'
/build/source/include/toplevel.mk:216: recipe for target 'package/feeds/redis/redis/compile' failed
make: *** [package/feeds/redis/redis/compile] Error 2
Do you guys have an idea what it could be?
Thank you so much.
Comment From: jumpy88
@p3x-robot did you finally manage to cross compile redis 5 for arm? I'd like to do that but I can't find any information on how to configure the makefile to use arm-linux-gnueabi-gcc or arm-linux-gnueabihf-gcc instead of gcc.
Comment From: p3x-robot
i only have the openwrt version:
https://github.com/patrikx3/openwrt-redis
Comment From: jumpy88
Thank you @p3x-robot for your soon reply. I've had a look in your readme to look for some inspiration but the easiest way for the moment I think is still to build redis directly on my raspberry pi zero (hope it'll finish before the end of the Universe).
Comment From: p3x-robot
i think raspberry pi should would have no problem to build redis. piece of cake
Comment From: p3x-robot
for me what giving was problem is the jemalloc, so i disabled jemalloc and it was no problem then
Comment From: jumpy88
Thank you again for your support. Finally I tried to build it directly on raspberry pi zero and it didn't take too much time. On arm architectures jemalloc should be disabled by default (this is what I understand by reading here and inside the makefile). Anyway I think having a simple way to configure the build environment for cross compilation would be a nice-to-have, so I've created a new issue for the feature request #6014
Comment From: wristdirect
for me what giving was problem is the jemalloc, so i disabled jemalloc and it was no problem then
To save anyone like me a little searching, you would do this by passing MALLOC=libc when calling make