关于在cygwin下编译redis出错“Makefile:228: recipe for target 'geohash_helper.o' failed"的解决方法

在cygwin下编译redis4.0.8时,报错:

Makefile:228: recipe for target 'geohash_helper.o' failed
make[1]: *** [geohash_helper.o] Error 1
make[1]: Leaving directory '/redis408/src'
Makefile:6: recipe for target 'all' failed

make: *** [all] Error 2

提示编译geohash_helper.o失败,只要单独编译即可:

 gcc -c geohash_helper.c -o geohash_helper.o

这时重新编译make

提示

hyperloglog.o:在函数‘hllCount’中:
/redis408/src/hyperloglog.c:1033:对‘llroundl’未定义的引用
collect2: 错误:ld 返回 1
Makefile:199: recipe for target 'redis-server' failed
make: *** [redis-server] Error 1

第二个错误,未找到llroundl函数,查看hyperloglog.c文件,发现已引用了math.h文件,先把

llroundl改为round,重新编译,ok

$ gcc -c hyperloglog.c -o hyperloglog.o


Administrator@PC-20180517OAOT /redis408/src

$ make


你可能感兴趣的:(c/c++,数据库,redis)